HMI implementation
The first thing we need to do is start declaring variables. For this example, we are going to put all the variables that control the HMI in a global variable list (GVL) called vars
for ease of use. For this project, we are going to declare the variables in groups such as LEDs and so on to make it easier for you, the reader, to follow along with the code. The first set of variables we are going to work on are the LED variables.
LED variables
We have three LEDs that are used as temperature indicators and one LED that is used as a power indicator. We are going to create four Boolean variables, as follows:
PROGRAM PLC_PRG VAR //LEDs power : BOOL; safe_temp : BOOL; target_temp : BOOL; END_VAR
The following will show you which variables to map to which LEDs:
- The
power
variable...