Api.SetTrigger method
Configures a trigger.
Namespace: IntervalZero.KINGSTAR.OpcUa.Api
Assembly: IntervalZero.KINGSTAR.OpcUa.Api (in IntervalZero.KINGSTAR.OpcUa.Client.dll) Version: 4.4.0.0
Syntax
public KsError SetTrigger(
int Index
McTriggerSource Source
)
Public Function SetTrigger(
Index As Integer
Source As McTriggerSource
) As KsError
Parameters
Index
Type: int
A trigger index. Indexes are zero based. You can have up to 16 triggers. For example, index 0 uses triggerTime
, index 1 uses triggerIoOutput
, and index 2 uses triggerMotion
.
Source
Type: McTriggerSource
The class that contains the trigger details.
Return value
Type: KsError
A return code of a method.
Remarks
- Sets a trigger using SetTrigger and then queue it before a normal move.
- When modulo axis is enabled, the modulo value is applied to the triggerActualPosition and triggerInterpolationPosition variables, meaning the trigger compares the set value to the modulo position. Users are responsible for converting the trigger value to modulo value to ensure correct comparison with the modulo position calculated at Runtime. For example, if the current trigger value is -210 and the modulo axis has a modulo value of 360, the trigger value should be set to 150 (-210 % 360 = 150).
Usable EtherCAT states
ecatOP
Examples
N/A
See also