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 |
|---|---|---|
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 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. |
||
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. |
||
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.


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


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.


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 |
|---|---|---|---|
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. |
|||
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.

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 |
|---|---|
The limit parameters that affect the external limit switch are listed below.
Parameter Name |
Variable Name |
|---|---|