Range Selector 3D Animation in Discrete Mode

Creating a Range Selector in Analog animation mode works much the same way as the State Selector Animation in 3D. However, the Range Selector dynamic in Discrete animation mode (which is its default mode) works quite differently.

 

One way to think of a Range Selector dynamic is: use it when you want to start a small “movie” by flipping a switch. In this movie, you have a series of frames that you want to show. For example, you can create one object for each frame, and show the objects in a series. You might want a series of running lights that blink in rapid succession as a way to indicate that an oven is on.

 

When the oven comes on, the running lights in the display begin to blink rapidly in succession. When the oven shuts down, the lights stop. The oven’s state determines whether the animation (in this case, running lights) occurs. With a Range Selector, none of the lights is tied to a state (as they would be with a State Selector); instead, the lights simply create an illusion that cues the runtime user that the oven is on.

 

Note: This topic describes State and Range selector use in 3D displays in GraphWorX64. For information that is specific to 2D displays, refer to Selectors and Animation.

Example: Create the Range Selector dynamic by creating the oven lights blinking when on:

  1. Add a process point, so you can see the values of localsim::var1 at runtime. If you don’t know how to do this, follow these steps:

  2. Add 6 sphere primitives to the 3D viewport and align them. If you need help doing this, refer to Primitives in 3D.

  3. Select the six spheres, then click the Range icon in the Selectors section  of the Dynamics ribbon. This groups the six spheres into a dynamic model called DModeln in the Explorer and adds a Range Selector dynamic for the Dmodel group;

  4. To access the Range Selector dynamic, select the Dmodel in the Explorer, then go to the Dynamics pane.

  5. On the Dynamics pane, go to the Range Selector dynamic's DataSource property and click the ellipsis button , which opens the Data Browser.

  6. Go to the Simulation tab and select localsim:var1 from the list on the left, and click OK to close the Data Browser.

  7. In the Duration property, type 3000. This gives the animation 3 seconds to complete. Make sure the RepeatCount property is set to Infinite. Note that the ActiveWhen property’s default is data != 0, and the AnimationMode property’s default value is Discrete Animator; don’t change these default values.

  8. Click the Runtime button to go into runtime mode.

  9. Type 1 in the process point field then press Enter. This starts the animation because the Range Selector dynamic’s ActiveWhen property triggers the animation when the data source value is something other than 0. To stop the animation, type 0 in the process point field and press Enter.

  10. Click the Configure button to return to configuration mode and experiment with the properties that are available for the Range Selector dynamic.

The dynamic’s 3D properties:

Instead, in 3D you sequence a Range Selector's objects by using the Explorer. Go to the Range Selector's dynamic group in the Explorer and move the objects into the correct sequence; the last object to display goes at the top of the list; the first object to display goes at the bottom of the list.

See also:

OPC Tags