A PLC and HMI fusion algorithm

Through the PLC and HMI fusion algorithm, index variables and functional block packaging technology are used to solve the problems of cumbersome HMI programming and the differences in PLC programming style, and standardized programming between PLC and HMI is realized, saving programming time and cost.

CN114691247BActive Publication Date: 2025-05-13ROBOT PHOENIX
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210410564.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2025-05-13
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

The existing HMI programming workload is large and cumbersome. The programming styles of PLC and HMI are very different from each brand, making it difficult to achieve standardization. High-performance HMI is expensive, and low-performance HMI is prone to lag when processing a large number of variables.

Method used

It provides a PLC and HMI fusion algorithm, which realizes standardized programming of PLC and HMI by defining storage arrays and index variables of automation components, and simplifies the programming process of HMI and PLC through the encapsulation of functional blocks and templates.

Benefits of technology

It realizes standardized programming of PLC and HMI, saves a lot of programming time, reduces HMI costs, and does not require reprogramming or adding variables, and is suitable for large projects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114691247B_ABST
    Figure CN114691247B_ABST
Patent Text Reader

Abstract

The invention discloses a PLC and HMI fusion algorithm, which defines an automation component data storage array M[index]; creates a PLC function block FB_M of the automation component M; M[index] is associated with FB_M; at the same time, defines a PLC and HMI interface variable VAR; creates an HMI component template FB_HMI; calls FB_HMI and assigns a value to index; then determines whether index and Index_Temp are equal; if they are equal, then Index_Change:=FALSE and determines whether Index_Change: is a state or not; if they are not equal, then Index_Change:=TURE; Index_Temp:=index, and determines whether Index_Change: is a state or not. If it is not conductive, the corresponding data information of the array M[index] is transmitted to the interface variable VAR; if it is conductive, the data information of the interface variable VAR is transmitted to the array M[index]. After the entire algorithm and template are completed, a large amount of HMI and PLC programming time can be saved, especially for those relatively large projects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automation control technology, and in particular to a PLC and HMI fusion algorithm. Background Art

[0002] 1. HMI programming is labor-intensive and cumbersome, wasting programming time.

[0003] 2. The programming styles of PLC and HMI of different brands vary greatly. Even if the same brand of PLC and HMI are used, different programmers have different programming styles, making it difficult to achieve standardization.

[0004] 3. High-performance HMIs are expensive, and low-performance HMIs will become laggy if there are too many variables. Summary of the invention

[0005] In order to overcome the problems existing in the prior art, the present invention provides a PLC and HMI fusion algorithm, which can adapt to the standard station algorithm of most projects to realize the standardized programming of various brands of PLC and HMI, and can simply realize most HMI programming and part of PLC programming by just making a template.

[0006] The technical solution adopted by the present invention to solve the technical problem is: the PLC and HMI merge algorithms, define a storage array M[0...n] of the automation component M to store data of n automation components M; the first to nth automation components correspond to automation components M1...Mn respectively;

[0007] The first step is to make a structure of all variables related to the automation component M1 and need to be associated with the HMI; define the HMI index variable Index. If Index = 1, the array M[index] represents the storage data of the first automation component M1; if Index = 2, the array M[index] represents the storage data of the second automation component M1, and so on;

[0008] The second step is to create a function block FB_M1 for the program of the automation component M1 related to the HMI, and one of the input and output pins of this function block is index to realize the encapsulation of the PLC program of M1;

[0009] The third step is to put all the M1-related screens on a public page on the HMI, define the interface variable VAR, create an HMI template FB_HMI, and realize the encapsulation of the HMI program;

[0010] The fourth step is to define the HMI index intermediate variable Index_Temp and the HMI index change variable Index_Change; if the index variable Index is not equal to the index intermediate variable Index_Temp, the index change variable Index_Change is turned on, and the value of the index variable Index is assigned to the index intermediate variable Index_Temp; then the state of the index change variable Index_Change is determined, if Index_Change is not turned on, the corresponding data information of the array M[index] is transmitted to the interface variable VAR respectively; if Index_Change is turned on, the data information of the interface variable VAR is transmitted to the array M[index] respectively; thus, the data of different servos stored in the array M[index] can be called through the index variable index;

[0011] Step 5: Call FB_HMI in Step 3 in HMI and assign a value to the HMI index variable index during the call. Then call the FB_M1 function blocks corresponding to the number of automation components M1 in the PLC program. At this point, the PLC function block FB_M1 and the HMI program block FB_HMI are completely connected through the HMI index variable Index, so that only one set of interface variables is created for the automation component M1 on the HMI, and the data of multiple automation components M1 can be stored.

[0012] Step 6: Create algorithms to automate other components based on steps 1 to 5.

[0013] Furthermore, the automation component M is any electrical component in the automation industry, and the automation component M is a servo or a cylinder or a motor or a robot or a stepper or a frequency converter.

[0014] Furthermore, in the first step, all variables related to the automation component M1 and need to be associated with the HMI are made into a structure, and the variables are positive jog or negative jog or return point or automatic speed or jog speed or acceleration or deceleration or teaching point 1 or teaching point 2 or teaching point 3...

[0015] Furthermore, in the first step, an HMI index variable Index is defined. If Index=1, the array M[index] represents the storage data of the first automation component M1. If Index=2, the array M[index] represents the storage data of the second automation component M1, and so on.

[0016] Furthermore, in the fifth step, if the number of automation components M1 is 3, when you want to modify the data of the first automation component M1, you only need to make a button to call FB_HMI, and assign the index variable index to 1; when you want to modify the data of the second automation component M1, you only need to make a button to call FB_HMI, and assign the index variable index to 2; when you want to modify the data of the third automation component M1, you only need to make a button to call FB_HMI, and assign the index variable index to 3; then call 3 FB_M function blocks in the PLC program; their pins are 1, 2, and 3 respectively.

[0017] Furthermore, in the sixth step, the algorithms of other automation components are made according to the first to fifth steps. Each subsequent project only requires calling the corresponding FB_HMI and FB_M, and the HMI does not need to be reprogrammed or variables added again.

[0018] In summary, the beneficial effects of the above technical solution of the present invention are as follows:

[0019] 1. After the entire algorithm and template are completed, a lot of HMI and PLC programming time can be saved, especially for those larger projects. In PLC, you only need to drag out the corresponding function block and fill in the value of the index variable index. At the same time, HMI only needs to call the completed component template and assign the same value to the index variable index. PLC manual and parameter setting procedures, most of the HMI procedures have been completed.

[0020] 2. It helps to standardize and normalize the program. Once the HMI template and PLC function block are finalized, the entire program framework is finalized. Even if different people use it, the HMI and program framework are unified.

[0021] 3. Reduced HMI cost. According to the previous programming model, if a project has dozens of servos, cylinders, and inverters, there are thousands of variables between HMI and PLC. Low-performance HMI will be stuck and cannot meet project requirements, so expensive high-performance HMI can only be selected. After adopting this algorithm, there is only one servo, one inverter, and one cylinder for PLC and HMI interaction variables. All other variables are stored in the PLC array, so it is entirely possible to choose an economical HMI. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0023] The features and principles of the present invention are described in detail below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not intended to limit the protection scope of the present invention.

[0024] like Figure 1 As shown, a storage array M[1...n] of the automation component M is defined to store data of n automation components M, wherein the automation component M can be any electrical device commonly used in automation, such as a servo, a cylinder, a motor, a robot, a stepper, a frequency converter, etc. In the following, we take the automation component M as a servo as an example.

[0025] In the first step, we make a structure of all variables related to the automation component M1 (servo) and need to be associated with the HMI, such as positive jog, negative jog, return point, automatic speed, jog speed, acceleration, deceleration, teach point 1, teach point 2, teach point 3, etc. Define the HMI index variable Index, if Index = 1, the array M[index] represents the storage data of the first servo, if Index = 2, the array M[index] represents the storage data of the second servo, and so on.

[0026] The second step is to make the program of the automation component M1 (servo) related to the HMI into a function block FB_M1, and one of the input pins of this function block is index, so as to realize the encapsulation of the PLC program of the automation component M1 (servo).

[0027] The third step is to put all the screens related to the automation component M1 (servo) on a public page on the HMI, define the interface variable VAR, create an HMI template FB_HMI, and realize the encapsulation of the HMI program.

[0028] The fourth step is to define the HMI index intermediate variable Index_Temp and the HMI index change variable Index_Change. If the index variable Index is not equal to the index intermediate variable Index_Temp, the index change variable Index_Change is turned on, and the value of the index variable Index is assigned to the index intermediate variable Index_Temp. Then the state of the index change variable Index_Change is determined. If Index_Change is not turned on, the corresponding data information of the array M[index] is transmitted to the interface variable VAR. If Index_Change is turned on, the data information of the interface variable VAR is transferred to the array M[index]. In this way, the data of different servos stored in the array M[index] can be called through the index variable index.

[0029] Step 5: Call FB_HMI in the third step in HMI, and assign a value to the HMI index variable index. For example, if there are three automation components M1 (servo), if you want to modify the data of the first automation component M1 (servo), you only need to make a button to call FB_HMI, and assign the index variable index to 1; if you want to modify the data of the second automation component M1 (servo), you only need to make a button to call FB_HMI, and assign the index variable index to 2; if you want to modify the data of the third automation component M1 (servo), you only need to make a button to call FB_HMI, and assign the index variable index to 3. Then call three FB_M function blocks in the PLC program. Their pins are 1, 2, and 3 respectively. At this point, the PLC function block FB_M1 and the HMI program block FB_HMI are completely connected through the HMI index variable Index, so that only one set of interface variables is built for the automation component M1 (servo) on the HMI, and the data of multiple automation components M1 (servo) can be stored.

[0030] Step 6. Make the algorithms of other automation components M2 to Mn required for the project based on steps 1 to 5. Each subsequent project only requires calling the corresponding FB_HMI and FB_M. There is no need to reprogram the HMI or add variables again.

[0031] 1. After the entire algorithm and template are completed, a lot of HMI and PLC programming time can be saved, especially for those larger projects. In PLC, you only need to drag out the corresponding function block and fill in the value of the index variable index. At the same time, HMI only needs to call the completed component template and assign the same value to the index variable index. PLC manual and parameter setting procedures, most of the HMI procedures have been completed.

[0032] 2. It helps to standardize and normalize the program. Once the HMI template and PLC function block are finalized, the entire program framework is finalized. Even if different people use it, the HMI and program framework are unified.

[0033] 3. Reduced HMI cost. According to the previous programming model, if a project has dozens of servos, cylinders, and inverters, there are thousands of variables between HMI and PLC. Low-performance HMI will be stuck and cannot meet project requirements, so expensive high-performance HMI can only be selected. After adopting this algorithm, there is only one servo, one inverter, and one cylinder for PLC and HMI interaction variables. All other variables are stored in the PLC array, so it is entirely possible to choose an economical HMI.

[0034] The above embodiments are merely descriptions of preferred implementations of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements of the present invention by relevant technical personnel in the field should be extended to the protection scope determined by the claims of the present invention.

Claims

1. A method for integrating PLC and HMI, characterized in that: A storage array M[0...n] of the automation component M is defined to store data of n automation components M; the first to nth automation components correspond to automation components M1...Mn respectively; The first step is to make a structure of all variables related to the automation component M1 and need to be associated with the HMI; define the HMI index variable Index. If Index=1, the array M[index] represents the storage data of the first automation component M1; if Index=2, the array M[index] represents the storage data of the second automation component M2, and so on; The second step is to create a function block FB_M1 for the program of the automation component M1 related to the HMI, and one of the input and output pins of this function block is index to realize the encapsulation of the PLC program of M1; The third step is to put all the M1-related screens on the HMI on a public page, define the interface variable VAR, create an HMI template FB_HMI, and realize the encapsulation of the HMI program; The fourth step is to define the HMI index intermediate variable Index_Temp and the HMI index change variable Index_Change; if the index variable Index is not equal to the index intermediate variable Index_Temp, the index change variable Index_Change is turned on, and the value of the index variable Index is assigned to the index intermediate variable Index_Temp; then the state of the index change variable Index_Change is determined, if Index_Change is not turned on, the corresponding data information of the array M[index] is respectively transmitted to the interface variable VAR; if Index_Change is turned on, the data information of the interface variable VAR is respectively transmitted to the array M[index]; thereby, the data of the n automation components M stored in the array M[index] is called by the index variable index, wherein the data of the n automation components M includes data of different servos; Step 5: Call FB_HMI in Step 3 in HMI and assign a value to the HMI index variable index during the call. Then call the FB_M function blocks corresponding to the number of automation components M in the PLC program. At this point, the PLC function block FB_M and the HMI program block FB_HMI are completely connected through the HMI index variable Index, so that only one set of interface variables is built for the automation component M on the HMI, and the data of multiple automation components M can be stored. Step 6: Store and call the data of other automation components based on steps 1 to 5.

2. The method for integrating PLC and HMI according to claim 1, characterized in that: The automation component M is a servo or a cylinder or a motor or a robot or a stepper or a frequency converter.

3. The method for integrating PLC and HMI according to claim 1, characterized in that: In the first step, make a structure of all variables related to the automation component M1 and need to be associated with the HMI. The variables are positive jog or negative jog or return point or automatic speed or jog speed or acceleration or deceleration.

4. The method for integrating PLC and HMI according to claim 1, characterized in that: In step 5, if the number of automation components M is 3, to modify the data of the first automation component M1, you only need to make a button to call FB_HMI, and assign the index variable index to 1; To modify the data of the second automation component M2, you only need to make a button to call FB_HMI, and assign the index variable index to 2; to modify the data of the third automation component M3, you only need to make a button to call FB_HMI, and assign the index variable index to 3; then call three FB_M function blocks in the PLC program; their pins are 1, 2, and 3 respectively.

Citation Information

Patent Citations

  • Internal memory address conversing method of human-machine interface corresponding to different specifications PLC

    CN101276216A

  • Method for implementing data transmission between PLC of different brands

    CN101393445A