Auxiliary function to calculate motion limits in the workpiece coordinate system (#GET WCS POSLIMIT)
The following command calculates the limits of a motion in the current workpiece coordinate system (WCS) in the direction of a programmed motion vector with the components (VC1, VC2, VC3). The vector components need not be specified in standardised form. The basis for path limiting are the axis-specific software limit switches. Based on these values, the controller calculates the motion limits in the current coordinate system.
Syntax: |
#GET WCS POSLIMIT [ VC1=.. VC2=.. VC3=.. ] |
VC1=.., VC2=.., VC3=.. |
Components of direction vector, REAL number |
The following global variables read out the result of the calculation for the first three axes in the coordinate system.
V.G.WCS_POSLIMIT_1 | Motion limit in the first main axis in WCS |
V.G.WCS_POSLIMIT_2 | Motion limit in the second main axis in WCS |
V.G.WCS_POSLIMIT_3 | Motion limit in the third main axis in WCS |
Notice | |
The programmed motion direction must be absolutely retained for the real executed motion, otherwise the calculated motion limits are incorrect. In the same way, no rotary axes may be programmed when kinematic transformation (#RTCP) is active. |
Programming Example
Auxiliary function to calculate motion limits in the workpiece coordinate system