Programming a negative software limit switch
Negative software limit switch
The G98 command sets negative SLS in the programmed axes.
- If G90 is active, the negative SLS is set absolute to the programmed value.
- If G91 is active, the programmed value is added relative to P-AXIS-00177.
G98 is active in each block; the software limit switches programmed using it are active cross-block.
Notice
The positions for negative SLS programmed via G98 are stored in the axis-specific variables V.A. SWE.X, V.A. SWE.Y, V.A. SWE.Z, etc. [PROG].
The variables are pre-assigned the value of P-AXIS-00177 of each axis at a reset, mode change or axis change.
Programing Example
Negative software limit switch
(Example 1 – absolute)
%swe_abs.nc
N110 G00 X0 Y0 G90
N120 G00 X20 Y30
(Sets neg. SLS in X to -100 and Y to -200)
N130 G98 X-100 Y-200
( .... )
(Example 2 – relative)
%swe_rel.nc
N110 G00 X0 Y0 G90
N120 G00 X20 Y30
(Offsets neg. SLS in X by 10 and Y by 20)
N130 G98 G91 X10 Y20
( .... )
Warnings, errors and reactions
- Warning P-ERR-21648: The controller uses G98 to calculate a position for the negative SLS that is smaller than the position defined by P-AXIS-00177.
- The new position is not taken over.
- P-AXIS-00177 continues to define the negative SLS.
- Error message P-ERR-21649: The controller uses G98 to calculate a position for the negative SLS that is equal to or greater than the position defined by P-AXIS-00178.
- The new position is not taken over.
- Reset the controller.
- Error message P-ERR-70022: The current actual position of the axis with G98 is smaller than the new negative SLS.
- Interpolation is stopped.
- The new position of the SLS is taken over.
- Reset the controller.
- Move within the valid range.