Tutorial: design a dynamic image in relation to the status of an alarm¶
Introduction
This tutorial shows how to configure in a Advanced SVG Image Advanced SVG image a logic whereby an alarm event on a section of the machine causes the color of a section of the image to change.
Prerequisites
An alarm configured in the project
- An image in SVG 1.2 Tiny format imported in the project and associated with an Advanced SVG image object.
Note
the graphical parts of interest in the image must be characterized by a unique identifier (XML id attribute).
Set the Key-Value converter to color part of the image and the status
Click the Advanced SVG image object.
In the SVG element properties collection, in the property relating to the part of the image to be connected to the alarm, click next to Value, then click Advanced: the dynamic link editor opens.
Click > Key-Value converter.
Set the Enabled variable of the desired alarm as the source (Source DynamicLink), then click next to the converter name: the converter editor opens.
To set the key/value pair related to the alarm disabled status, in the Keys column click UInt32 > Show all, the select the Boolean data type, then click Select: the False key appears in the table, which corresponds to the alarm disabled status.
In the Values column, click String > Show all, then select the**Color** data type, then click Select: the hexadecimal value #00000000 and appear in the table.
Set the desired color for the alarm disabled status.
To set the key/value pair related to the alarm enabled status, click > Key-value convertor.
In the key field, click , then select True.
In the value field, set the desired color for the alarm enabled status.