Hardware Limit Switch

Hardware limit switches, usually just called limit switches, are tied to dedicated inputs on the servo. Limit switches are attached near the positive and negative ends of a linear axis to stop the axis when it attempts to move past these positions.

When the limit switch is triggered, an action may be executed by the servo, by the WMX3 engine, or by both.

Limit Switch Action by the Servo

When the limit switch is triggered, the servo will stop the axis or switch to servo off state depending on the servo parameter settings. See the documentation for the servo for information on limit switch processing that is specific to that servo.

Often, the axis will generate an amp alarm and decelerate to a stop when the limit switch is triggered. Any position commands and servo on commands that are generated by the WMX3 engine will be ignored by the servo until the stop motion completes.

Limit Switch Action by the WMX3 Engine

On the WMX3 engine side, the limit switch action is configured using the Limit Parameters.

The LS Type parameter determines the action that is executed when the limit switch is triggered. With the default setting of None, the WMX3 engine will not execute any action when the limit switch is triggered.

Even if this parameter is set to None, the limit switch is not disabled. The servo will still execute the action configured by the servo parameter settings. If no limit switch is connected, the Invert Positive LS Polarity and Invert Negative LS Polarity parameters must be set depending on whether the limit switch signal is active high or active low.

The available LS Type settings are listed in the table below.

LS Type

Description

None

The WMX3 engine will not execute any action when the limit switch is triggered. This setting is typically used when the limit switch processing is left to the servo, or if no limit switch is attached.

ServoOff

When the limit switch is triggered, the WMX3 engine will send a servo off signal to the axis. This setting is typically used when it is crucial that the axis stops immediately when the limit switch is triggered, and no limit switch action is executed by the servo.

DecServoOff

When the limit switch is triggered, the WMX3 engine will stop the axis using a Trapezoidal profile with the deceleration set to the LS Dec parameter. After distributing the stop command, the WMX3 engine will send a servo off signal to the axis. This setting is typically used when the axis should decelerate to a stop instead of suddenly stopping with a servo off command, and no limit switch action is executed by the servo.

Dec

When the limit switch is triggered, the WMX3 engine will stop the axis using a Trapezoidal profile with the deceleration set to the LS Dec parameter. This setting is typically used when it is safe for the axis to remain in servo on state after triggering the limit switch, and no limit switch action is executed by the servo.

SlowDecServoOff

When the limit switch is triggered, the WMX3 engine will stop the axis using a Trapezoidal profile with the deceleration set to the LS Slow Dec parameter. After distributing the stop command, the WMX3 engine will send a servo off signal to the axis. The difference between this type and DecServoOff is the parameter that determines the deceleration.

SlowDec

When the limit switch is triggered, the WMX3 engine will stop the axis using a Trapezoidal profile with the deceleration set to the LS Slow Dec parameter. The difference between this type and Dec is the parameter that determines the deceleration.

SeparatePositiveLSNegativeLS

This special setting will allow the LS Type parameter to be set separately for the positive hardware limit switch and the negative hardware limit switch. The Positive LS Type parameter configures the positive hardware limit switch and the Negative LS Type parameter configures the negative hardware limit switch.

Reading the State

The current state of the positive and negative hardware limit switches can be obtained with the GetStatus function.

The state of the positive hardware limit switch is contained in positiveLS and the state of the negative hardware limit switch is contained in negativeLS.

For additional information, also see Positive LS and Negative LS.

Relevant Parameters

The limit parameters that affect the hardware limit switch are listed below.

Parameter Name

Variable Name

LS Type

lsType

Positive LS Type

positiveLSType

Negative LS Type

negativeLSType

Invert Positive LS Polarity

invertPositiveLSPolarity

Invert Negative LS Polarity

invertNegativeLSPolarity

LS Dec

lsDec

LS Slow Dec

lsSlowDec

All LS During Homing

allLSDuringHoming

LS Direction

lsDirection