22.5.Using variables in animations and effects
You can use declared view variables directly in animations and effects. To link the view variable with an animation, use the equation editor like with regular PLC tags.
1. Let’s show the value of the Value Memory Variable in a text element in your view.
2. Open the Script window.
3. In the Value Memory tab of the Variables window, create ‘InternalVariable’ with a default value of 10.0.
4. Switch back to the view you are editing.
5. Create a text element in your view, click on it, and create an animation with a memory variable by typing “=InternalVariable” or selecting memory variable with the equation editor.
Specific mySCADA functions
If you click on the category, you will see the list of all available functions:
Now select the function you are interested in, and you will see a description and help on the right side of the window.
- TIP: You can drag the selected function and drop it into your source code.
As you can see from the function list, most of the functions deal with your graphical objects. To be able to address your graphical object, you need to know its ID. Every graphical object in your view has its unique ID that can be found in properties. Click on the graphical object and then look in Properties – ID:
You can control animations of your graphic object directly in the script with specific mySCADA functions. To set the value of the element directly in the script, use the following function: