

In many scenarios, there are numerous similar devices that need to display and control device parameters through sub-screens in the HMI. If a sub-screen is created for each device in the HMI, it will lead to a lot of repetitive work and make the HMI program lengthy.
Therefore, drawing a panel (Faceplate) for similar devices in the HMI program and loading the same panel through a popup screen to display different device parameters will greatly reduce the configuration workload.
This example will introduce how to display PID adjustment parameters and device start/stop signal parameters for 3 groups of devices by calling the same panel in the popup screen, and how to set/reset operations for Bool variables using switch buttons.
1. Create relevant parameter variables for multiple similar devices in the HMI (PID data type defined as UDT PLC data type in the PLC program) , as shown in Figure 01
2. Create pointer index variables and pointer variables connected as internal variables in the HMI, as shown in Figure 02
3. Set index variables for pointer variables and map the index values to actual variables. As shown in Figure 03
When the index variable PID_index is 0, P_Common is the value of variable PID_DB_PID1.P;
When the index variable PID_index is 1, P_Common is the value of variable PID_DB_PID2.P;
When the index variable PID_index is 2, P_Common is the value of variable PID_DB_PID3.P.
Set the same for pointer variables “I_Common”, “D_Common”, and “Start_Common”, mapping the index values to their corresponding actual variables.
4. Create a panel in the library, as shown in Figure 04
5. Add dynamic properties in the panel, as shown in Figure 05
6. Add I/O fields for parameter display and input in the panel, and associate the process values of I/O fields to corresponding dynamic properties, as shown in Figure 06
7. Add a “Start/Stop” switch to set/reset Bool type variables to achieve the effect of starting/stopping the device. For pointer variables, operations using functions are not supported, such as “set variable”, “set bit”, “invert bit”, etc.
Therefore, a switch is needed to set and reset Bool type variables. The operation of the switch on Bool type variables actually performs an inversion operation, so only one switch is needed to achieve the start/stop operation of the device. However, some customers prefer to separate the start and stop operations with 2 buttons, so the following will introduce two methods to implement starting/stopping operations with 1 button and 2 buttons. Users can choose one of the methods as needed in practical applications.
Add 1 switch and associate the variable to the panel property “Start”, set the mode to “toggle by text”, set ON text to “Stop”, and OFF text to “Start”. As shown in Figure 07
Add 2 switches following the same operation as shown in Figure 07. Just set one switch’s ON and OFF text to “Start”, and the other switch’s ON and OFF text to “Stop”, as shown in Figure 08
Select “Switch_2”, add animation, choose “Controllability”, set as shown in Figure 09
Select “Switch_3”, add animation, choose “Controllability”, set as shown in Figure 10
After completing the above operations, click “Publish Version” in the panel type editor.
8. In the popup screen management under the HMI screen, add a new popup screen named “PID_Popup”, adjust the screen to a suitable size, and add “PID_FP” from the project library to this popup screen, as shown in Figure 11
9. Associate dynamic properties to pointer variables in the interface options page of the panel instance, as shown in Figure 12
10. Add a “Close” button in the popup screen, and add the “Show Popup Screen” function in the “Click” event, as shown in Figure 13
11. Add a button in the main screen to open the popup screen, and add a function in the button’s click event, as shown in Figure 14
Actual Running Effect:
Disclaimer:This article is reproduced from the internet, copyright belongs to the original author. If there are copyright issues, please contact us in time to delete it, thank you!
Complete question bank for the 2022 Electrician Beginner Exam (with answers)
3 must-have tools for electrical workers, easily accessible via WeChat!
[Collection] The “path” of a ten-year-old electrician, the secret to earning over ten thousand a month!
Which of the five major electrical drawing software (CAD, Eplan, CADe_simu…) do you pick?
The latest electrical CAD drawing software, with a super detailed installation tutorial!
The latest electrical drawing software EPLAN, with a super detailed installation tutorial!
Common issues for beginners using S7-200 SMART programming software (with download links)
Comprehensive electrical calculation EXCEL spreadsheets, automatically generated! No need to ask for electrical calculations!
Bluetooth headphones, electrician/PLC introductory books available for free? Come and claim your electrical gift!
Basic skills in PLC programming: Ladder diagrams and control circuits (including 1164 practical cases of Mitsubishi PLC)
Still can’t understand electrical diagrams? Basics of electrical diagram reading, simulation software available for quick hands-on practice!
12 free electrician video courses, 10GB software/e-book materials, 30 days of free electrician live classes are available!
