Map Variables to HMI
For HMI "Human-machine interfaces " Also known as computer-human interfaces (CHI), and formerly known as man-machine interfaces, they are usually employed to communicate with PLCs and other computers, such as entering and monitoring temperatures or pressures for further automated control or emergency response, the variable mapping is done in two phases.
- Phase 1 - Tag all of the variables to be exported from the HMI project (see procedure below).
- Phase 2 - Use this mapping file when designing the HMI
The tag operation directly takes place in the Dictionary:
- Open the Variable list editor available in the Dictionary toolbox
Double-click the Dictionary header to display the widget as a popup window in order to have more space.
- In the KVB column, select the variables to map.
-
-
Selecting the variable alone does not guarantee it will be exported.
The POU "Programmable Organization Unit" An application is a list of programs. Programs are executed sequentially within the target cycle according to the order defined by the user and displayed in the Project View must be set to compile as well.
See Ensuring Variables are Exported for more information. -
-
Based on Modbus ModBus is a serial communications protocol and is now the most commonly available means of connecting industrial electronic devices. ModBus is often used to connect a supervisory computer with a remote terminal unit in supervisory control and data acquisition (SCADA) systems. Versions of the ModBus protocol exist for serial port and Ethernet (it is widely used with TCP/IP over Ethernet), the communication is limited to 32 bits. As a consequence:
- Data type conversion can lead to a loss in accuracy:
- LREAL variables are saved as REAL.
- LINT variables are converted to DINT.
- ULINT variables are saved as UDINT.
- LWORD data types cannot be used in the HMI when using KVB.
- This is because variables of this type are not exported, even when selected.
- STRING variable data types are allowed in the HMI when using KVB 2.0 or later
- They are not supported in KVB 1.2.
- STRING variables allow a maximum of 240 characters.
- STRING variables whose size exceed the maximum string length of 240 characters generate a warning message in the Compiler Output window when being exported over Modbus.
- Only the first 240 characters are exported.
- See Compiler Output for more information.
- Variables of types PNCode, ProfilesCode, or instances of UDFB "User Defined Function Block" UDFB can be used as a sub-function block in another program of the application. It is described using FBD, LD, ST or IL language. Input / output parameters of a UDFB (as well as private variables) are declared in the variable editor as local variables of the UDFB cannot be used in the HMI.
- Data type conversion can lead to a loss in accuracy:
-
-
Non-primitive data types which are not exported over Modbus generate a warning message in the Compiler Output window.
See Compiler Output for more information. - Compile the application to create the Modbus mapping file.
- If the set of tagged variables is changed in the dictionary, the text file must be updated by recompiling the project.
- The Modbus variables defined in KAS-IDE "Integrated development environment"
An integrated development environment is a type of computer software that assists computer programmers in developing software.
IDEs normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and a debugger are imported into Kollmorgen Visualization Builder only when KVB is started.
There is no update in real-time between the two applications.
- Open the KVBProject from the Project Tree.
This automatically transfers the tagged variables.
Figure 4-25: Variable Mapping to KVB.
Variables to Export
These types of variables can be exported to the HMI:
- The fundamental data types: BOOL, BYTE, DINT, DWORD, INT, LREAL, REAL, SINT, STRING, TIME, UDINT, UINT, USINT, WORD
- Arrays of supported data types
- Structures that include members of supported data types
Structures to Export
- Arrays of BOOLs such as a structure that includes a BOOL array member and instances of UDFB members.
- An array of structures that include INT and LREAL members
- A structure that includes both instances of UDFB member as well as an embedded structure which includes an INT member and instances of a UDFB member.
- This is because the embedded structure has an INT member and the outer structure can be exported too.
Structure that Cannot be Exported
A structure that includes instances of UDFB or LWORD members only.