Velocity Input Functions

Velocity input functions evaluate whether the velocity of the axis is at certain values.

For these input functions, the axis command mode can be Position, Velocity, or Torque. In Position mode, the useFeedback option can be set to 0 or 1. If this option is set to 0, the command velocity is calculated from the difference in the command position between this cycle and the last cycle. In Torque mode, the useFeedback option must be set to 1.

Input Function

Description

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.