This animation can display tag values in a text element.
If you will set animation “show value” on a text element myDESIGNER will automatically fill in type and parameter from tags database (So if you have a tag which is set as type String and parameter Siemens this will be also applied automatically in the animation once you assign the tag to it).
However, especially with Date parameters, you might want to have somewhere displayed only time and somewhere just date so you can change type/parameter whenever you want.
There are 3 available types to be selected:
Value shows the read PLC values in the Decimal, Hexadecimal, Octal, and Binary numerical systems.
By default, Value type shows values in Decimal format. If you are showing a floating-point number, you can specify how the value will be presented by using formatting. For more info about formatting, please see Formatting Numerical values.
String type #
String type reads string data type from the PLC and shows the resulting value as a string. You can specify special conditions such as maximum string length or string type.
The PLC type used in the tag definition selects the string type automatically. You need to specify only the maximum string length
Rockwell family string type. The string is automatically encoded according to the RA standard. Please specify the maximum length of the string. The provided maximum length must not be longer than the definition in PLC.
- Siemens – Siemens family string. Please specify the maximum length of the string. The provided maximum length must not be longer than the definition in PLC.
- General – User-defined. You have complete control of converting a PLC data array into a string. First of all, you should specify the maximum length of the string. The provided maximum length must not be longer than the definition in PLC. Then you can specify which character terminates the string or specify at which position the length of the string is encoded.
- Modbus – Modbus protocol definition does not define the string type. Most of the PLC makers, however, allow the use of the string in Modbus protocol by providing the values in an array. As there is no given standard for use in Modbus protocol, the user has complete control over how the string is defined. It allows you to convert a PLC data array into a string. First of all, you should specify the maximum length of the string. The provided maximum length must not be longer than the definition in PLC. Then you can specify which character terminates the string or specify at which position the length of the string is encoded. If your PLC encodes two characters into one register, please choose 8-bit characters; otherwise, choose 16-bit characters.
- OPC – OPC UA family string. The OPC has defined a standard for reading strings. Please specify the maximum length of the string. The provided maximum length must not be longer than the definition in OPC UA server.
Date type #
Date type enables you to read date value from the PLC and convert it to the date. mySCADA assumes the date is in unix time – the number of seconds since 1 January 1970. You can choose to show only date, only time, or both date and time or displaying Interval
Example of Showing Values from PLC:
1. Let’s assume there are three tags in ControlLogix PLC, representing the water levels – level1, level2, and level3.
2. Create the text elements for these three water levels using the Create Text Element tool.
3. Continue adding the text elements responsible for reading values from the PLC. This process is exactly the same as creating the text elements. The text written in the text element specifies how the value read from the PLC will be formatted on the screen. The format specification is described in the following figure:
- Note: Any value received from the PLC that does not follow the format specification will be automatically transformed to a set format. For example, if the PLC returns a value of 3.47 and the visualization expects only one decimal place with the format (##.#), then the number displayed will be rounded to one decimal place, showing the value of 3.5.
4. Connect the text elements to specific PLC tags.
Click on the text element that should be animated, according to the data received from the PLC. You will see the animations properties in the Properties window. Select the Anim tab in the Show Value animation section; enter the specific tag address from which the text element will read.
- Note: If the entered tag address is invalid, the text will be marked in red.
You can also combine a static text element with PLC values.
5. Upload the view to your supported device – the screen should look like the following:
In the example above, we have used the tags from ControlLogix. You can generally use the tags for all supported PLCs, as long as you use the proper syntax (for a brief description of proper tag syntax, see the chapter Basic Tag Syntax).