Configure an animation using a Color Table
Configure an animation to change the color of a graphic element, Add-On Graphic, or screen based on the value of an associated tag or expression. Color animation can be applied to any color property of a selected element.
IMPORTANT:
- Do not use aState TableorColor Tableto modify a property that is already bound to a tag or expression. This can cause undesired results. Property values change based on which input modifies the property first. There is no way to determine the order of inputs.
- Modifying a property across multipleState TablesorColor Tablescan cause undesired results. Property values change based on which input modifies the property first. There is no way to determine the order of inputs.
When renaming a graphic element that is referenced by aState Tableor aColor Table, change the reference to reflect the new graphic element name.View Designerdoes not automatically update the references with the new name.
To configure an animation using a Color Table
- In the
- Select the screen or graphic element to animate.
- On thePropertieswindow, select theAnimationstab.
- SelectAdd Animation > Color Table.
- In theNamebox of theColor Table Definitiondialog box, enter a name for theColor Table.
Number of statesbox, enter or select the desired number of states. For example, to use color to indicate two different states, such as running or stopped, type or select the number 2.TIP:The maximum supported number of states for one element on a screen is 2500.If any screen in the project exceeds 42000 states across all its elements, it is not possible to later convert the project to a newer version. - Select the properties to affect and selectOK.TheColor Tablecard appears in theAnimationstab of thePropertieswindow.
- In theExpressionbox on the card, selectSelect tag
- Edit the expression, if necessary, to define the condition that will drive the animation. On the HMI device, the result of this expression is compared to theExpression Values(entered in the next step), and the appropriate color changes are applied.TIP:An Expression Value can be:
- An integer number.Any positive or negative number up to 15 digits.
- A floating point number.Any positive or negative number up to 15 significant digits in the range of
1.7 x 10
±308. - A string.Any sequence of alpha-numeric characters enclosed in quotation marks.
- In theColor Table, for each state, complete these boxes:
- Expression Value. Type the value, range of values, or string value (in surrounding quotation marks) to trigger the color change for the state.
- Color Value.The actual column titles correspond to the color properties selected. Type the Hex value in the format #RRGGBB. R, G, and B are Hex digits from 0 through F and represent the color channel values for red, green, and blue. For example, #ffff00 produces yellow. Alternatively, select the down arrow or color swatch to open theColor Picker, and select or create a color.
Provide Feedback