Animation Mode for 3D Dynamics
All dynamics have some properties in common. For example: all dynamics are based on a DataSource and ActiveWhen properties. In the DataSource property you specify the source of input for the dynamic; and in the ActiveWhen property you specify the conditions under which the dynamic is active. Of particular interest is the AnimationMode property, which has two choices: Discrete and Analog. The mode you use depends on the data source. You can also include information about a dynamic in runtime tool tips.
Analog Mode
If the dynamic is based on the unfettered input from a data source, choose Analog. The data source might directly determines the ongoing location, position, or size of an animated object. This is for animation in direct response to data source input, either based on a user’s manipulation of a slider, or values being returned from a global positioning system (GPS).
In Analog mode, you can enter the LowLimit and HighLimit properties.
Discrete Mode
If the dynamic happens only as the result of a condition, choose Discrete. For example, a door can be hidden when the runtime user clicks the doorknob; an alarm can change color when a sensor exceeds a certain value. Discrete mode requires that you specify the following additional properties that control how the animation works:
-
A StartDelay is the time (in milliseconds) before the animation starts, basic on a specified data source such as an expression, a local variable, or an OPC tag. For example, the animation doesn’t start until the sensor in an oven registers a specified temperature. Or the animation doesn’t start until a runtime user clicks a Start button on the display.
-
Use Duration to specify the time (in milliseconds) it takes to complete the animation. You can use an OPC tag so that the duration is determined by an outside source. You can also use a local variable, an expression, or a script. If you want the initial reading of the value to be disregarded (you don’t want the initial reading to start the animation), set the SkipInitialDuration property to True.
-
AccelerationRatio and DecelerationRatio is the percentage of the dynamic’s duration that is to be spent accelerating or decelerating.
-
AnimateWhenTrue runs the dynamic when the data source returns a value that evaluates to True or 1.
-
ReverseAnimateWhenFalse runs the dynamic in reverse when the data source returns a value that evaluates to True or 1.
-
AutoReverse runs the dynamic to its end and then runs it backward, creating an infinite loop.
-
RepeatCount is the number of times an animation is performed, or choose Infinite.
-
FillBehavior sets the behavior of the animation at the end of its motion, including repeats. Options are HoldEnd or Stop.
-
FreezeWhenNotAnimated – False makes the dynamic go to the default state when it ends; True makes the dynamic stay in its last state when it ends.
Tool Tips
You can include information about a dynamic in runtime tool tips. A tool tip is text that displays when the runtime users holds the cursor over the dynamic object. To add information about the dynamic to the object’s tool tip set:
-
ToolTip property to True.
-
ShowDescription to True to include the dynamic’s description.
-
ShowDataSourceName to True to include the name of the dynamic’s data source.
-
ShowDataSourceValue to True to include the data source’s current value.
-
ShowErrorInformation to True to include dynamic errors in the tool tip.
See also: