Configure an animation using a State Table
Configure an animation to change the properties of a graphic element, Add-On Graphic, or screen based on the value of an associated tag or expression.
IMPORTANT:
- Do not use any of the following words as a state name:
- 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.
- state
- states
- properties
- readonly
- parent
- type
- name
- id
- persisted
- objectname
When renaming a graphic element that is referenced by a
State Table
or a Color Table
, change the reference to reflect the new graphic element name. View Designer
does not automatically update the references with the new name.- Do not configure aState Tablethat causes its states to act on each other in an infinite loop. Doing so may cause slow performance.
- Continual tag writes using State Enter or State Exit events may cause slow performance. It is recommended to not continually write more than 10 tags per second.
To configure an animation using a State Table
- Select the graphic element, Add-On Graphic, or screen to animate.
- In the Number of states field, enter or select the desired number of states. For example, to animate three states (such as idle, running, and stopped) type or select the number 3.
- On thePropertieswindow, click theAnimationstab.
- ClickAdd Animation > State Table.
- In theNamebox of theState Table Definitiondialog box, enter a name for theState Table.
TIP:The maximum 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. TheState Tablecard appears in theAnimationstab of thePropertieswindow.
- In theExpressionbox on the card, selectSelect tag
- Edit the expression, if necessary, to define the condition to drive the animation. On the HMI device, the result of this expression is compared to the values of the expression and changes the properties.
- For each state, complete the following:
- Expression Value. Type the value, range of values, or string value (in surrounding quotation marks) to trigger the property changes for the state.TIP:Tips:
- 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.
- Expressions can contain Unicode characters.View Designersupports Unicode characters that appear in the Arial Unicode MS font.
- When inserting text that contains Unicode characters in a graphic element, selectArial Unicode MSin theFontNameproperty of the graphic element. Supported Unicode characters appear on the HMI device.
- State Name.Enter the name of the state (for example, Idle, Running, Stopped).
- Property values.For color-related properties, 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.TIP:Tips:
- Property values do not support bindings or expressions.
- To display and edit the entireState Table, selectOpen table editor
.
- Changes are saved automatically.
Provide Feedback