HMI Tags Created From Controller Variables
For animating graphical objects on HMI pages and controlling the automation application via the HMI, data must be exchanged between the HMI application and the controller. This data exchange is realized by HMI tags. HMI tags created from controller variables are visible to every HMI station (HMI client). If a controller variable changes, the change affects the variable of all HMI clients, i.e., each client using this variable has the same value for this variable.
HMI tags for controller variables can be created by:
- Assigning an HMI tag to a global IEC 61131-3 variable.
- For PLCnext Technology controllers: selecting the HMI checkbox in the variables properties table for local variables in function block and program POUs. With set checkbox, all instances of the POUs expose the local variable as HMI tag which can then be used in the HMI application.
Further Info
For information how to create local HMI tags, see the topic "Local HMI Tags". |
HMI tags for global IEC 61131-3 variables
Note
Regarding their use in HMI pages, the following applies to variables of the Safety PLC:
- Safety-related IEC 61131-3 variables cannot be used in an HMI page as no HMI tags can be created and assigned to variables of a safety-related data type in the Safety PLC Data List.
- It is possible to create HMI tags for exchange variables, i.e., for Safety PLC variables of a standard data type which are assigned to a global variable of the standard PLC.
|
All HMI tags created for global IEC 61131-3 variables are listed in the Data List of the 'HMI Webserver' node in the PLANT. The Data List is automatically synchronized when creating an HMI tag for a global IEC variable in any other 'Data List'.
Creating an HMI tag for a global IEC variable is possible:
- in the Data List of the 'HMI Webserver' node.
- in the Data List of the 'IEC 61131-3' node
and the 'Safety PLC' node and in any other device-related Data List.
HMI tags can be created for both declaration types: global and instance-related I/O variables.In the Data List of the Safety PLC, HMI tags can only be created for exchange variables, i.e., for an assignment between a standard variable of the Safety PLC and a global variable of the standard PLC.
Example:
- when adding dynamics to the property of an HMI object (see the topic "Adding Dynamics").
- by importing data items from a .csv file (comma-separated values) to the Data List.
Note
Except for controllers with specific functions such as fast counters or fast inputs, process data items and HMI tags cannot be assigned to system variables. |
What do you want to do?
How to add/remove an HMI tag in the 'HMI Webserver' Data List
- In the Data List, select a line above which the new HMI tag is to be inserted and click the
button on the toolbar. Alternatively, go to the end of the table, left-click into the empty 'Enter ... here' input field and enter the name of the new HMI tag.
- If desired, edit the default HMI tag name by clicking into the table cell and entering the desired name. The 'Function' field can be used to enter a descriptive text for the HMI tag.
- To declare the HMI tag as read-only, activate the 'Read Only' checkbox. A read-only HMI tag may only be read and not written in the HMI page.
- To assign a controller variable and process data item to the HMI tag, click into the respective cell of the 'Variable (PLC)' or 'Process data item' column and use the Role Picker to select the desired variable and process data item. (The Role Picker only provides data items for selection which are allowed to be assigned to the HMI tag.)
How to add/remove an HMI tag for a global variable in the Data List of the 'IEC 61131-3' node, 'Safety PLC' node, or controller node
- To add an HMI tag and assign it to a global variable ('Global' declaration) or an instance-related I/O variable ('Instance' or 'Program' declaration) at the same time, select the corresponding variable in the respective 'Data List' and click the 'Add a new HMI Tag' button on the 'Data List' toolbar. Alternatively, select 'Add HMI Tag' from the variable's context menu. The command is only available for variables which have no HMI tag assigned.
Note
Currently, no direct assignments to HMI tags are possible in the Safety PLC Data List. However, HMI tags can be created for exchange variables (Safety PLC standard variable assigned to a controller variable). |
The name of the new HMI tag is derived from the variable name and can be modified (see step 2).
- If desired, edit the default HMI tag name by clicking into the table cell and entering the desired name. The 'Function' field can be used to enter a descriptive text for the HMI tag.
- To declare the HMI tag as read-only, activate the 'Read Only' checkbox. A read-only HMI tag may only be read and not written in the HMI page.
Note
All modifications on the HMI configuration are immediately applied to all other locations where the corresponding HMI tag is listed. |
Further Info
HMI tags can also be assigned to global IEC variables ('Global' declaration) or instance-related I/O variables ('Instance' or 'Program' declaration) in the HMI editor. For detailed information, refer to the topic "". |
 | To remove an HMI tag from a global IEC variable, right-click the variable and select 'Remove HMI Tag'. Alternatively, select the variable and click the 'Delete HMI Tag' button on the 'Data List' toolbar.
Note
When you remove an HMI tag in the 'Data List' table from a variable and the variable is connected to a dynamic property of an HMI object, a corresponding error message is reported in the message window. Double-clicking the message opens the HMI page with the respective HMI object in the editors area. To remove the error, either delete the linkage between variable and dynamic property or assign another variable to the property. |
|
How to import data items from a .csv file
- In the respective Data List, click the
button on the toolbar. Alternatively, select 'Import CSV...' from the context menu.
- In the file open dialog, select the .csv file you want to import and click 'Open'. The progress of the import is displayed in the MESSAGES window. The log entries provide, amongst other, information on the number of imported process data items, variables, HMI tags etc.Observe the following when importing data items:
- Only variables (standard and safety-related variables) and HMI tags are imported. Process data items assigned to variables are not imported.
- The data items are imported into the pool of data items (contains the data items of all Data Lists). This means data items which do not belong to the active Data List are also imported and added to the respective Data List.Example: if the .csv file contains safety-related variables and you perform the import in the Data List of the 'IEC 61131-3' node (contains only variables of the standard controller), the safety-related variables are imported into the Data List of the Safety PLC node.
- Existing data items are not overwritten or modified. Only those data items are imported which are not yet contained in the Data List.
- Data items with invalid properties, for example, invalid data types are imported but marked as errors in the Data List (a corresponding entry is also shown in the MESSAGES window).
- Data items with invalid variable names are not imported and the process is aborted.
Via the
button or the 'Export CSV...' context menu item you can export the Data List contents to a .csv file.