Let’s animate the rotation of an Image Widget that we will program to function when the Digital Input switch is in the on position.
Open the configuration we have been working on: PowerVision Essentials Training
Go to the Page Designer Tab and select the I/O Animations Page
Drag an Image Widget onto the design canvas
Name this Image Widget: IW Gear Right
In the Image Widget Properties pane, select gear_white for the Day and Night Images
Using Supplemental 5.3.1, change the Image Properties
Drag another Image Widget onto the design canvas
Name this Image Widget: IW Gear Left
In the Image Widget Properties pane, select gear_white for the Day and Night Images
Using Supplemental 5.3.2, change the Image Properties
Supplemental 5.3.1
Supplemental 5.3.2
Now go to the Programming Tab
Select the _Animations folder and click the +
Select New Activity Program
Rename this Activity Program: Animate Gears
Click and drag a MultiDecision Branch icon (4-way green arrows) onto the canvas
In the MultiDecision Properties pane to the right, for the Variable select IO.Digital Input 1
Under Switch Outputs, click the +
For Output 1
Click Constant Value and type: 0
Click Description and type: DigIn Off
Click the + again
For Output 2,
Click Constant Value and type: 1
Click Description and type: DigIn On
Now Drag a Fire Actions icon (blue rectangle) onto the canvas
In the Fire Actions Properties pane to the right, next to Execute These Actions, click the +
Select Screen Application (Screen) > AnimateRotation
Enter these values for Data
Click OK
Click the + again
Select Screen Application (Screen) > AnimateRotation
Enter these values for Data
Click OK
Click the + again
Select Screen Application (Screen) > Process > (Empty)
Click OK
Now Drag a Stop icon onto the canvas
Click the Control Flow icon (yellow-orange arrow), and create flow between the different items.
You should have an Activity Program that looks similar to this:
In the Programming Tab
Under Programming Items, Select / expand the Input Output Port Manager folder
Select IO.Digital Input 1
Click on <Disabled> next to Fire on change
Select Animate Gears Event (this is the Activity Program that we just created)
Go back to the Page Designer Tab
Create and Load your configuration to test.
When accessing the I/O Animations Page:
- Switching the Digital Input into the up position will now animate the gears in the upper right corner of the screen