Diagram shapes can be configured to change color dynamically based on the value of tag properties. This can be useful for calling out important status changes or making required user actions more obvious. While the colors can be configured to react to tag alarm values, there is also a separate diagram feature specifically for alerting users to tag alarms. This feature can also be used in conjunction with text rules. Note that this feature does not work on machine shapes, and the colors update at 1-second intervals.
To set up these dynamic color changes, select a shape on the diagram canvas, then click the 'Configure Shape Coloring Rules' button in the left panel:

That will open a popup window to configure the shape's coloring rules. Click the green + icon on the right to create your first rule or add additional rules to an existing list:

Each rule is made up of several parts:
-
Source Tag Name: The tag this rule is going to be based on to determine if the shape should change color. Multiple rules for the same shape can look at different tags. If this is a 'Tag Value' shape, the tag(s) watched by the coloring rules don't have to match the one the shape is displaying.
-
Source Tag Parameter: The parameter of the source tag set above that this rule will look at. This is chosen from a list of parameters like Value, alarm limits, etc. Note that some of the options in this dropdown depend on features being enabled on that tag. For example, choosing to base a rule on an alarm limit value will not work if that alarm limit isn't enabled on the tag.
-
Data Type: This is the data type (string, float, boolean, etc) of the Source Tag Parameter being monitored for this rule. In most cases, Prophecy will automatically select the correct data type to match the value returned by the Data Acquisition Engine. In the case of 'Value', the user will have to select the data type, as that can vary by tag. This setting determines which Conditions are available (see below). If this is set incorrectly for the 'Value' tag parameter, the rule may not work properly.
-
Condition: This is the comparison the diagram will make between the value it pulls out of the source tag and the comparison value you configure below. The available options vary based on the Data Type set above.
-
Value: The Source Tag Parameter value you configured the rule to use can be compared to this 'hard-coded' value, using the Condition you configured above. The allowed values in this field will vary based on the Data Type chosen above. For example, you will not be able to enter 'Bob' for the comparison value of an integer tag value. This field will be disabled if a Target Tag Name is specified (see below).
-
Target Tag Name: Rather than comparing the source value to the value that can be specified above, you can compare it to a value from another tag. Choose the name of that tag here. This field will be disabled if a pre-defined value is specified above.
-
Target Tag Parameter: The parameter of the target tag set above that this rule will look at. This is chosen from a list of parameters like Value, alarm limits, etc. Note that some of the options in this dropdown depend on features being enabled on that tag. For example, choosing to base a rule on an alarm limit value will not work if that alarm limit isn't enabled on the tag.
-
Data Type: This is the data type (string, float, boolean, etc) of the Target Tag Parameter being monitored for this rule. In most cases, Prophecy will automatically select the correct data type to match the value returned by the Data Acquisition Engine. In the case of 'Value', the user will have to select the data type, as that can vary by tag. If this is set incorrectly for the 'Value' tag parameter, the rule may not work properly. The editor will not allow this data type to be set to one that is incompatible with the Source Tag data type above. For example, you cannot configure a rule to compare a boolean to an integer.
-
Color: What color to set the shape background to if the comparison between the tag parameter value and the condition value (pre-defined or tag-based) you configured passes the condition you chose.
-
Priority: This sets the order in which the rules will be evaluated when choosing which color the shape background should be (from lowest to highest). This can be useful for setting 'overrides' if there are special conditions that would require a different color than normal.
When creating rules, make sure that you cover all possible values for the tag(s) you will be comparing. If the compared values don't meet any of the configured comparisons, the shape will stay the last color that qualified, even though that rule may not be true anymore. For example, in the image below the first two rules use 'greater than' and 'less than' for comparisons. Without the last rule for the case of the two tags being equal, the shape color might not always be accurate.
