SoCounter

InventorModule
genre InventorEngines
author Silicon Graphics Inc
package MeVisLab/Standard
definition inventor.def

Purpose

This engine is a counter that outputs numbers, starting at a minimum value, increasing by a step value, and ending with a number that does not exceed the maximum value. It outputs the next number whenever the Trigger is touched. When the maximum number is reached, it starts counting from the beginning again.

At any time the counter can be reset to a specific value by setting the reset input field to that value. The next time the counter is triggered it will start counting from there. Note that the counter will always output numbers based on the min, max and step values, and setting the reset value does not affect those input fields.

  • If the reset value is not a legal counter value, the counter will still behave as though it is.
  • If reset is greater than max, the counter is set to max. If reset is less than min, the counter is set to min.
  • If reset is between steps, the counter is set to the lower step value.

Each time a counting cycle is started, the Sync Out output is triggered. This output can be used to synchronize some other event with the counting cycle.

Windows

Default Panel

../../../Modules/Inventor/InventorBase/mhelp/Images/Screenshots/SoCounter._default.png

Parameter Fields

Field Index

Max: Integer
Min: Integer
Output: EngineOutput
Reset: Integer
Step: Integer
Sync Out: EngineOutput
Trigger: Trigger

Visible Fields

Min

name: min, type: Integer, default: 0

Minimum value for the counter.

Max

name: max, type: Integer, default: 1

Maximum value for the counter.

Step

name: step, type: Integer, default: 1

Counter step value.

Trigger

name: trigger, type: Trigger

Go to the next step.

Reset

name: reset, type: Integer, default: 0

At the next trigger, reset the counter to the specified value.

Output

name: output, type: EngineOutput, persistent: no

Counts min-to-max in Step increments.

Sync Out

name: syncOut, type: EngineOutput, persistent: no

Triggers at cycle start.