
13. Program Support Functions
13.5 User Macro Specifications
326
Workpiece coordinate system offset
By using variable numbers #5201 to #532n, it is possible to read out the workpiece coordinate
system offset data or to substitute values.
(Note)
The number of axes which can be controlled differs according to the specifications.
The last digit of the variable No. corresponds to the control axis No.
Axis No.
Axis name
Axis 1
Axis 2 Axis 3 Axis 4
. . Axis n
Remarks
External workpiece
offset
#5201 #5202 #5203 #5204
. .
#520n
External workpiece offset
specifications are required.
G54 #5221
#5222 #5223 #5224
. .
#522n
G55 #5241
#5242 #5243 #5244
. .
#524n
G56 #5261
#5262 #5263 #5264
. .
#526n
G57 #5281
#5282 #5283 #5284
. .
#528n
G58 #5301
#5302 #5303 #5304
. .
#530n
G59 #5321
#5322 #5323 #5324
. .
#532n
N1 G28 X0 Y0 Z0 ;
N2 #5221=-20. #5222=-20. ;
N3 G90 G00 G54 X0 Y0 ;
N10 #5221=-90. #5222=-10. ;
N11 G90 G00 G54 X0Y0 ;
M02 ;
N100 #5221=#5221+#5201 ;
#5222=#5222+#5202 ;
#5241=#5241+#5201 ;
#5242=#5242+#5202 ;
#5201=0 #5202=0;
(Example 1)
External workpiece offset
(Example 2)
G54 workpiece
coordinate system
defined by N10
G54 workpiece
coordinate system
defined by N2
Base machine coordinate system
Base machine coordinate system
-90.
-20.
-20.
-10.
N1
N3
W1
W1
N11
W1 (G54)
W2 (G55)
M
W2 (G55)
W1 (G54)
M
G55
G54
Coordinate system
before change
Coordinate system
after change
G54
G55
This is an example where the external workpiece offset values are added to the workpiece
coordinate (G54, G55) system offset values without changing the position of the workpiece
coordinate systems.