Near and External Limit Switch

Near and external limit switches are software-based limit switches that are triggered when the specified input bit in the I/O address space is set. The action to perform when the near limit switch is triggered is set with the Near LS Type parameter, and the action to perform when the external limit switch is triggered is set with the External LS Type parameter.

The limit switch action of near and external limit switches is executed entirely by the WMX3 engine. The response time of the limit switch is typically longer than dedicated hardware limit switches, as the generic input signal must first be received by the WMX3 engine, after which a stop command or a servo off signal is sent to the axis servo.

Placing Near and External Limit Switches

There is no difference in functionality between near limit switches and external limit switches. The reason for two limit switches existing is to be able to configure one set of limit switches (typically the near limit switch) as the “inner” limit switch and one set of limit switches (typically the external limit switch) as the “outer” limit switch. When the near limit switch is triggered, the axis decelerates to a stop. If the external limit switch is triggered before the axis completely stops, either the deceleration is increased or a servo off signal is sent.

The following table lists several configurations for near and external limit switches.

Near

External

Discussion

SlowDec

Dec

If the near limit switch is triggered, the axis starts to decelerate at LS Slow Dec. If the external limit switch is triggered before the axis stops, the axis starts to decelerate at LS Dec, which is set to a higher deceleration than LS Slow Dec.

SlowDec

ServoOff

If the near limit switch is triggered, the axis starts to decelerate at LS Slow Dec. If the external limit switch is triggered before the axis stops, a servo off signal is immediately sent to the axis.

SlowDecServoOff

DecServoOff

If the near limit switch is triggered, the axis starts to decelerate at LS Slow Dec. If the axis stops before triggering the external limit switch, a servo off signal is sent to the axis. If the external limit switch is triggered before the axis stops, the axis starts to decelerate at LS Dec, which is set to a higher deceleration than LS Slow Dec. After the axis stops, a servo off signal is sent to the axis.

SlowDecServoOff

ServoOff

If the near limit switch is triggered, the axis starts to decelerate at LS Slow Dec. If the axis stops before triggering the external limit switch, a servo off signal is sent to the axis. If the external limit switch is triggered before the axis stops, a servo off signal is immediately sent to the axis.

The following figure shows an example of the near limit switch set to SlowDec and the external limit switch set to Dec. The axis is moving torward the positive near limit switch. The velocity of the axis is shown in the plot below.

../_images/WMXDOC_FUNC_LIMIT_image0.png

../_images/WMXDOC_FUNC_LIMIT_image1.png

After the axis triggers the positive near limit switch, the axis starts to decelerate at LS Slow Dec.

../_images/WMXDOC_FUNC_LIMIT_image2.png

../_images/WMXDOC_FUNC_LIMIT_image3.png

The axis triggers the positive external limit switch before it can stop. The deceleration increases to LS Dec, and the axis is able to stop rapidly.

../_images/WMXDOC_FUNC_LIMIT_image4.png

../_images/WMXDOC_FUNC_LIMIT_image5.png

Near and external limit switches can be combined with hardware limit switches and software limits.

The following table lists several configurations for near and external limit switches in combination with hardware limit switches.

Near

External

Hardware

Discussion

SlowDec

Dec

ServoOff

If the near limit switch is triggered, the axis starts to decelerate at LS Slow Dec. If the external limit switch is triggered before the axis stops, the axis starts to decelerate at LS Dec, which is set to a higher deceleration than LS Slow Dec. If the hardware limit switch is triggered before the axis stops, a servo off signal is sent to the axis.

SlowDecServoOff

DecServoOff

ServoOff

If the near limit switch is triggered, the axis starts to decelerate at LS Slow Dec. If the axis stops before triggering the external limit switch, a servo off signal is sent to the axis. If the external limit switch is triggered before the axis stops, the axis starts to decelerate at LS Dec, which is set to a higher deceleration than LS Slow Dec. When the axis stops, or when the hardware limit switch is triggered, a servo off signal is sent to the axis.

The following figure shows an example of the near and external limit switches used in combination with hardware limit switches.

../_images/WMXDOC_FUNC_LIMIT_image6.png

Reading the State

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

The state of the positive near limit switch is contained in nearPositiveLS and the state of the negative near limit switch is contained in nearNegativeLS.

The state of the positive external limit switch is contained in externalPositiveLS and the state of the negative external limit switch is contained in externalNegativeLS.

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

Relevant Parameters

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

Parameter Name

Variable Name

Near LS Type

nearLSType

Near Positive LS Type

nearPositiveLSType

Near Negative LS Type

nearNegativeLSType

Near Positive LS Byte

nearPositiveLSByte

Near Positive LS Bit

nearPositiveLSBit

Invert Near Positive LS Polarity

invertNearPositiveLSPolarity

Near Negative LS Byte

nearNegativeLSByte

Near Negative LS Bit

nearNegativeLSBit

Invert Near Negative LS Polarity

invertNearNegativeLSPolarity

LS Dec

lsDec

LS Slow Dec

lsSlowDec

All LS During Homing

allLSDuringHoming

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

Parameter Name

Variable Name

External LS Type

externalLSType

External Positive LS Type

externalPositiveLSType

External Negative LS Type

externalNegativeLSType

External Positive LS Byte

externalPositiveLSByte

External Positive LS Bit

externalPositiveLSBit

Invert External Positive LS Polarity

invertExternalPositiveLSPolarity

External Negative LS Byte

externalNegativeLSByte

External Negative LS Bit

externalNegativeLSBit

Invert External Negative LS Polarity

invertExternalNegativeLSPolarity

LS Dec

lsDec

LS Slow Dec

lsSlowDec

All LS During Homing

allLSDuringHoming