Core Motion Inputs

Core Motion type inputs are defined using the CoreMotionEventInput class.

Input

Description

EqualPos

Evaluates to TRUE when the position of the specified axis equals the specified value, and FALSE otherwise.

The condition evaluates to TRUE when one of the following is true.

  • The axis position is between [trigger position + tolerance] and [trigger position - tolerance]. The axis position can be equal to [trigger position + tolerance] or [trigger position - tolerance].

  • The axis position from the last cycle is between [trigger position + tolerance] and [trigger position - tolerance]. The axis position from the last cycle can be equal to [trigger position + tolerance] or [trigger position - tolerance].

  • The axis position is greater than [trigger position + tolerance] and the axis position from the last cycle is less than [trigger position - tolerance]. This indicates that the axis moved past the trigger position between this cycle and the last cycle.

  • The axis position is less than [trigger position - tolerance] and the axis position from the last cycle is greater than [trigger position + tolerance]. This indicates that the axis moved past the trigger position between this cycle and the last cycle.

The tolerance is 0.5 user units by default, but can be changed by setting the enableTolerance option to 1 and setting the tolerance parameter to the desired value.

The following figure shows the movement of the axis position over several cycles. In the cycles for which the condition evaluates to TRUE, the position is shown as a red dot, and in the cycles for which the condition evaluates to FALSE, the position is shown as a black dot.

../_images/WMXDOC_FUNC_TRG_EVENTS_INPUTFUNC_image8.png

Wraparound is considered for Single Turn axes. For example, if the trigger position is 0 and the axis wraps around from position 1 to position Single Turn Encoder Count over one cycle, the condition will still evaluate to TRUE.

Parameters are specified with the EqualPos struct.

GreaterPos

Evaluates to TRUE when the position of the specified axis is greater than the specified value, and FALSE otherwise.

The condition evaluates to TRUE when one of the following is true.

  • The axis position is greater than the trigger position. The condition will not evaluate to TRUE if the axis position is equal to the trigger position.

The following figure shows the movement of the axis position over several cycles. In the cycles for which the condition evaluates to TRUE, the position is shown as a red dot, and in the cycles for which the condition evaluates to FALSE, the position is shown as a black dot.

../_images/WMXDOC_FUNC_TRG_EVENTS_INPUTFUNC_image11.png

Parameters are specified with the GreaterPos struct.

LessPos

Evaluates to TRUE when the position of the specified axis is less than the specified value, and FALSE otherwise.

The condition evaluates to TRUE when one of the following is true.

  • The axis position is less than the trigger position. The condition will not evaluate to TRUE if the axis position is equal to the trigger position.

The following figure shows the movement of the axis position over several cycles. In the cycles for which the condition evaluates to TRUE, the position is shown as a red dot, and in the cycles for which the condition evaluates to FALSE, the position is shown as a black dot.

../_images/WMXDOC_FUNC_TRG_EVENTS_INPUTFUNC_image14.png

Parameters are specified with the LessPos struct.

EqualVelocity

Evaluates to TRUE when the velocity of the specified axis equals the specified value, and FALSE otherwise.

The condition evaluates to TRUE when one of the following is true.

  • The axis velocity is between [trigger velocity + tolerance] and [trigger velocity - tolerance]. The axis velocity can be equal to [trigger velocity + tolerance] or [trigger velocity - tolerance].

  • The axis velocity from the last cycle is between [trigger velocity + tolerance] and [trigger velocity - tolerance]. The axis velocity from the last cycle can be equal to [trigger velocity + tolerance] or [trigger velocity - tolerance].

  • The axis velocity is greater than [trigger velocity + tolerance] and the axis velocity from the last cycle is less than [trigger velocity - tolerance]. This indicates that the axis velocity was equal to the trigger velocity between this cycle and the last cycle.

  • The axis velocity is less than [trigger velocity - tolerance] and the axis velocity from the last cycle is greater than [trigger velocity + tolerance]. This indicates that the axis velocity was equal to the trigger velocity between this cycle and the last cycle.

The tolerance is 0.5 user units by default, but can be changed by setting the enableTolerance option to 1 and setting the tolerance parameter to the desired value.

The following figure shows the change in the axis velocity over several cycles. In the cycles for which the condition evaluates to TRUE, the velocity is shown as a red dot, and in the cycles for which the condition evaluates to FALSE, the velocity is shown as a black dot.

../_images/WMXDOC_FUNC_TRG_EVENTS_INPUTFUNC_image9.png

The trigger velocity is specified as a signed value. A negative trigger velocity will trigger for negative axis velocities (axes traveling in the negative direction). The enableUnsigned option can be set to 1 to specify the trigger velocity as an unsigned value that will trigger for axes traveling in either direction.

Parameters are specified with the EqualVelocity struct.

GreaterVelocity

Evaluates to TRUE when the velocity of the specified axis is greater than the specified value, and FALSE otherwise.

The condition evaluates to TRUE when one of the following is true.

  • The axis velocity is greater than the trigger velocity. The condition will not evaluate to TRUE if the axis velocity is equal to the trigger velocity.

The following figure shows the change in the axis velocity over several cycles. In the cycles for which the condition evaluates to TRUE, the velocity is shown as a red dot, and in the cycles for which the condition evaluates to FALSE, the velocity is shown as a black dot.

../_images/WMXDOC_FUNC_TRG_EVENTS_INPUTFUNC_image12.png

The trigger velocity is specified as a signed value. The comparison is evaluated as [axis velocity > trigger velocity], where both the axis velocity and the trigger velocity are signed values. To trigger the condition when the axis is traveling in the negative direction at a specific velocity or faster, use the LessVelocity input function. Alternatively, set the enableUnsigned option to 1 to specify the trigger velocity as an unsigned value that will trigger when the axis is moving faster than this value in either direction.

Parameters are specified with the GreaterVelocity struct.

LessVelocity

Evaluates to TRUE when the velocity of the specified axis is less than the specified value, and FALSE otherwise.

The condition evaluates to TRUE when one of the following is true.

  • The axis velocity is less than the trigger velocity. The condition will not evaluate to TRUE if the axis velocity is equal to the trigger velocity.

The following figure shows the change in the axis velocity over several cycles. In the cycles for which the condition evaluates to TRUE, the velocity is shown as a red dot, and in the cycles for which the condition evaluates to FALSE, the velocity is shown as a black dot.

../_images/WMXDOC_FUNC_TRG_EVENTS_INPUTFUNC_image15.png

The trigger velocity is specified as a signed value. The comparison is evaluated as [axis velocity < trigger velocity], where both the axis velocity and the trigger velocity are signed values. To trigger the condition when the axis is traveling in the negative direction at a specific velocity or slower, use the GreaterVelocity input function. Alternatively, set the enableUnsigned option to 1 to specify the trigger velocity as an unsigned value that will trigger when the axis is moving slower than this value in either direction.

Parameters are specified with the LessVelocity struct.

EqualTrq

Evaluates to TRUE when the torque of the specified axis equals the specified value, and FALSE otherwise.

The condition evaluates to TRUE when one of the following is true.

  • The axis torque is between [trigger torque + tolerance] and [trigger torque - tolerance]. The axis torque can be equal to [trigger torque + tolerance] or [trigger torque - tolerance].

  • The axis torque from the last cycle is between [trigger torque + tolerance] and [trigger torque - tolerance]. The axis torque from the last cycle can be equal to [trigger torque + tolerance] or [trigger torque - tolerance].

  • The axis torque is greater than [trigger torque + tolerance] and the axis torque from the last cycle is less than [trigger torque - tolerance]. This indicates that the axis torque was equal to the trigger torque between this cycle and the last cycle.

  • The axis torque is less than [trigger torque - tolerance] and the axis torque from the last cycle is greater than [trigger torque + tolerance]. This indicates that the axis torque was equal to the trigger torque between this cycle and the last cycle.

The tolerance is 0.5 user units by default, but can be changed by setting the enableTolerance option to 1 and setting the tolerance parameter to the desired value.

The following figure shows the change in the axis torque over several cycles. In the cycles for which the condition evaluates to TRUE, the torque is shown as a red dot, and in the cycles for which the condition evaluates to FALSE, the torque is shown as a black dot.

../_images/WMXDOC_FUNC_TRG_EVENTS_INPUTFUNC_image10.png

The trigger torque is specified as a signed value. A negative trigger torque will trigger for negative axis torques (axes applying torque in the negative direction). The enableUnsigned option can be set to 1 to specify the trigger torque as an unsigned value that will trigger for axes applying torque in either direction.

Parameters are specified with the EqualTrq struct.

GreaterTrq

Evaluates to TRUE when the torque of the specified axis is greater than the specified value, and FALSE otherwise.

The condition evaluates to TRUE when one of the following is true.

  • The axis torque is greater than the trigger torque. The condition will not evaluate to TRUE if the axis torque is equal to the trigger torque.

The following figure shows the change in the axis torque over several cycles. In the cycles for which the condition evaluates to TRUE, the torque is shown as a red dot, and in the cycles for which the condition evaluates to FALSE, the torque is shown as a black dot.

../_images/WMXDOC_FUNC_TRG_EVENTS_INPUTFUNC_image13.png

The trigger torque is specified as a signed value. The comparison is evaluated as [axis torque > trigger torque], where both the axis torque and the trigger torque are signed values. To trigger the torque when the axis is applying more than the specified amount of torque in the negative direction, use the LessTrq input function. Alternatively, set the enableUnsigned option to 1 to specify the trigger torque as an unsigned value that will trigger when the axis is applying more than the specified amount of torque in either direction.

Parameters are specified with the GreaterTrq struct.

LessTrq

Evaluates to TRUE when the torque of the specified axis is less than the specified value, and FALSE otherwise.

The condition evaluates to TRUE when one of the following is true.

  • The axis torque is less than the trigger torque. The condition will not evaluate to TRUE if the axis torque is equal to the trigger torque.

The following figure shows the change in the axis torque over several cycles. In the cycles for which the condition evaluates to TRUE, the torque is shown as a red dot, and in the cycles for which the condition evaluates to FALSE, the torque is shown as a black dot.

../_images/WMXDOC_FUNC_TRG_EVENTS_INPUTFUNC_image16.png

The trigger torque is specified as a signed value. The comparison is evaluated as [axis torque < trigger torque], where both the axis torque and the trigger torque are signed values. To trigger the torque when the axis is applying less than the specified amount of torque in the negative direction, use the GreaterTrq input function. Alternatively, set the enableUnsigned option to 1 to specify the trigger torque as an unsigned value that will trigger when the axis is applying less than the specified amount of torque in either direction.

Parameters are specified with the LessTrq struct.

OpState

Evaluates to TRUE when the operation state (Op State) of the axis is equal to the specified operation state.

AxisCmdMode

Evaluates to TRUE when the axis command mode (Axis Command Mode) of the axis is the specified axis command mode.

InPos

Evaluates to TRUE when the in position signal (In Pos, In Pos 2, etc.) of the axis is 1.

The in position signal that is used to evaluate the condition is specified with the channel parameter.

PosSET

Evaluates to TRUE when the position set signal (Pos Set) of the axis is 1.

DelayedPosSET

Evaluates to TRUE when the delayed position set signal (Delayed Pos Set) of the axis is 1.

CommandDistributedEnd

Evaluates to TRUE when the command distribution end signal (Cmd Distribution End) of the axis is 1.

RemainingTime

Evaluates the same condition as the RemainingTime trigger motion.

The condition evaluates to TRUE when the remaining time of the motion executed by the trigger axis is equal to or less than the trigger value.

../_images/WMXDOC_FUNC_TRG_TYPES_image0.png

Parameters are specified with the RemainingTime struct.

See Remaining Time.

RemainingDistance

Evaluates the same condition as the RemainingDistance trigger motion.

The condition evaluates to TRUE when the distance remaining for the motion executed by the trigger axis is equal to or less than the trigger value.

../_images/WMXDOC_FUNC_TRG_TYPES_image2.png

Parameters are specified with the RemainingDistance struct.

See Remaining Distance.

CompletedTime

Evaluates the same condition as the CompletedTime trigger motion.

The condition evaluates to TRUE when the completed time of the motion executed by the trigger axis is equal to or greater than the trigger value.

../_images/WMXDOC_FUNC_TRG_TYPES_image10.png

Parameters are specified with the CompletedTime struct.

See Completed Time.

CompletedDistance

Evaluates the same condition as the CompletedDistance trigger motion.

The condition evaluates to TRUE when the distance completed by the motion executed by the trigger axis is equal to or greater than the trigger value.

../_images/WMXDOC_FUNC_TRG_TYPES_image5.png

Parameters are specified with the CompletedDistance struct.

See Completed Distance.

DistanceToTarget

Evaluates the same condition as the DistanceToTarget trigger motion.

The condition evaluates to TRUE when the distance to the target position for the motion executed by the trigger axis is equal to or less than the trigger value.

../_images/WMXDOC_FUNC_TRG_TYPES_image12.png

Parameters are specified with the DistanceToTarget struct.

See Distance to Target.

GreaterPositionError

Evaluates to TRUE when the position error of the specified axis is greater than the specified value, and FALSE otherwise.

The position error is specified as a unsigned value. The comparison is evaluated as [axis position error > trigger position error], where both the axis position error and the trigger position error are unsigned values.

The position error is the difference between the command and feedback positions by default, and is in user units. By setting the useActualFollowingError option to 1, you can monitor the pulse-by-pulse feedback following errors sent by the servo. In this case, the servo must be configured to return a following error.

Wraparound is NOT considered for Single Turn axes.

Parameters are specified with the GreaterPositionError struct.