public class SoOneShot extends SoEngine
timeIn
input is connected to the realTime global field. It can, however, by connected to any other time source.
The timer is started when the trigger
input is touched. It then runs for the specified duration
, and updates the timeOut
output with the time that has elapsed. During that time, the ramp
output is also updated. The ramp
output starts at 0.0 at the beginning of the cycle, and linearly increases until it reaches 1.0 at the end of the cycle.
You can disable the timer by setting the disable
input to true. The output value remains 0.0 while the timer is disabled. If the timer is disabled in the middle of a cycle the output values will be set to 0.0.
The flags
input contains control flags. Using the flags you can set the timer to be retriggerable in the middle of a cycle, and set the output values to stay high after the cycle has been completed. By default, these flags are not set.
File format/default:
OneShot {
duration | 1 |
trigger | |
flags | () |
disable | false |
timeIn | <current time> |
See also:
Modifier and Type | Class and Description |
---|---|
static class |
SoOneShot.FlagsType
Flags.
|
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFBool |
disable
If true, the timer is disabled.
|
SoSFTime |
duration
Duration of the active cycle.
|
SoSFBitMask<SoOneShot.FlagsType> |
flags
Control flags.
|
static int |
HOLD_FINAL
Deprecated.
Use
SoOneShot.FlagsType.HOLD_FINAL instead. |
SoEngineOutput |
isActive
(
SoSFBool ) Is true during the active cycle. |
SoEngineOutput |
ramp
(
SoSFFloat ) Ramps linearly from 0.0 to 1.0. |
static int |
RETRIGGERABLE
Deprecated.
Use
SoOneShot.FlagsType.RETRIGGERABLE instead. |
SoSFTime |
timeIn
Running time.
|
SoEngineOutput |
timeOut
(
SoSFTime ) Elapsed time from the start. |
SoSFTrigger |
trigger
Start the cycle.
|
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoOneShot()
Constructor.
|
copy, getByName, getOutput, getOutputName
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable, touch
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int RETRIGGERABLE
SoOneShot.FlagsType.RETRIGGERABLE
instead.@Deprecated public static final int HOLD_FINAL
SoOneShot.FlagsType.HOLD_FINAL
instead.public final SoSFTime duration
public final SoSFTrigger trigger
public final SoSFBitMask<SoOneShot.FlagsType> flags
public final SoSFBool disable
public final SoSFTime timeIn
public final SoEngineOutput timeOut
SoSFTime
) Elapsed time from the start.public final SoEngineOutput isActive
SoSFBool
) Is true during the active cycle.public final SoEngineOutput ramp
SoSFFloat
) Ramps linearly from 0.0 to 1.0.Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com