Example: Restricting the Rotation to Values in the Collection

Consider the knob indicator's action and its impact on the Data Entry label and the Process Point. The knob’s indicator has its own Rotation action dynamic. A runtime user can move the indicator’s position to any spot on the dial, which changes the value of the data source localsim::var1.

 

Keep in mind that we assigned the indicator’s dynamic StateField to True and defined a collection of predefined state values; the only states whose positions show up in the Data Entry label or Process Point are the 0 point and the 100 point, because those are the only two positions in which it is possible to exactly place the indicator so that the var1 value is limited to two decimal places.

 

If we want to restrict the knob’s indicator to the values that are part of the collection that we defined, there are two ways to do this:

To configure a series of discrete switches: Remove the Rotation dynamic from the knob, then create different versions of the knob, one version for each position (0, 15, 40, 50, 75, and 100) on the dial. Center all of the versions over each other. Then define a Toggle action for each one; this turns each version of the knob into a switch. The Toggle action you define should display the next version of the knob, in sequence, with each click of the knob at runtime. Unfortunately, this method uses several copies of the same symbol and as such increases the displays memory consumption.

or

To configure a click knob: Restrict the indicator to integer values; as a result, runtime users can drag the indicator to the desired value.

 

Examples:

Defining a Collection of States for a 3D Rotating Dial

Creating a 3D Click Knob