What types of variables are used in operator panels? | HMI programming course. Part 5.


During the course you will learn, among others:

  • what are variables and what are they used for,
  • what types of variables are available in operator panels,
  • how to assign names to variables used in the application.

In the previous article from the series "How to design a graphical interface? Basic graphic objects used in HMI systems | HMI panel programming course episode 4” you learned how to configure the most frequently used graphic objects, such as: tank, valve, bar chart, signal lamp or pipeline. In this part of the course, you will learn what variables are and how to use them in the operator panel application.

Types of variables you can use in the HMI application

If you have ever programmed a PLC controller or an HMI operator panel, you should already be familiar with the topic of variables. Variables are parameters that we modify through a control program or operator action to control a machine or process. Each variable is assigned a certain memory area (register) in which its value is stored. Manufacturers of operator panels use their own markings for registers, there are no standards, but memory types and purposes are universal. For Astraada HMI panels it looks like this:

  • $Un - standard registers for use by the user,
  • $Nn - battery-backed registers (their values are saved in the event of a power failure),
  • $Sn - system registers, store data necessary for the proper operation of the application,
  • $In - indexed registers, used for indirect addressing,
  • $Jn - indexed registers, 32 bits,
  • $CBn - block registers, used to store data from defined command blocks,
  • $GUn - standard registers to be used by the user group,
  • $GNn - battery-backed registers for a group of users (their values are remembered in the event of a power failure).

Adding variables in practice

Start this part of the course by opening the most recently saved application and in the menu on the left, select the item with variables - Tags. The Tag Table window will appear, where you can create new variables and give them a name.

Right-click, select Internal Memory and add a subdirectory by selecting Add Subgroup and name it VALVES. Then, add the following variables to the newly created folder.

Assign the created variables to the appropriate graphics on the base screen. To do this, double-click on the first (upper) valve, which is located at the connection between the main tank and the red paint tank, marked with the letter R. Then, select the Select Tag option next to the Monitor Address window and select the variable named ZAW_R. Confirm the selection of the variable by pressing the Select button and clicking OK, and then perform the same operation for the second valve. This time, select the ZAW_OFF tag, which denotes the variable monitored by the exhaust valve.


In this episode, you learned about variables and how to use them in programming operator panels. In the next episode of the course, you will learn how to write scripts and use macros in an HMI panel program.

If you have any questions at this stage of the course, write them in a comment - we will be happy to answer :)


In the next part of the course „What are macros and how to use them in an HMI application? | HMI panel programming course episode 6" you will learn:

  • how to create a new script
  • how to use the IF..ELSE conditional statement
  • how to configure a time macro

Authors:
Paweł Podsiadło
Ewelina Niziołek