1.10.7.2 Animation trigger
Animation trigger
As of WinCC V7.0, the "animation cycle" trigger art is available for the dynamization of objects
with
VBS. The animation cycle allows you to switch actions on and off in Runtime and to change
the time, in which the trigger is executed. The following cycles are possible:
Name Cycle Name Cycle
CycleTime125ms 125 ms CycleUser1 User cycle 1
CycleTime250ms 250 ms CycleUser2 User cycle 2
CycleTime500ms 500 ms CycleUser3 User cycle 3
CycleTime1s 1 s CycleUser4 User cycle 4
CycleTime2s 2 s CycleUser5 User cycle 5
CycleTime5s 5 s CyclePicture Picture cycle
CycleTime10s 10 s CycleWindow Window Cycle
CycleTime1min 1 min
CycleTime5min 5 min
CycleTime10min 10 min
CycleTime1h 1 h
You use the trigger by writing an action and using the "animation cycle" trigger type. This action
can be activated or deactivated in Runtime with the "ActivateDynamic" and
"DeactivateDynamic" methods. The methods are described in the VBS reference of the WinCC
Information System. The correct syntax of the methods deviates from the description in the
VBS reference and is shown in the following two examples.
With a VBS action at the determined property "Position X" (left), the rectangle is shifted 5 pixels
to the right. Select the "animation cycle" event in the action as the trigger.
Enter the following as the VBS action in the "Left" property:
item.Left = item.Left + 5
You can switch the action on and off at the property "Position X" with the following VBS actions.
The trigger is switched on in Runtime with the "ActivateDynamic" method:
Dim obj
Set obj = ScreenItems.Item("Rectangle1")
obj.ActivateDynamic "Left", "CycleTime1s"
The trigger is switched off in Runtime with the "DeactivateDynamic" method:
Dim obj
Set obj = ScreenItems.Item("Rectangle1")
obj.DeactivateDynamic "Left"
Note
The WinCC tags remain requested even when the trigger is switched off.
VBS for Creating Procedures and Actions
1.10 Creating and Editing Actions
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
73