Control program architecture, and adaptation generation method, device and system based on architecture
By introducing a control program architecture of multiple equipment basic functional blocks and automatic function blocks into the equipment group control system, combined with configurable interface modules and upper computer configuration parameters, the problem of frequent control programs adjustment during the development and debugging of the equipment group control system is solved, and more efficient development and management is achieved.
Patent Information
- Application Number
- CN202411986093.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-15
AI Technical Summary
During the development and debugging process, due to the diversified system forms, developers need to frequently adjust or redevelop control programs, which increases the challenges of labor costs and project implementation conversion rate. At the same time, there are many program versions, and it is difficult to upgrade and optimize and manage.
A control program architecture is proposed, including multiple device basic function blocks and automatic function blocks. Through configurable startup identification bits and interface modules, automatic control and data filtering of hardware devices are realized. This architecture adjusts the control program architecture by receiving configuration parameters sent by the upper computer to match the actual engineering project.
Through this control program architecture, repetitive program development and debugging work are reduced, subsequent program optimization and management costs are reduced, and the applicability and accuracy of control programs are improved.
Smart Images

Figure CN119828658A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of industrial control technology, and in particular to a control program architecture, and an adaptation generation method, device and system based on the architecture. Background Art
[0002] In the related technologies, the equipment group control system (such as the cold storage group control system) has the following problems during the development and debugging process: First, due to the diversity of system forms, the types and quantities of equipment under different systems vary greatly. Developers need to make major adjustments to the control program according to the actual project or even redevelop and debug it, resulting in high labor costs and low project conversion rates. Second, since different control programs need to be developed for different systems, there are many program versions, which makes subsequent program upgrades, optimizations and management difficult. Summary of the invention
[0003] The present disclosure provides a control program architecture, and an adaptation generation method, device, and system based on the architecture.
[0004] According to the first aspect of the present disclosure, a control program architecture is proposed, including: multiple device basic function blocks, each of the multiple device basic function blocks encapsulates basic control and processing logic for a hardware device of a single configuration, and each device basic function block is provided with a configurable startup identification bit; automatic function blocks, encapsulating automatic control and processing logic based on hardware devices for all configurations.
[0005] In some embodiments, the control program architecture further includes: an interface module encapsulating a data filtering logic based on configurable gating rules, wherein the data filtering logic is used to filter the data sent from the programmable logic controller to the hardware device to be controlled.
[0006] In some embodiments, the interface module further encapsulates parameter conversion logic based on configurable interface parameter conversion rules, and the parameter conversion logic is used to convert the software interface parameters corresponding to the device basic function block and the interface parameters of the hardware device to be controlled.
[0007] In some embodiments, there are multiple interface modules, and each interface module corresponds to the same type of device basic function block, and different interface modules correspond to different types of device basic function modules.
[0008] According to a second aspect of the present disclosure, a control program architecture adaptation generation method is provided, which is composed of a programmable logic controller and includes: receiving configuration parameters sent by a host computer, wherein the configuration parameters include information of hardware devices to be controlled in an actual engineering project; adjusting the control program architecture as described above according to the information of the hardware devices to be controlled in the actual engineering project to obtain an adjusted control program architecture, wherein the adjusted control program architecture matches the actual engineering project.
[0009] In some embodiments, the information of the hardware devices to be controlled includes the quantity information of the hardware devices, and the adjustment of the control program architecture as described above includes: according to the quantity information of the hardware devices, setting the enablement status flag of the device basic function block so that the number of enabled device basic function blocks is consistent with the number of hardware devices to be controlled in the actual engineering project; according to the setting result of the enablement status flag, adjusting the control and processing logic in the automatic function block.
[0010] In some embodiments, the information of the hardware device includes the quantity of each hardware device among the multiple hardware devices, and setting the enabled status flag of the device basic function block based on the quantity information of the hardware devices includes: comparing the quantity of each hardware device with the number of device basic function blocks of the same type as the hardware device to obtain a comparison result, wherein the numbers of the same type of device basic function blocks are continuous; and setting the enabled status flag of the device basic function block based on the comparison result.
[0011] In some embodiments, adjusting the control and processing logic in the automatic function block according to the setting result of the enable status flag includes: deleting the control and processing logic for the unenabled device basic function block in the automatic function block according to the setting result of the enable status flag.
[0012] In some embodiments, the adjusting of the control program architecture as described above further includes: configuring the gating rule of the interface module according to the setting result of the enabling status flag.
[0013] In some embodiments, the information of the hardware device to be controlled also includes the status point of the hardware device, and the adjustment of the control program architecture also includes: configuring the interface parameter conversion rules of the interface module according to the status point of the hardware device, and the interface parameter conversion rules are used to indicate the relationship between the software interface parameters corresponding to the basic function block of the device and the interface parameters of the hardware device.
[0014] In some embodiments, the hardware device to be controlled is a device in a cold storage group control system, and the type of the hardware device to be controlled includes at least one of a unit, a valve, and a sensor.
[0015] According to a third aspect of the present disclosure, a control program architecture adaptation generation device is provided, comprising: a module for executing the control program architecture adaptation generation method as described above.
[0016] According to a fourth aspect of the present disclosure, a control program architecture adaptation generation device is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the control program architecture adaptation generation method as described above based on instructions stored in the memory.
[0017] According to a fifth aspect of the present disclosure, a control system is provided, comprising: a programmable logic controller, including the control program architecture adaptation generation device as described above; an extension module, connected to the programmable logic controller, for collecting and forwarding data of the connected hardware devices under the control of the programmable logic controller.
[0018] In some embodiments, the control system further includes: a host computer, configured to receive configuration parameters set by a user and send the configuration parameters to the programmable logic controller.
[0019] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the control program architecture adaptation generation method as described above is implemented.
[0020] According to a seventh aspect of the present disclosure, a computer program product is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the control program architecture adaptation generation method as described above is implemented.
[0021] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings.
[0024] Figure 1 is a flowchart of a control program architecture adaptation generation method according to some embodiments of the present disclosure;
[0025] Figure 2is a schematic diagram of an exemplary control program architecture in the present disclosure;
[0026] Figure 3 is a flowchart of control program architecture adjustment steps according to some embodiments of the present disclosure;
[0027] Figure 4 It is for Figure 3 An example diagram of the control program architecture adjustment process is shown;
[0028] Figure 5 is another exemplary control program architecture schematic diagram according to the present disclosure;
[0029] Figure 6 is a flowchart of control program architecture adjustment steps according to other embodiments of the present disclosure;
[0030] Figure 7 is a flowchart of a control program architecture adaptation generation method according to other embodiments of the present disclosure;
[0031] Figure 8 is a schematic diagram of a system architecture according to which the configuration of some embodiments of the present disclosure is based;
[0032] Fig. 9 is a schematic diagram of dividing interface modules according to some embodiments of the present disclosure;
[0033] Fig.10 is a flowchart of parameter configuration according to some embodiments of the present disclosure;
[0034] Fig.11 is a schematic diagram of the principle of adjusting interface module parameters according to some embodiments of the present disclosure;
[0035] Fig.12 is a structural schematic diagram of a control program adaptation architecture generating device according to some embodiments of the present disclosure;
[0036] Fig.13 is a structural schematic diagram of a control program adaptation architecture generating device according to other embodiments of the present disclosure;
[0037] Fig.14 is a schematic diagram of the structure of a control system according to some embodiments of the present disclosure. DETAILED DESCRIPTION
[0038] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0039] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0040] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0041] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.
[0042] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0043] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0044] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0045] In response to the problems existing in the related technologies, the present disclosure proposes a control program architecture, an adaptation generation method, device and system based on the architecture, which can generate a control program architecture that is consistent with the actual engineering project through parameter configuration, thereby reducing repetitive program development and debugging work, and reducing subsequent program optimization and management costs.
[0046] Figure 1 FIG. 1 is a flow chart of a control program architecture adaptation generation method according to some embodiments of the present disclosure. Figure 1 As shown, the control program architecture adaptation generation method is executed by a programmable logic controller, including steps S11 to S12.
[0047] Step S11: receiving configuration parameters sent by the host computer.
[0048] Among them, the configuration parameters from the host computer include the hardware equipment information to be controlled in the actual engineering project.
[0049] In some examples, the information of the hardware devices to be controlled includes the quantity information of the hardware devices to be controlled. The quantity information of the hardware devices may specifically include the quantity of each type of equipment in multiple types of equipment. For example, when the actual engineering project is a cold storage group control system project, the configuration parameters sent by the host computer may include the number of units, the number of electric switch valves, the number of solenoid valves, the number of temperature sensors, the number of condensing fans, etc. By configuring the number of hardware devices to be controlled, it is convenient to adjust the control program architecture obtained by the configuration accordingly, so that the adjusted control architecture matches the number of hardware devices to be controlled in the actual engineering project.
[0050] In other examples, the information of the hardware devices to be controlled includes the quantity information of the hardware devices to be controlled and the status points of the hardware devices to be controlled. For example, when the hardware devices to be controlled include electric butterfly valves, the following information is configured for the electric butterfly valves: 30 electric butterfly valves, and the status points of the electric butterfly valves include remote control and open control. By configuring the quantity and status points of the hardware devices to be controlled, it is convenient to make a more comprehensive adjustment to the control program architecture obtained by the configuration, so that the adjusted control architecture matches the quantity and status points of the hardware devices to be controlled in the actual engineering project.
[0051] In some examples, when the actual project is a cold storage group control system project, the hardware equipment to be controlled is the equipment to be controlled in the cold storage group control system, and the equipment type includes at least one of a unit, a valve, and a sensor. In this example, the equipment information in the cold storage group control system is configured by the host computer, so that the adjusted control program architecture can be matched with the actual cold storage group control system.
[0052] Step S12: According to the configuration parameters, the control program architecture obtained in advance through configuration is adjusted to obtain an adjusted control program architecture.
[0053] Configuration refers to the process of completing a specific task in a project by using the tools and methods provided in the application software through configuration, setting and configuration. In layman's terms, configuration means that users complete the software functions they need in a way similar to "building blocks", which is now also called the "what you see is what you get" visual development method.
[0054] In some embodiments of the present disclosure, the control program architecture obtained by pre-configuration can be as follows: Figure 2 As shown. Figure 2 As shown, the preset control program architecture includes an automatic function block 11 and a plurality of equipment basic function blocks.
[0055] The automatic function block 11 encapsulates the overall automatic control and processing logic. For example, assuming that 10 valves are configured in advance, the automatic function block can be used to control when the 10 valves are opened and when they are closed.
[0056] Multiple device basic function blocks, each device basic function block encapsulates basic control and processing logic for a single configured hardware device. In specific implementation, the device basic function blocks may involve multiple types, and different types of device basic function blocks encapsulate basic control and processing logic for different hardware devices.
[0057] For example, the control program architecture includes a class 1 device basic function block 1 21, a class 1 device basic function block 222, ..., a class 1 device basic function block m1 23, ..., a class N device basic function block 1 24, a class N device basic function block 225, ..., a class N device basic function block m2 26. The class 1 device basic function block is used to process data of a class 1 hardware device, and the class 2 device basic function block is used to process data of a class 2 hardware device.
[0058] Furthermore, each device basic function block is provided with a configurable enable status flag. The enable status flag includes a first value and a second value. The first value indicates that the device basic function block is enabled, and the second value indicates that the device basic function block is disabled. In specific implementation, in the initial control program architecture, the default values of the enable status flags of the device basic function blocks can be all empty, all first values, or all second values.
[0059] In the disclosed embodiment, by designing the above control program architecture, it is not only convenient for subsequent adaptation and adjustment, so that a control program architecture that matches the actual engineering project can be generated through parameter configuration, thereby reducing repetitive program development and debugging work, and reducing subsequent program optimization and management costs, but also can support multiple control modes.
[0060] For example, when hardware devices are controlled based on the above control program architecture, automatic control mode and manual control mode can be used. In automatic control mode, instructions can be first sent to the basic function block of the device through the automatic function block, and the basic function block of the device will send the instructions to the hardware device after executing the preset processing logic; in manual control mode, instructions can be first sent to the controller through the host computer, and the basic function block of the device in the controller will send the instructions to the hardware device after executing the preset processing logic.
[0061] In the disclosed embodiment, the control program architecture obtained by configuration can be understood as a more general architecture. Through parameter configuration and architecture adjustment, the adjusted architecture can be turned into a specific architecture matching the actual engineering project.
[0062] In the disclosed embodiment, through the above process, a control program matching the actual engineering project can be generated according to the configuration parameters of the host computer, thereby reducing repetitive program development and debugging work and reducing subsequent program optimization and management costs.
[0063] The following combination Figure 3 and Figure 4 How to target Figure 2 The control program architecture shown is adjusted for detailed description.
[0064] First, if Figure 3 As shown, in some embodiments, the control program architecture adjustment step includes step S121 and step S122.
[0065] Step S121: according to the quantity information of the hardware device, the activation status flag of the basic function block of the device is set.
[0066] In some examples, the number information of the hardware devices includes the number of each hardware device in the multiple hardware devices. In this example, step S121 includes: comparing the number of each hardware device with the number of the device basic function block of the same type as the hardware device to obtain a comparison result; and setting the enabled state flag of the device basic function block according to the comparison result. The numbers of the same type of device basic function blocks are continuous.
[0067] For example, assume that the basic function blocks of the equipment include 20 unit basic function blocks and 40 solenoid valve basic function blocks, and the user configures the following information through the host computer: 10 units and 20 solenoid valves. In this example, the number of configured units can be compared with the number of each unit basic function block, and the enable flag of the unit basic function block can be set according to the comparison result; the number of configured solenoid valves can be compared with the number of each solenoid valve basic function block, and the enable flag of the solenoid valve basic function block can be set according to the comparison result.
[0068] In the above example, by making the numbering of the basic function blocks of the same type of equipment consecutive and setting the enablement status flag by comparing the number of hardware devices of the same type with the number of the basic function blocks of the equipment, it is convenient to determine the enablement status of each basic function block of the equipment more accurately and simply, and then facilitate the subsequent adjustment of the automatic function blocks so that the adjusted control architecture matches the number of hardware devices to be controlled in the actual engineering project.
[0069] In other examples, the number information of the hardware devices includes the number of each hardware device in the multiple hardware devices. In this example, step S121 includes: comparing the number of each hardware device with the number of device basic function blocks of the same type as the hardware device to obtain a comparison result; and setting the enabled state flag of the device basic function block according to the comparison result.
[0070] For example, assume that the basic function blocks of the equipment include 20 unit basic function blocks and 30 solenoid valve basic function blocks, and the user configures the following information through the host computer: 10 units and 20 solenoid valves. In this example, the number of configured units is compared with the number of unit basic function blocks, and the values of the enabled state identifiers of 10 unit basic function blocks are set to the first value (this value indicates that the unit basic function block is enabled) according to the comparison result, and the values of the enabled state identifiers of the other 10 unit basic function blocks are set to the second value (this value indicates that the unit basic function block is disabled). Also, the number of configured solenoid valves is compared with the number of solenoid valve basic function blocks, and the values of the enabled state identifiers of 20 solenoid valve basic function blocks are set to the first value according to the comparison result, and the values of the enabled state identifiers of the remaining 10 solenoid valve basic function blocks are set to the second value.
[0071] In the above example, the enable status flag is set by comparing the number of hardware devices of the same type with the number of basic function blocks of the device, which facilitates subsequent adjustment of the automatic function blocks so that the adjusted control architecture matches the number of hardware devices to be controlled in the actual engineering project.
[0072] Step S122: According to the setting result of the enabling status flag, the control and processing logic in the automatic function block is adjusted.
[0073] In some examples, in step S122, based on the setting result of the enable status flag, the control and processing logic for the unenabled device basic function blocks in the automatic function blocks are deleted; and the control and processing logic for the enabled device basic function blocks in the automatic function blocks are retained.
[0074] For example, assuming that the control program architecture obtained in advance through configuration supports the control of 30 parallel screw units, and project 1 has 2 parallel screw units, 8 electric butterfly valves, and 8 solenoid valves, then the following enable state identification setting result is obtained through step S121: the enable state identification output of the basic function blocks of the parallel screw units numbered 1 and 2 is 1, and the enable state identification output of the basic function blocks of the parallel screw units numbered 3 to 30 is 0, and the automatic function block retains the operation logic for the parallel screw units numbered 1 and 2, and deletes the operation logic for the parallel screw units numbered 3 to 30. Among them, the operation logic of the automatic function block is, for example, the logic of power on / off, addition and subtraction, and fault cutting.
[0075] In the embodiment of the present disclosure, by deleting the control and processing logic of the unenabled basic function blocks of the equipment, the automatic control process based on the controller is matched with the actual project, thereby improving the control accuracy.
[0076] In the disclosed embodiment, the above process can accurately and easily adjust the configured control program architecture so that the adjusted control program architecture is consistent with the number of hardware devices configured by the host computer, thereby matching the control program architecture with the actual project.
[0077] To better understand Figure 3 The process shown below is combined with Figure 4 The process is described in detail. Figure 4 As shown, the control program architecture adjustment step includes steps S41 to S47.
[0078] Step S41: The controller compares the number n of configured units with the number m of the basic functional block of the unit.
[0079] In this example, 30 unit basic function blocks are preset, and these unit basic function blocks are numbered from 1 to 30. In addition, n units are configured through the host computer.
[0080] In some examples, the current unit basic function block compares the configured unit number n with its own number m.
[0081] Step S42: Determine whether m is less than n.
[0082] When m is less than n, execute step S43; otherwise, execute step S44.
[0083] For example, assuming that n is 10, and the number m of the basic functional block of the current unit is 1, since 1 is less than 10, step S43 is executed.
[0084] For example, assuming that n is 10, and the number m of the basic functional block of the current unit is 11, since 11 is greater than 10, step S44 is executed.
[0085] Step S43: The controller sets the enable status flag to 1.
[0086] In some examples, the current plant basic function block sets its own enabling state flag to 1 to indicate that the current plant basic function block is enabled.
[0087] Step S44: The controller sets the activation status flag to 0.
[0088] In some examples, the current assembly basic function block sets its own enabling state flag to 0 to indicate that the current assembly basic function block is not enabled.
[0089] Step S45: Let m=m+1.
[0090] Step S46: Determine whether m is greater than 30.
[0091] When m is greater than 30, execute step S47; otherwise, execute step S42 again.
[0092] Step S47: The controller adjusts the control and processing logic of the automatic function block according to the result of setting the activation status flag.
[0093] In some examples, the enabling status flag setting result of each unit basic function block is output to the automatic function block, and then the automatic function block adjusts the operation logic in the automatic function block.
[0094] In the disclosed embodiment, the above process can accurately and easily adjust the configured control program architecture so that the adjusted control program architecture is consistent with the number of hardware devices configured by the host computer, thereby matching the control program architecture with the actual project.
[0095] Figure 5 FIG. 1 is another exemplary control program architecture diagram. Figure 5 As shown, the control program architecture includes Figure 2 In addition to the automatic function block 11 and multiple basic equipment function blocks, an interface module is also included. In view of the fact that the automatic function block and the basic equipment function block have been described in the foregoing content, the interface module will be mainly described below.
[0096] The interface module encapsulates data filtering logic based on configurable gating rules, which is used to filter data sent from the programmable logic controller to the hardware device to be controlled. In addition, the interface module also encapsulates parameter conversion logic based on configurable interface parameter conversion rules, which is used to convert the software interface parameters corresponding to the basic function block of the device with the interface parameters of the hardware device to be controlled. By setting the interface module, data can be filtered when the controller interacts with the hardware device, and the interface parameters between the software and the hardware can be adaptively adjusted.
[0097] In some examples, there are multiple interface modules, each of which corresponds to a type of device basic function block, and different interface modules correspond to different types of device basic function blocks. For example, the interface modules include interface modules 1 31, ..., interface modules N 32. Among them, interface module 1 31 corresponds to type 1 device basic function block, and interface module N 32 corresponds to type N device basic function block.
[0098] In the disclosed embodiment, by further introducing an interface module into the control program architecture based on the automatic function block and the basic function block of the device, it is convenient to better adapt and adjust the control program architecture according to the actual project situation in the future. Furthermore, by introducing a corresponding interface module for each type of basic function block of the device, it is convenient to independently control the interface parameters of different types of devices, thereby improving the refinement level of device control.
[0099] The following combination Figure 6 How to target Figure 5 The control program architecture shown in the figure is adjusted for detailed description. Figure 6 As shown, the control program architecture adjustment steps include Figure 2 In addition to steps S121 and S122, the embodiment also includes steps S123 and S124. Figure 2 Steps S121 and S122 have been described in detail, and the following mainly describes steps S123 and S124.
[0100] Step S123: According to the setting result of the enabling state flag, the gating rule of the interface module is configured.
[0101] Among them, the gating rule is used to filter the data sent from the controller to the hardware device to be controlled.
[0102] In some examples, the setting result of the enablement status flag includes the value of the enablement status flag of each device basic function block. In this example, according to the setting result of the enablement status flag, a whitelist of device data allowed to be released is configured.
[0103] For example, assuming that 30 unit basic function blocks and 10 solenoid valve basic function blocks are obtained in advance through configuration, the setting results of the enable status flag include: the enable status flag value of the unit basic function blocks numbered 1 and 2 is 1, and the enable status flag value of the remaining unit basic function blocks is 0, the enable status flag value of the solenoid valve basic function blocks numbered 1 to 5 is 1, and the enable status flag value of the remaining solenoid valve basic function blocks is 0, then the following white list is set: unit basic function blocks numbered 1 and 2, and solenoid valve basic function blocks numbered 1 to 3.
[0104] In the disclosed embodiment, by configuring the gating rules of the interface module, it is convenient to control the interactive data between the controller and the hardware device to be controlled based on the interface module. In this way, not only the adjusted control program architecture is matched with the actual project, but also it helps to improve the accuracy of data collection and forwarding of the system, and reduce the possibility of subsequent program errors or even failures due to data failure.
[0105] Step S124: According to the status point of the hardware device, configure the interface parameter conversion rule of the interface module.
[0106] In some embodiments of the present disclosure, the parameters configured by the host computer include not only the number of hardware devices to be controlled, but also the status points of the hardware devices to be controlled. For example, the status point information of each hardware device among multiple hardware devices. In these embodiments, the interface parameter conversion rules of the interface module are configured according to the status point information of the hardware devices. Among them, the interface parameter conversion rules are used to indicate the relationship between the software interface parameters corresponding to the basic function blocks of the device and the interface parameters of the hardware devices.
[0107] For example, assuming that the software interface parameters corresponding to the pre-defined 30 electric butterfly valve basic function blocks are local / remote control, open position, closed position, open control, and closed control, and the state point information of the electric butterfly valve configured by the host computer is: local / remote, open control. Then the configured interface parameter conversion rule is: the software interface parameters of the electric butterfly valve basic function block (local / remote control, open position, closed position, open control, and closed control) correspond to the electric butterfly valve interface parameters (local / remote, open control).
[0108] In the disclosed embodiment, by configuring the interface parameter conversion rules of the interface module, it is convenient to adapt the software and hardware interface parameters when the controller and the hardware device perform data interaction in the future. In this way, not only the adjusted control program architecture is matched with the actual project, but also the applicability of the control program architecture is improved.
[0109] In the embodiments of the present disclosure, by designing a control program architecture including automatic function blocks, equipment basic function blocks and interface modules, and subsequently adjusting the above control program architecture according to the number of devices and status points configured in the host computer, it is possible to more conveniently generate a control program that is more compatible with the actual engineering project, reduce repetitive program development and debugging work, and reduce subsequent program optimization and management costs.
[0110] Figure 7 FIG. 1 is a flow chart of a control program architecture adaptation generation method according to other embodiments of the present disclosure. Figure 7 As shown, the control program architecture adaptation method includes steps S71 to S73.
[0111] Step S71: Obtaining an initial control program architecture through configuration.
[0112] Configuration refers to the process of completing a specific task in a project by using the tools and methods provided in the application software through configuration, setting and configuration. In layman's terms, configuration means that users complete the software functions they need in a way similar to "building blocks", which is now also called the "what you see is what you get" visual development method.
[0113] In the disclosed embodiment, configuration may be performed according to a predefined more general system architecture diagram to obtain an initial control program architecture.
[0114] For example, Figure 8 As shown, the predefined system architecture diagram includes a communication expansion module, a valve IO expansion module, and a sensor IO expansion module. The valve IO expansion module includes a first type of valve IO expansion module, a second type of valve IO expansion module, ..., an n1 type of valve IO expansion module. The sensor IO expansion module includes a first type of sensor IO expansion module, ..., an n2 type of sensor IO expansion module. Further, in Figure 2 In the architecture diagram shown, the devices connected to the expansion modules are classified, and continuous expansion module address intervals are allocated to the same type of devices. For example, the address interval 1 of the communication expansion module is allocated to the unit, the address interval n of the communication expansion module is allocated to the manual operator, the address interval 1 of the first type of valve IO expansion module is allocated to the first type of valve, the address interval 1 of the second type of valve IO expansion module is allocated to the second type of valve, the address interval 1 of the n1th type of valve IO expansion module is allocated to the second type of valve, the address interval 1 of the first type of sensor IO expansion module is allocated to the first type of sensor, and the address interval 1 of the n2th type of sensor IO expansion module is allocated to the n2th type of sensor.
[0115] In determining Figure 8 After the architecture is shown, you can first set up the configuration module according to the diagram, then develop the configuration module interface based on the programming software, and then build the initial control program architecture.
[0116] The configuration module can be understood as the mapping of hardware devices. For example, a unit corresponds to a unit configuration module, a valve corresponds to a valve configuration module, and a sensor corresponds to a sensor configuration module.
[0117] Among them, the content of the configuration module interface development work is mainly to establish relevant interface labels according to the system architecture diagram. The subsequent program references the label, which means that the parameters of the configuration module are referenced. For example, assuming that an expansion module has 8 interfaces that can connect to temperature sensors, then the configuration module interface development is mainly to label the sensors connected to these 8 interfaces. For example, if the first interface is connected to temperature sensor No. 1, when the value of the sensor needs to be used later, just reference the label.
[0118] Among them, constructing the initial control program architecture includes: constructing the corresponding basic function block of the equipment according to the configuration module, and then constructing the automatic function block and the interface module. Among them, there can be multiple interface modules, each interface module corresponds to a type of basic function block of the equipment, and different interface modules correspond to different types of basic function blocks of the equipment.
[0119] For example, Fig. 9 As shown, for Figure 8 A communication interface module is set for units 1 to m1 in the example, and the module corresponds to communication extension module address interval 1 (specifically including communication extension module address 1 to communication extension module address n); Figure 8 A Class 1 valve interface module is set for the first type of valve in the embodiment, and the module corresponds to the Class 1 valve IO expansion module address interval 1 (specifically including the first type of valve IO expansion module address 1 to the first type of valve IO expansion module address n); for Figure 8 The n1-th valve in the example is provided with an n1-th valve interface module, which corresponds to the n1-th valve IO expansion module address interval 1 (specifically including the n1-th valve IO expansion module address 1 to the n1-th valve IO expansion module address n); for Figure 8 The n2-th sensor in the class is provided with an n2-type sensor interface module, which corresponds to the n2-type sensor IO expansion module address interval 1 (specifically including the n2-type sensor IO expansion module address 1 to the n2-type sensor IO expansion module address n).
[0120] Step S72: The user configures parameters through the host computer.
[0121] In this step, the user configures parameters according to the prompts on the human-computer interaction interface provided by the host computer based on the actual system form and equipment quantity on site. Parameter configuration can be implemented in a variety of ways, and two exemplary methods are described below.
[0122] In the first method, when the user completes the configuration of a part of the parameters, the host computer sends this part of the parameters to the controller; then, when the user completes the configuration of the next part of the parameters, the host computer sends this part of the parameters to the controller.
[0123] In the second method, after the user completes the configuration of all parameters, the host computer sends the configuration parameters to the controller. In these examples, after the parameter configuration of a certain type of device is completed and the user clicks "Yes", the host computer automatically switches to the parameter configuration page of the next type of device so that the user can continue to configure the parameters. After all types of device parameters are configured and the user clicks "Configuration Completed", the host computer sends the configuration parameters to the controller.
[0124] The following combination Fig.10 The parameter configuration process in the cold storage group control program adaptation process is illustrated as an example. Fig.10 As shown, the parameter configuration process includes: the user first configures the communication device parameters, then configures the valve parameters, and then configures the sensor parameters.
[0125] Among them, communication equipment is for example Figure 8 In the communication equipment parameter configuration link, the user first configures the number of devices under communication equipment type 1; then, the host computer displays a prompt message to indicate whether the communication configuration is completed. If the user clicks yes, the valve parameter configuration link is entered; if the user clicks no, the number of devices under communication equipment type 2 is continued to be configured until the user confirms that the communication configuration is completed or the number of devices under all communication equipment types is configured.
[0126] Next, in the valve parameter configuration link, the user first configures the number of devices under valve type 1; then, the host computer displays a prompt message to indicate whether the valve configuration is complete. If the user clicks yes, it enters the sensor parameter configuration link; if the user clicks no, it continues to configure the number of devices under valve type 2 until the user confirms that the valve configuration is complete or the number of devices under all valve types is configured.
[0127] Finally, in the sensor parameter configuration link, the user first configures the number of devices under sensor type 1; then, the host computer displays a prompt message to indicate whether the sensor configuration is complete. If the user clicks yes, the parameter configuration is complete; if the user clicks no, the number of devices under sensor type 2 will continue to be configured until the user confirms that the sensor configuration is complete or the number of devices under all sensor types is configured. After that, after the user clicks the configuration completion button, the host computer sends the configuration parameters to the controller. In addition to configuring the number of devices, the status points of the hardware devices can also be configured through the host computer.
[0128] Step S73: Adjust the control program architecture according to the configured parameters.
[0129] In this step, each module in the control program architecture may be adaptively adjusted based on the number of configured devices and device status points, so that the adjusted control program architecture matches the actual project.
[0130] For example, through step S73, the number of basic function blocks of devices in the enabled state is made consistent with the number of actual hardware devices to be controlled, and the operation logic of the automatic function block is made to match the number of basic function blocks of devices in the enabled state. Further, through step S73, the gating rules and interface parameter conversion rules configured by the interface module are made to match the number and state of the actual hardware devices to be controlled. In this way, when the subsequent controller interacts with the hardware device, the interface module can execute Fig.11 The data filtering and interface parameter conversion processes shown.
[0131] For example, suppose the predefined Class 1 valve is an electric butterfly valve, the number is 30, and each has the following status points: local / remote signal, open position, closed position, open control, closed control; the parameters of the electric butterfly valve configured by the host computer are as follows: 3 electric butterfly valves, and each has the following status points: local / remote signal, open control. After configuring the selection rules and interface parameter conversion rules of the electric butterfly valve interface module according to the configuration parameters of the host computer, the electric butterfly valve interface module can perform the following processing when the controller interacts with the electric butterfly valve to be controlled: before reporting the data of the electric butterfly valve to the controller, fill in the missing status points of the device, and transmit the filled data to other modules in the controller; before sending the data from the controller to the electric butterfly valve, filter out the non-existent device parameters according to the selection rules, and convert the software interface parameters into the actual expansion module interface parameters.
[0132] In the disclosed embodiment, the above process can reduce repetitive program development and debugging work, and reduce subsequent program optimization and management costs.
[0133] Fig.12 is a schematic diagram of the structure of a control program architecture adaptation generation device according to some embodiments of the present disclosure. Fig.12 As shown, the control program architecture adaptation generation device 120 is used to perform the control program architecture adaptation generation as described above and includes a receiving module 121 and an adjustment module 122.
[0134] The receiving module 121 is configured to receive configuration parameters sent by the host computer, wherein the configuration parameters include the hardware equipment information to be controlled in the actual engineering project.
[0135] The adjustment module 122 is configured to adjust the pre-configured control program architecture according to the configuration parameters to obtain an adjusted control program architecture, wherein the adjusted control program architecture matches the actual engineering project.
[0136] In the disclosed embodiment, the above device can generate a control program matching the actual engineering project according to the configuration parameters of the host computer, thereby reducing repetitive program development and debugging work and reducing subsequent program optimization and management costs.
[0137] Fig.13 1 is a schematic diagram of the structure of a control program adaptation generation device according to other embodiments of the present disclosure. Fig.13As shown, the control program architecture adaptation generation device 130 includes a memory 131 and a processor 132 coupled to the memory 131. The memory 131 is used to store instructions for executing the control program architecture adaptation generation method corresponding to the embodiment. The processor 132 is configured to execute the control program architecture adaptation generation method in any of the embodiments of the present disclosure based on the instructions stored in the memory 131.
[0138] Fig.14 is a schematic diagram of the structure of a control system according to some embodiments of the present disclosure. Fig.14 As shown, the control system 140 includes a controller 141 and a plurality of expansion modules. For example, the plurality of expansion modules include expansion module 1 142, expansion module 2 143, ..., and expansion module N 144.
[0139] The controller 141 is a programmable logic controller, which is used to execute the control program architecture adaptation generation method as described above.
[0140] Multiple expansion modules are connected to the controller 141 and are used to collect and forward data of the connected hardware devices under the control of the controller.
[0141] In some embodiments, the control system 140 further includes a host computer for receiving configuration parameters set by a user and sending the configuration parameters to the controller 141 .
[0142] In the disclosed embodiment, the above control system can generate a control program matching the actual engineering project according to the configuration parameters of the host computer, thereby reducing repetitive program development and debugging work and reducing subsequent program optimization and management costs.
[0143] Here, various aspects of the present disclosure are described with reference to flowcharts and / or block diagrams of methods, devices, and computer program products according to embodiments of the present disclosure. It should be understood that each frame of the flowchart and / or block diagram and the combination of frames can be implemented by computer-readable program instructions.
[0144] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable device to produce a machine, so that the processor executes the instructions to produce means for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.
[0145] These computer-readable program instructions may also be stored in a computer-readable memory, which cause the computer to work in a specific manner to produce an article of manufacture, including instructions for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.
[0146] The present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.
[0147] So far, the control program architecture according to the present disclosure, the adaptation generation method, device and system based on the architecture have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.
Claims
1. A control program architecture, comprising: A plurality of basic device function blocks, each of which encapsulates basic control and processing logic for a single-configuration hardware device, and each basic device function block is provided with a configurable startup identification bit; Automatic function blocks encapsulate automatic control and processing logic based on hardware devices for all configurations.
2. The control program architecture according to claim 1, further comprising: The interface module encapsulates a data filtering logic based on a configurable gating rule, and the data filtering logic is used to filter the data sent from the programmable logic controller to the hardware device to be controlled.
3. The control program architecture according to claim 2, wherein: The interface module also encapsulates a parameter conversion logic based on a configurable interface parameter conversion rule, and the parameter conversion logic is used to convert the software interface parameters corresponding to the device basic function block and the interface parameters of the hardware device to be controlled.
4. The control program architecture according to claim 3, wherein: There are multiple interface modules, and each interface module corresponds to the same type of device basic function block, and different interface modules correspond to different types of device basic function modules.
5. A control program architecture adaptation generation method, executed by a programmable logic controller, comprising: Receive configuration parameters sent by the host computer, wherein the configuration parameters include information of hardware devices to be controlled in the actual engineering project; According to the information of the hardware equipment to be controlled in the actual engineering project, the control program architecture as described in any one of claims 1 to 4 is adjusted to obtain an adjusted control program architecture, wherein the adjusted control program architecture matches the actual engineering project.
6. The control program architecture adaptation generation method according to claim 5, wherein: The information of the hardware device to be controlled includes the quantity information of the hardware device, and the adjusting of the control program architecture according to any one of claims 1 to 4 includes: According to the quantity information of the hardware devices, the activation status flag of the device basic function block is set so that the number of the enabled device basic function blocks is consistent with the number of the hardware devices to be controlled in the actual engineering project; According to the setting result of the enabling status flag, the control and processing logic in the automatic function block is adjusted.
7. The control program architecture adaptation generation method according to claim 6, wherein: The information of the hardware device includes the quantity of each hardware device in the multiple hardware devices, and the setting of the activation state flag of the basic function block of the device according to the quantity information of the hardware device includes: Comparing the number of each hardware device with the number of the basic function blocks of the same type as the hardware device to obtain a comparison result, wherein the numbers of the basic function blocks of the same type are consecutive; According to the comparison result, the activation state flag of the device basic function block is set.
8. The control program architecture adaptation generation method according to claim 6, wherein: The adjusting the control and processing logic in the automatic function block according to the setting result of the enabling status flag includes: According to the setting result of the activation status flag, the control and processing logic for the unactivated device basic function block in the automatic function block is deleted.
9. The control program architecture adaptation generation method according to claim 6, wherein: The adjusting of the control program architecture according to any one of claims 1 to 4 further comprises: According to the setting result of the enabling state flag, the gating rule of the interface module is configured.
10. The control program architecture adaptation generation method according to claim 9, wherein: The information of the hardware device to be controlled also includes the status point of the hardware device, and the adjustment of the control program architecture according to any one of claims 1 to 4 also includes: According to the status point of the hardware device, the interface parameter conversion rule of the interface module is configured, and the interface parameter conversion rule is used to indicate the relationship between the software interface parameters corresponding to the basic function block of the device and the interface parameters of the hardware device.
11. The control program architecture adaptation generation method according to any one of claims 5 to 10, wherein: The hardware equipment to be controlled is equipment in a cold storage group control system, and the type of the hardware equipment to be controlled includes at least one of a unit, a valve, and a sensor.
12. A control program architecture adaptation generation device, comprising: A module for executing the control program architecture adaptation generation method described in any one of claims 5 to 11.
13. A control program architecture adaptation generation device, comprising: Memory; as well as A processor coupled to the memory, the processor being configured to execute the control program architecture adaptation generation method as described in any one of claims 5 to 11 based on instructions stored in the memory.
14. A control system comprising: A programmable logic controller, comprising the control program architecture adaptation generation device according to claim 12 or 13; The expansion module is connected to the programmable logic controller and is used for collecting and forwarding data of the connected hardware devices under the control of the programmable logic controller.
15. The control system according to claim 14, further comprising: The host computer is used to receive the configuration parameters set by the user and send the configuration parameters to the programmable logic controller.
16. A computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the control program architecture adaptation generation method as described in any one of claims 5 to 11.
17. A computer program product having computer program instructions stored thereon, which, when executed by a processor, implement the control program architecture adaptation generation method as claimed in any one of claims 5 to 11.