Logic programming system management and control method, device and equipment

By providing function blocks without preset function codes through frequency converters, and combining them with the logic programming system of the host computer, the problem of limited number and types of function blocks is solved, enabling more flexible system construction.

CN121597178APending Publication Date: 2026-03-03SHENZHEN INVT ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511792668.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

The limited number and types of function blocks in existing frequency converters make it difficult to meet diverse system construction needs, thus restricting user use.

Method used

The frequency converter provides function blocks without preset function codes. The logic programming system is downloaded from the host computer, and the target function code and parameters are determined from the reserved function codes to realize the construction and control of the logic programming system.

Benefits of technology

The limitation on the number of times a function block can be used has been removed, increasing the flexibility and variety of function blocks to meet diverse system building needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597178A_ABST
    Figure CN121597178A_ABST
Patent Text Reader

Abstract

The invention discloses a logic programming system management and control method, device and equipment, and relates to the field of industrial automation, and the method comprises the steps that a frequency converter downloads a logic programming system from an upper computer; wherein the logic programming system is a system built by an upper computer based on a target function block provided by a frequency converter; the target function block is a function block without a preset function code; and based on each target function block in the logic programming system, determining a target function code required to be used from the reserved function codes, and determining a function code parameter of the target function code so as to manage and control the logic programming system by using the target function code. According to the frequency converter, the function block without the preset function code is provided to build the logic programming system, so that the use of a user is more flexible, and diversified system building requirements are better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial automation, and in particular to a method, apparatus and equipment for controlling a logic programming system. Background Technology

[0002] Frequency converters provide pre-configured function blocks with pre-defined function codes, allowing users to build their own logic programming systems and customize the converter's control logic. However, this current design limits the number and types of function blocks available because only pre-configured function blocks can be used. For example, if there are four pre-configured single-word to double-word modules, and since different function blocks in the logic programming system have different function codes, each pre-configured single-word to double-word module can only be used once. Once a function block is used, it becomes unavailable, severely restricting user access and making it difficult to meet diverse system building needs. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a logic programming system control method, apparatus, and device. The frequency converter, by providing function blocks without pre-set function codes for building a logic programming system, allows for greater user flexibility and better meets diverse system construction needs. The specific solution is as follows:

[0004] Firstly, this application provides a logic programming system control method applied to frequency converters, including:

[0005] Download the logic programming system from the host computer; the logic programming system is a system built by the host computer based on the target function blocks provided by the frequency converter; the target function blocks are function blocks without preset function codes;

[0006] Based on each target function block in the logic programming system, the target function code to be used is determined from the reserved function codes, and the function code parameters of the target function code are determined, so as to use the target function code to control the logic programming system.

[0007] Optionally, determining the target function code to be used from the reserved function codes based on each target function block in the logic programming system includes:

[0008] Based on the first target function block itself, the required first target function code is determined from the reserved function codes; the first target function block is each of the target function blocks in the logic programming system.

[0009] Based on each pin in the first target function block, determine the second target function code to be used from the reserved function code.

[0010] Optionally, the logic programming system is a system built by the host computer on the current visualization page using the target function block corresponding to the target operation event; the target operation event is a selection event for the target function block provided by the frequency converter.

[0011] Optionally, the target function block provided by the frequency converter has a selection attribute, which includes a first selection attribute and a second selection attribute; the first selection attribute indicates that the target function block can be selected, and the second selection attribute indicates that the target function block cannot be selected.

[0012] Accordingly, the target operation event is a selection event for the target function block provided by the frequency converter that has the first selection attribute.

[0013] Optionally, the logic programming system control method further includes:

[0014] Based on the used target function blocks and the second target function blocks, the total system resources required are determined; the used target function blocks are the target function blocks corresponding to historical target operation events; the second target function blocks are each of the target function blocks provided by the frequency converter;

[0015] If the total system resources exceed the corresponding preset resource threshold, the selection attribute of the second target function block will be adjusted from the first selection attribute to the second selection attribute.

[0016] The total system resources include any one or a combination of the first total number of function codes, the second total number of function codes, and the total execution time of each function block; the first total number of function codes is the sum of the number of function codes required by each function block itself, and the second total number of function codes is the sum of the number of function codes required by the pins in each function block.

[0017] Optionally, the function code parameters for determining the target function code include:

[0018] Based on the function block type identifier of the first target function block, determine the function code assignment and the first function code name of the first target function code;

[0019] Based on the first function code name, determine the second function code name of the second target function code;

[0020] The step of determining the second function code name of the second target function code based on the first function code name includes:

[0021] Based on the first function code name and the pin name of each pin, determine the second function code name of the second target function code.

[0022] Optionally, based on the function block type identifier of the first target function block, the first function code name of the first target function code is determined, including:

[0023] Based on the function block type identifier and block identifier of the first target function block, determine the first function code name of the first target function code;

[0024] In the logic programming system, different target function blocks correspond to different block identifiers.

[0025] Optionally, based on the function block type identifier of the first target function block, the first function code name of the first target function code is determined, including:

[0026] The total number of specific function codes among the determined function codes is counted; the determined function codes are the first target function codes with determined function code names; the specific function codes are assigned the same value as the function codes of the currently undetermined function codes; the currently undetermined function codes are the first target function codes with the names of the currently undetermined function codes.

[0027] Based on the total number and the function block type identifier of the current function block to be determined, the first function code name of the current function code to be determined is determined; the current function block to be determined is the first target function block corresponding to the current function code to be determined.

[0028] Secondly, this application provides a logic programming system control device applied to a frequency converter, comprising:

[0029] The system download module is used to download a logic programming system from a host computer; the logic programming system is a system built by the host computer based on the target function blocks provided by the frequency converter; the target function blocks are function blocks without preset function codes.

[0030] The system management module is used to determine the target function code to be used from the reserved function codes based on each target function block in the logic programming system, and to determine the function code parameters of the target function code, so as to manage the logic programming system using the target function code.

[0031] Thirdly, this application provides an electronic device, comprising:

[0032] Memory, used to store computer programs;

[0033] A processor is used to execute the computer program to implement the aforementioned logic programming system control method.

[0034] In this application, the frequency converter provides function blocks without preset function codes, so that users can use the host computer to build a logic programming system using the function blocks without preset function codes. The logic programming system is then sent to the frequency converter, which then determines the target function codes required for each function block in the logic programming system from the reserved function codes, and determines the function code parameters of the target function codes. Finally, the construction of the logic programming system is completed, and the frequency converter can then use the target function codes to control the logic programming system. Since the frequency converter does not pre-configure function codes for function blocks, even if the same function block is used multiple times to build a logic programming system, the frequency converter will determine different function codes for these function blocks from the reserved function codes after obtaining the logic programming system. This prevents multiple function blocks from corresponding to the same function code. Therefore, the frequency converter in this application, by providing function blocks without pre-configured function codes, eliminates the limitation of related technologies where a function block can only be used once due to the limitation of only being able to use function blocks with pre-configured function codes. It also solves the problem of limited function block quantity and types caused by the limitation of related technologies where only function blocks with pre-configured function codes can be used, thus making the use of function blocks more flexible for users and better meeting diverse system construction needs. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0036] Figure 1 This is a flowchart of a logic programming system control method disclosed in an embodiment of this application;

[0037] Figure 2 This is a diagram illustrating the conversion relationship between a logic programming system and function codes disclosed in an embodiment of this application.

[0038] Figure 3 This is a schematic diagram of a visual interface disclosed in an embodiment of this application;

[0039] Figure 4 This is a flowchart of another logic programming system control method disclosed in an embodiment of this application;

[0040] Figure 5 This is a schematic diagram of the structure of a logic programming system control device disclosed in an embodiment of this application;

[0041] Figure 6 This is a structural diagram of an electronic device disclosed in an embodiment of this application. Detailed Implementation

[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] Current inverter designs can only provide function blocks with pre-configured function codes, thus limiting the number and types of function blocks. As a result, each function block used is one less available, severely restricting user operation and making it difficult to meet diverse system construction needs. To address this, this application provides a logic programming system control method. The inverter provides function blocks without pre-configured function codes for logic programming system construction, allowing for greater user flexibility and better meeting diverse system construction requirements.

[0044] See Figure 1 As shown, this embodiment of the invention discloses a logic programming system control method applied to a frequency converter, comprising:

[0045] Step S11: Download the logic programming system from the host computer; the logic programming system is a system built by the host computer based on the target function block provided by the frequency converter; the target function block is a function block without preset function code.

[0046] Step S12: Based on each target function block in the logic programming system, determine the target function code to be used from the reserved function codes, and determine the function code parameters of the target function code, so as to use the target function code to control the logic programming system.

[0047] In this embodiment of the invention, the frequency converter provides function blocks without pre-set function codes, allowing users to build a logic programming system using these function blocks via a host computer. The user then sends the logic programming system to the frequency converter. Correspondingly, the frequency converter downloads the logic programming system from the host computer, determines the target function codes required for each function block in the logic programming system from the reserved function codes, and determines the function code parameters of the target function codes. Finally, the construction of the logic programming system is completed, and the frequency converter can then use the target function codes to control the logic programming system.

[0048] It should be noted that the logic programming system is a system built by the host computer using the target function block corresponding to the target operation event on the current visualization page; and the target operation event is the selection event for the target function block provided for the frequency converter.

[0049] That is, the host computer provides a visual interface through its built-in display screen, and displays the target function block without preset function code provided by the frequency converter through the visual interface. At this time, the host computer monitors the target operation event through the current visual interface it provides, and uses the target function block corresponding to the target operation event to build a logic programming system on the current visual interface. At this time, the target operation event can also be defined as a selection event for the target function block without preset function code displayed on the current visual interface.

[0050] The current visualization interface of the host computer includes a function block selection area and a system building area. Correspondingly, the target operation event is the selection event of the target function block without preset function code displayed in the function block selection area. That is, the host computer displays the target function block without preset function code provided by the frequency converter through the function block selection area in the current visualization interface. In addition, the host computer specifically uses the target function block corresponding to the target operation event to build the logic programming system in the system building area.

[0051] It should be noted that there are no restrictions on the positional relationship or size of the function block selection area and the system building area on the current visual interface of the host computer; these can be set by engineers according to actual needs.

[0052] Furthermore, selection events include touch screen selection events and non-touch screen selection events. Non-touch screen selection events include, but are not limited to, mouse selection events and keyboard selection events. Specifically, selection events can be drag events, click events, etc.

[0053] Furthermore, the inverter determines the required target function code from the reserved function code based on each target function block in the logic programming system. Specifically, this includes: determining the required first target function code from the reserved function code based on the first target function block itself; wherein the first target function block is each target function block in the logic programming system; and determining the required second target function code from the reserved function code based on each pin in the first target function block.

[0054] That is, the inverter needs to determine the first target function code required by each target function block in the logic programming system from the reserved function code, and determine the second target function code required by each pin in each target function block from the reserved function code.

[0055] According to one example, the inverter determines the corresponding first target function code for the first target function block itself from the reserved function codes based on the number of function codes required by the first target function block itself, and determines the corresponding second target function code for each pin of the first target function block from the reserved function codes based on the number of function codes required by each pin in the first target function block.

[0056] It should be noted that different function blocks and different pins in a logic programming system need to correspond to different function codes to uniquely identify the function block itself and the pins within the function block.

[0057] Furthermore, the target function block provided by the frequency converter has a selection attribute, which includes a first selection attribute and a second selection attribute. The first selection attribute indicates that the target function block can be selected, and the second selection attribute indicates that the target function block cannot be selected. That is, through the selection attribute of the target function block, it is possible to control whether the target function block can be selected for building a logic programming system.

[0058] Correspondingly, the target operation event is a selection event for a target function block with a first selection attribute provided by the frequency converter; that is, the selection event is for a selectable target function block provided by the frequency converter.

[0059] Since the target function blocks provided by the frequency converter are displayed through the current visualization page of the host computer, in order to facilitate the user's differentiation between target function blocks with the first selection attribute and those with the second selection attribute on the current visualization interface, the host computer can adopt different display methods to display the target function blocks with the first selection attribute and those with the second selection attribute provided by the frequency converter on the current visualization interface. These different display methods include, but are not limited to, different color display methods and different fill display methods.

[0060] The adjustment of the selection attribute of the target function block provided by the frequency converter is specifically based on the used target function block and the second target function block to determine the total system resources required. The used target function block is the target function block corresponding to the historical target operation event. The second target function block is each target function block provided by the frequency converter. When the total system resources exceed the corresponding preset resource threshold, the selection attribute of the second target function block is adjusted from the first selection attribute to the second selection attribute.

[0061] It should be noted that initially, the selection attribute of each target function block provided by the frequency converter is the first selection attribute, which is the selectable attribute. For each target function block provided by the frequency converter, after each target operation event is detected, an adjustment operation of the selection attribute of each target function block provided by the frequency converter is triggered. Specifically, based on the target function blocks corresponding to all historically detected target operation events and each target function block provided by the frequency converter, the total system resources required by these function blocks are determined. Then, it is determined whether the total system resources exceed the corresponding preset resource threshold. If the total system resources do not exceed the corresponding preset resource threshold, the selection attribute of each target function block remains the first selection attribute. If the total system resources exceed the corresponding preset resource threshold, the selection attribute of each target function block is adjusted from the first selection attribute to the second selection attribute.

[0062] In this way, by adjusting the selection attributes of the target function block according to system resources, it is possible not only to control whether the target function block can be selected later to build the logic programming system, but also to ensure that the total system resources used by the logic programming system do not exceed the corresponding preset resource threshold, thus guaranteeing the running performance of the logic programming system.

[0063] The total system resources include any one or a combination of the total number of first function codes, the total number of second function codes, and the total execution time of each function block; the total number of first function codes is the sum of the number of function codes required by each function block itself, and the total number of second function codes is the sum of the number of function codes required by the pins in each function block.

[0064] According to one example, when the total system resources include the first total number of function codes, the first total number of function codes is determined based on the sum of the number of function codes required by the used target function block itself and the number of function codes required by the second target function block itself. If the first total number of function codes exceeds the corresponding preset resource threshold, the selection attribute of the second target function block is adjusted from the first selection attribute to the second selection attribute.

[0065] According to one example, when the total system resources include the total number of second function codes, the total number of second function codes is determined based on the sum of the number of function codes required for pins in the used target function block and the number of function codes required for pins in the second target function block. If the total number of second function codes exceeds the corresponding preset resource threshold, the selection attribute of the second target function block is adjusted from the first selection attribute to the second selection attribute.

[0066] According to one example, when the total system resources include the total execution time of each functional block, the total execution time is determined based on the execution time of the used target functional block and the execution time of the second target functional block. If the total execution time exceeds the corresponding preset resource threshold, the selection attribute of the second target functional block is adjusted from the first selection attribute to the second selection attribute.

[0067] According to one example, when the total system resources include the first total number of function codes and the second total number of function codes, the first total number of function codes is determined based on the sum of the number of function codes required by the used target function block itself and the number of function codes required by the second target function block itself. The second total number of function codes is determined based on the sum of the number of function codes required by the pins in the used target function block and the number of function codes required by the pins in the second target function block. Then, if the first total number of function codes or the second total number of function codes exceeds the corresponding preset resource threshold, the selection attribute of the second target function block is adjusted from the first selection attribute to the second selection attribute.

[0068] According to one example, when the total system resources include the total number of first function codes and the total execution time of each function block, the total number of first function codes is determined based on the sum of the number of function codes required by the used target function block itself and the number of function codes required by the second target function block itself. The total execution time is determined based on the execution time of the used target function blocks and the execution time of the second target function blocks. Then, if the total number of first function codes or the total execution time exceeds the corresponding preset resource threshold, the selection attribute of the second target function block is adjusted from the first selection attribute to the second selection attribute.

[0069] According to one example, when the total system resources include the total number of second function codes and the total execution time of each function block, the total number of second function codes is determined based on the sum of the number of function codes required for pins in the used target function block and the number of function codes required for pins in the second target function block. The total execution time is determined based on the execution time of the used target function block and the execution time of the second target function block. Then, if the total number of second function codes or the total execution time exceeds the corresponding preset resource threshold, the selection attribute of the second target function block is adjusted from the first selection attribute to the second selection attribute.

[0070] According to one example, when the total system resources include the total number of first function codes, the total number of second function codes, and the total execution time of each function block, the total number of first function codes is determined based on the sum of the number of function codes required by the used target function block itself and the number of function codes required by the second target function block itself. The total number of second function codes is determined based on the sum of the number of function codes required by the pins in the used target function block and the number of function codes required by the pins in the second target function block. The total execution time is determined based on the execution time of the used target function block and the execution time of the second target function block. Then, if at least one of the total number of first function codes, the total number of second function codes, and the total execution time exceeds the corresponding preset resource threshold, the selection attribute of the second target function block is adjusted from the first selection attribute to the second selection attribute.

[0071] It should be noted that the total number of first function codes, the total number of second function codes, and the total execution time each have their own preset resource thresholds.

[0072] In addition, embodiments of the present invention can also determine the used system resources based on the used target function blocks, that is, the system resources that have been used. The used system resources include any one or a combination of the total number of first function codes, the total number of second function codes, and the total execution time of each function block. Then, the difference between the used system resources and the corresponding preset resource threshold is determined, and based on the difference and the system resources required for each target function block provided by the frequency converter, the remaining number of uses for each target function block provided by the frequency converter is determined. The remaining number of uses refers to the number of times each target function block provided by the frequency converter can be used without using other target function blocks. Then, the remaining number of uses for each target function block provided by the frequency converter is displayed on the current visualization page of the host computer.

[0073] In this embodiment of the invention, the host computer can also monitor preset end events to determine whether to send the logic programming system to the frequency converter. These preset end events include, but are not limited to, the selection attributes of all target function blocks provided by the frequency converter being the second selection attribute, the used system resources reaching the corresponding preset resource threshold, and receiving a user end command.

[0074] Furthermore, after determining the required target function code from the reserved function codes for each target function block in the logic programming system, the inverter needs to determine the function code parameters of the target function code. Specifically, determining the function code parameters of the target function code may include: determining the function code assignment and name of the first target function code based on the function block type identifier of the first target function block; and determining the second function code name of the second target function code based on the first function code name.

[0075] That is, after the inverter determines the required first target function code from the reserved function code based on the first target function block itself, it needs to determine the function code assignment and first function code name of the first target function code based on the function block type identifier of the first target function block. After determining the required second target function code from the reserved function code based on each pin in the first target function block, it needs to determine the second function code name of the second target function code based on the first function code name.

[0076] Furthermore, the reserved function code may include a first reserved function code and a second reserved function code. The first reserved function code is a function code reserved in advance for the target function block itself, and the second reserved function code is a function code reserved in advance for pins in the target function block. Accordingly, the frequency converter determines the required first target function code from the first reserved function code based on the first target function block itself, and determines the required second target function code from the second reserved function code based on each pin in the first target function block.

[0077] It should be noted that the inverter defaults to setting the initial value of the first reserved function code to a preset value, such as zero, indicating that the function code has not yet been used. After determining the function code assignment of the first target function code based on the function block type identifier of the first target function block, the initial value of the first target function code is modified to the aforementioned function code assignment. The function block type identifier is used to identify the function block type; different function block types correspond to different function block type identifiers.

[0078] According to one example, the frequency converter can directly assign the function block type identifier of the first target function block as the function code value of the first target function code. According to another example, the frequency converter can also determine the target character based on the function block type identifier of the first target function block and preset characters, and then assign the target character as the function code value of the first target function code.

[0079] For determining the first function code name of the first target function code based on the function block type identifier of the first target function block, according to one example, the frequency converter can determine the first function code name of the first target function code based on the function block type identifier and the block identifier of the first target function block; wherein, different target function blocks in the logic programming system correspond to different block identifiers, that is, the block identifier is used to uniquely identify the target function block in the logic programming system.

[0080] In one scenario, the inverter can directly combine the function block type identifier and block identifier of the first target function block to determine the first function code name of the first target function code.

[0081] In another scenario, the inverter can use preset connectors, such as "-", "&", "_", etc., to connect the function block type identifier and block identifier of the first target function block to determine the first function code name of the first target function code.

[0082] In another scenario, the frequency converter can determine the first function code name of the first target function code based on the function block type identifier corresponding to the first target function block and the block identifier of the first target function block.

[0083] For example, the frequency converter directly combines the function block type corresponding to the function block type identifier of the first target function block with the block identifier of the first target function block to determine the first function code name of the first target function code.

[0084] For example, the frequency converter uses a preset connector to connect the function block type corresponding to the function block type identifier of the first target function block and the block identifier of the first target function block to determine the first function code name of the first target function code.

[0085] For determining the first function code name of the first target function code based on the function block type identifier of the first target function block, according to another example, the frequency converter can determine the first function code name of the first target function code by counting the total number of specific function codes among the determined function codes; wherein, the determined function code is the first target function code with the determined function code name; the specific function code has the same function code value as the function code of the currently to be determined function code; the currently to be determined function code is the first target function code with the name of the currently to be determined function code; based on the total number and the function block type identifier of the currently to be determined function block, the first function code name of the currently to be determined function code is determined; wherein, the currently to be determined function block is the first target function block corresponding to the currently to be determined function code.

[0086] That is, after the inverter determines the corresponding first target function code for each target function block in the logic programming system from the reserved function codes, it needs to determine the first function code name of each first target function code in sequence. Among them, the first target function code whose name is to be determined is denoted as the current function code to be determined. Specifically, it is determined by counting the total number of specific function codes among the first target function codes whose names have been determined. The specific function codes are assigned the same value as the function code of the current function code to be determined. Then, based on the total number and the function block type identifier of the first target function block corresponding to the current function code to be determined, the first function code name of the current function code to be determined is determined.

[0087] In addition to the methods mentioned above, there are other ways to name the first function code corresponding to the first target function block, as long as the function code names of different function codes are different.

[0088] After determining the first function code name of the first target function code, the frequency converter can determine the second function code name of the second target function code based on the first function code name and the pin name of each pin.

[0089] That is, after determining the first function code name of the first target function code corresponding to the first target function block, the frequency converter can determine the second function code name of the second target function code corresponding to each pin based on the first function code name and the pin name of each pin in the first target function block.

[0090] It should be noted that the number of function codes required corresponds to the number of pin names for each pin; that is, each pin name corresponds to its function code and function code name.

[0091] In this embodiment, the conversion relationship between the logic programming system and function codes is as follows: Figure 2 As shown, assuming the logic programming system includes N target function blocks, and different target function blocks in the logic programming system correspond to different block identifiers, the frequency converter determines the required first target function code from the reserved function codes based on each target function block itself in the logic programming system, and determines the required second target function code from the reserved function codes based on each pin in each target function block. Since a function block has at least one pin, a function block needs to use several second target function codes. After the corresponding function codes for each target function block itself and each pin in the target function block are determined, the logic programming system can be represented by function codes, and the parameters of the frequency converter can be configured through function codes to achieve control of the logic programming system.

[0092] In addition, the total number of the first reserved function codes can be a preset resource threshold corresponding to the total number of the first function codes, and the total number of the second reserved function codes can be a preset resource threshold corresponding to the total number of the second function codes.

[0093] At this point, the inverter can start from the first function code in the first reserved function code, and determine the first target function code required for each target function block in the logic programming system according to the order of the function codes. Starting from the first function code in the second reserved function code, the inverter can determine the second target function code required for each pin in each target function block according to the order of the function codes.

[0094] Furthermore, the inverter can modify the initial value of the first function code in the first reserved function code to the total number of target function blocks in the logic programming system, and starting from the second function code in the first reserved function code, determine the first target function code required by each target function block in the logic programming system according to the order of function codes. In this way, the inverter can use the assigned value of the first function code in the first reserved function code to perform consistency verification on the number of function codes configured for the target function blocks in the logic programming system, so as to avoid the situation of under-configuration or over-configuration of function codes.

[0095] Furthermore, the inverter can also transmit the function codes, function code values, and function code names of each target function block in the logic programming system, as well as the function codes and function code names of each pin in the target function block, to the host computer for display. This allows the host computer to configure the inverter and manage the logic programming system using the function codes. In this way, by displaying only the used function codes on the host computer, compared to displaying both used and unused function codes, this embodiment of the invention facilitates user viewing and troubleshooting.

[0096] Furthermore, this application displays different types of target function blocks provided by the frequency converter through the visualization interface of the host computer, and only one of each type of target function block is displayed. Compared with related technologies that display all function blocks with pre-configured function codes on the visualization page of the host computer, the embodiments of the present invention can make the visualization interface of the host computer simpler, more convenient to use, and improve the user experience.

[0097] like Figure 3 The diagram illustrates a visual interface, which is divided into a function block selection area and a system building area. The function block selection area displays different types of target function blocks provided by the frequency converter, allowing users to select them to build a logic programming system. The system building area displays the currently built logic programming system. Furthermore, the function block selection area displays target function blocks with the second selection attribute (i.e., unselectable target function blocks) in gray to alert the user that these function blocks are no longer selectable.

[0098] It should be noted that the frequency converter pre-stores function block templates for different types of function blocks, and different types of function blocks correspond to different function block templates. Taking a single-word to double-word module as an example, the function block template includes the attribute information table shown in Table 1 and the pin information table shown in Table 2. The attribute information includes the function block type identifier and execution time, while the pin information includes the pin number, input / output type, number of required function codes, pin name, and remarks for each pin in the function block. In this way, the frequency converter can directly retrieve the required information from the locally stored function block template, which is convenient, fast, and efficient.

[0099] Table 1 Attribute Information Table

[0100] Table 2 Pin Information Table

[0101] Furthermore, the inverter constructs a system definition table based on the block identifier, function block type identifier, function code name of each target function block, and the meaning of the function code name for each target function block in the logic programming system. Taking the function code name being determined based on the total number of specific function codes among the known function codes and the function block type identifier of the target function block as an example, the system definition table can be represented as Table 3 below. In this way, by constructing the system definition table and transmitting it to the host computer for display, the inverter allows users to understand detailed information about each target function block in the logic programming system.

[0102] Table 3 System Definition Table

[0103] The following is a practical example. Assume the total system resources include the total number of first function codes, the total number of second function codes, and the total execution time of each function block. The preset resource threshold for the total number of first function codes is 100, the preset resource threshold for the total number of second function codes is 200, and the preset resource threshold for the total execution time is 100ms. In this case, the first reserved function codes include group P85, specifically P85.00-P85.99, and the second reserved function codes include groups P86 and P87, specifically P86.00-P86.99 and P87.00-P87.99, respectively. Furthermore, the initial values ​​of the first reserved function codes P85.00-P85.99 are all 0, indicating that there are no function blocks in the logic programming system. The second reserved function codes P86 and P87 are undefined and not displayed.

[0104] If the user selects two target function blocks, both of which are single-word to double-word modules (the function block type identifier for single-word to double-word modules is 1) to build the logic programming system, the host computer will display two function codes from group P85, specifically:

[0105] P85.00=1, the function code name is single character to double character 1;

[0106] P85.01=1, the function code name is single character to double character 2.

[0107] Since each pin in the single-word to double-word module requires 4 function codes (2 inputs, 2 outputs), a total of 8 function codes are needed. The host computer will then display the 8 function codes from group P86, specifically:

[0108] The function code name for P86.00 is: Single character to double character conversion, high character input;

[0109] The function code name on page 86.01 is: Single character to double character conversion 1 Low character input;

[0110] The function code name on page 86.02 is: Single word to double word 1 Output low byte;

[0111] The function code name on page 86.03 is: Single word to double word 1 output high bit;

[0112] The function code name on page 86.04 is: Single character to double character 2-character input;

[0113] The function code name on page 86.05 is: Single character to double character conversion, low character input;

[0114] The function code name for P86.06 is: Single word to double word 2-output low bit;

[0115] The function code name on page 86.07 is: Single word to double word 2 output high bit.

[0116] Furthermore, P85.02-P85.99 in the first reserved function code, P86.08-P86.99 and P87.00-P87.99 in the second reserved function code are not displayed on the host computer. This allows users to easily view and troubleshoot problems by only displaying the function codes used on the host computer.

[0117] Since the frequency converter does not pre-configure function codes for function blocks, even if the same function block is used multiple times to build a logic programming system, the frequency converter will determine different function codes for these function blocks from the reserved function codes after obtaining the logic programming system. This prevents multiple function blocks from corresponding to the same function code. Therefore, the frequency converter in this application, by providing function blocks without pre-configured function codes, eliminates the limitation of related technologies where a function block can only be used once due to the limitation of only being able to use function blocks with pre-configured function codes. It also solves the problem of limited function block quantity and types caused by the limitation of related technologies where only function blocks with pre-configured function codes can be used, thus making the use of function blocks more flexible for users and better meeting diverse system construction needs.

[0118] See Figure 4 As shown, this embodiment of the invention discloses a logic programming system control method, applied to a host computer, including:

[0119] Step S21: Build a logic programming system based on the target function block provided by the frequency converter; wherein, the target function block is a function block without preset function code;

[0120] Step S22: The logic programming system is sent to the frequency converter so that the frequency converter can determine the target function code to be used from the reserved function code based on each target function block in the logic programming system, and determine the function code parameters of the target function code, so as to control the logic programming system using the target function code.

[0121] Specifically, for the construction of the logic programming system, the host computer provides a visual interface through its built-in display screen, and displays the target function block without preset function code provided by the frequency converter through the visual interface. At this time, the host computer monitors the target operation event through the current visual interface provided by itself, and uses the target function block corresponding to the target operation event to build the logic programming system on the current visual interface; at this time, the target operation event can also be defined as a selection event for the target function block without preset function code displayed on the current visual interface.

[0122] Furthermore, since the target function block has a first selection attribute and a second selection attribute, and the first selection attribute indicates that the target function block can be selected, while the second selection attribute indicates that the target function block cannot be selected, the target operation event is a selection event for the target function block with the first selection attribute. Moreover, the host computer can use different display methods to display the target function block with the first selection attribute and the target function block with the second selection attribute on the current visualization interface.

[0123] It should be noted that initially, the selection attribute of each target function block provided by the frequency converter is the first selection attribute, which is the selectable attribute. For each target function block provided by the frequency converter, after the host computer detects a target operation event, it will trigger an adjustment operation on the selection attribute of each target function block provided by the frequency converter. Specifically, based on the target function blocks corresponding to all historically detected target operation events and each target function block provided by the frequency converter, the total system resources required by these function blocks are determined. Then, it is determined whether the total system resources exceed the corresponding preset resource threshold. If the total system resources do not exceed the corresponding preset resource threshold, the selection attribute of each target function block remains the first selection attribute. If the total system resources exceed the corresponding preset resource threshold, the selection attribute of each target function block is adjusted from the first selection attribute to the second selection attribute.

[0124] It should also be noted that since the description of the control method for the logic programming system from the host computer side in this embodiment corresponds to the description of the control method for the logic programming system from the inverter side in the previous embodiment, more detailed technical content of this embodiment can be found in the previous embodiment, and will not be elaborated further here.

[0125] Therefore, this embodiment adjusts the selection attribute of the target function block according to system resources. This not only controls whether the target function block can be selected later to build the logic programming system, but also ensures that the total system resources used by the logic programming system do not exceed the corresponding preset resource threshold. This maximizes the satisfaction of user needs while ensuring the performance of the logic programming system.

[0126] See Figure 5 As shown, an embodiment of the present invention discloses a logic programming system control device applied to a frequency converter, comprising:

[0127] System download module 11 is used to download a logic programming system from a host computer; the logic programming system is a system built by the host computer based on the target function blocks provided by the frequency converter; the target function blocks are function blocks without preset function codes;

[0128] The system management module 12 is used to determine the target function code to be used from the reserved function codes based on each target function block in the logic programming system, and to determine the function code parameters of the target function code, so as to manage the logic programming system using the target function code.

[0129] Since the frequency converter does not pre-configure function codes for function blocks, even if the same function block is used multiple times to build a logic programming system, the frequency converter will determine different function codes for these function blocks from the reserved function codes after obtaining the logic programming system. This prevents multiple function blocks from corresponding to the same function code. Therefore, the frequency converter in this application, by providing function blocks without pre-configured function codes, eliminates the limitation of related technologies where a function block can only be used once due to the limitation of only being able to use function blocks with pre-configured function codes. It also solves the problem of limited function block quantity and types caused by the limitation of related technologies where only function blocks with pre-configured function codes can be used, thus making the use of function blocks more flexible for users and better meeting diverse system construction needs.

[0130] In some specific embodiments, the system management module 12 includes:

[0131] The first function code determining unit is used to determine the required first target function code from the reserved function codes based on the first target function block itself; the first target function block is each of the target function blocks in the logic programming system;

[0132] The second function code determination unit is used to determine the second target function code to be used from the reserved function codes based on each pin in the first target function block.

[0133] In some specific embodiments, the logic programming system is a system built by the host computer on the current visualization page using the target function block corresponding to the target operation event; the target operation event is a selection event for the target function block provided by the frequency converter.

[0134] In some specific embodiments, the target function block provided by the frequency converter has a selection attribute, which includes a first selection attribute and a second selection attribute; the first selection attribute indicates that the target function block can be selected, and the second selection attribute indicates that the target function block cannot be selected.

[0135] Accordingly, the target operation event is a selection event for the target function block provided by the frequency converter that has the first selection attribute.

[0136] In some specific embodiments, the logic programming system control device further includes:

[0137] The resource determination unit is used to determine the total system resources required based on the used target function blocks and the second target function blocks; the used target function blocks are the target function blocks corresponding to historical target operation events; the second target function blocks are each of the target function blocks provided by the frequency converter.

[0138] The selection attribute adjustment unit is used to adjust the selection attribute of the second target function block from the first selection attribute to the second selection attribute when the total system resources exceed the corresponding preset resource threshold.

[0139] The total system resources include any one or a combination of the first total number of function codes, the second total number of function codes, and the total execution time of each function block; the first total number of function codes is the sum of the number of function codes required by each function block itself, and the second total number of function codes is the sum of the number of function codes required by the pins in each function block.

[0140] In some specific embodiments, the system management module 12 includes:

[0141] The first determining submodule is used to determine the function code assignment and the first function code name of the first target function code based on the function block type identifier of the first target function block.

[0142] The second determining submodule is used to determine the second function code name of the second target function code based on the first function code name;

[0143] The second determining submodule includes:

[0144] The first name determination unit is used to determine the second function code name of the second target function code based on the first function code name and the pin name of each pin.

[0145] In some specific embodiments, the first determining submodule includes:

[0146] The second name determination unit is used to determine the first function code name of the first target function code based on the function block type identifier and block identifier of the first target function block.

[0147] In the logic programming system, different target function blocks correspond to different block identifiers.

[0148] In some specific embodiments, the first determining submodule includes:

[0149] A quantity statistics unit is used to count the total number of specific function codes among the determined function codes; the determined function codes are the first target function codes with determined function code names; the specific function codes are assigned the same value as the function codes of the currently undetermined function codes; the currently undetermined function codes are the first target function codes with the names of the currently undetermined function codes.

[0150] The third name determination unit is used to determine the first function code name of the current function code to be determined based on the total number and the function block type identifier of the current function block to be determined; the current function block to be determined is the first target function block corresponding to the current function code to be determined.

[0151] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0152] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the logic programming system construction method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0153] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0154] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0155] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the logic programming system construction method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0156] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for building a logic programming system. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0157] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0158] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0159] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0160] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0161] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for controlling a logic programming system, characterized in that, Applied to frequency converters, including: Download the logic programming system from the host computer; the logic programming system is a system built by the host computer based on the target function blocks provided by the frequency converter; the target function blocks are function blocks without preset function codes; Based on each target function block in the logic programming system, the target function code to be used is determined from the reserved function codes, and the function code parameters of the target function code are determined, so as to use the target function code to control the logic programming system.

2. The logic programming system control method according to claim 1, characterized in that, The determination of the required target function code from the reserved function codes based on each target function block in the logic programming system includes: Based on the first target function block itself, the required first target function code is determined from the reserved function codes; the first target function block is each of the target function blocks in the logic programming system. Based on each pin in the first target function block, determine the second target function code to be used from the reserved function code.

3. The logic programming system control method according to claim 2, characterized in that, The logic programming system is a system built by the host computer on the current visualization page using the target function block corresponding to the target operation event; the target operation event is a selection event for the target function block provided by the frequency converter.

4. The logic programming system control method according to claim 3, characterized in that, The target function block provided by the frequency converter has a selection attribute, which includes a first selection attribute and a second selection attribute; the first selection attribute indicates that the target function block can be selected, and the second selection attribute indicates that the target function block cannot be selected. Accordingly, the target operation event is a selection event for the target function block provided by the frequency converter that has the first selection attribute.

5. The logic programming system control method according to claim 4, characterized in that, Also includes: Based on the used target function blocks and the second target function block, determine the total system resources required. The used target function block is the target function block corresponding to the historical target operation event; The second target function block is each of the target function blocks provided by the frequency converter; If the total system resources exceed the corresponding preset resource threshold, the selection attribute of the second target function block will be adjusted from the first selection attribute to the second selection attribute. The total system resources include any one or a combination of the first total number of function codes, the second total number of function codes, and the total execution time of each function block; the first total number of function codes is the sum of the number of function codes required by each function block itself, and the second total number of function codes is the sum of the number of function codes required by the pins in each function block.

6. The logic programming system control method according to claim 2, characterized in that, The function code parameters for determining the target function code include: Based on the function block type identifier of the first target function block, determine the function code assignment and the first function code name of the first target function code; Based on the first function code name, determine the second function code name of the second target function code; The step of determining the second function code name of the second target function code based on the first function code name includes: Based on the first function code name and the pin name of each pin, determine the second function code name of the second target function code.

7. The logic programming system control method according to claim 6, characterized in that, Based on the function block type identifier of the first target function block, the first function code name of the first target function code is determined, including: Based on the function block type identifier and block identifier of the first target function block, determine the first function code name of the first target function code; In the logic programming system, different target function blocks correspond to different block identifiers.

8. The logic programming system control method according to claim 6, characterized in that, Based on the function block type identifier of the first target function block, the first function code name of the first target function code is determined, including: The total number of specific function codes among the determined function codes is counted; the determined function codes are the first target function codes with determined function code names; the specific function codes are assigned the same value as the function codes of the currently undetermined function codes; the currently undetermined function codes are the first target function codes with the names of the currently undetermined function codes. Based on the total number and the function block type identifier of the current function block to be determined, the first function code name of the current function code to be determined is determined; the current function block to be determined is the first target function block corresponding to the current function code to be determined.

9. A logic programming system control device, characterized in that, Applied to frequency converters, including: The system download module is used to download a logic programming system from a host computer; the logic programming system is a system built by the host computer based on the target function blocks provided by the frequency converter; the target function blocks are function blocks without preset function codes. The system management module is used to determine the target function code to be used from the reserved function codes based on each target function block in the logic programming system, and to determine the function code parameters of the target function code, so as to manage the logic programming system using the target function code.

10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the logic programming system control method as described in any one of claims 1 to 8.