public class SoCounter extends SoEngine
trigger input 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.
reset is greater than max, the counter is set to max.
reset is less than min, the counter is set to min.
reset is between steps, the counter is set to the lower step value.
Each time a counting cycle is started, the syncOut output is triggered. This output can be used to synchronize some other event with the counting cycle.
File format/default:
Counter {
| min | 0 |
| max | 1 |
| step | 1 |
| trigger | |
| reset | 0 |
See also:
Inventor.ConstructorCommand| Modifier and Type | Field and Description |
|---|---|
SoSFShort |
max
Maximum value for the counter.
|
SoSFShort |
min
Minimum value for the counter.
|
SoEngineOutput |
output
(
SoSFShort ) Counts min-to-max in step increments. |
SoSFShort |
reset
At the next trigger, reset the counter to the specified value.
|
SoSFShort |
step
Counter step value.
|
SoEngineOutput |
syncOut
(
SoSFTrigger ) Triggers at cycle start. |
SoSFTrigger |
trigger
Go to the next step.
|
VERBOSE_LEVEL, ZeroHandle| Constructor and Description |
|---|
SoCounter()
Constructor.
|
copy, getByName, getOutput, getOutputNamecopyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaultsdispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable, touchgetAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreadspublic final SoSFShort min
public final SoSFShort max
public final SoSFShort step
public final SoSFTrigger trigger
public final SoSFShort reset
public final SoEngineOutput output
SoSFShort ) Counts min-to-max in step increments.public final SoEngineOutput syncOut
SoSFTrigger ) Triggers at cycle start.Generated on July 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com