
13. Program Support Functions
13.5 User Macro Specifications
330
G command modals
Using variable numbers #4001 to #4021, it is possible to read the G modal commands which have
been issued up to the block immediately before.
Similarly, it is possible to read the modals in the block being executed with variable numbers #4201
to #4221.
Variable number
Pre-read
block
Execution
block
Function
#4001 #4201
Interpolation mode
: G00:0, G01:1, G02:2, G03:3,
G33:33
#4002
#4202
Plane selection
: G17:17, G18:18, G19:19
#4003
#4203
Absolute/incremental
: G90:90, G91:91
#4004
#4204
No variable No.
#4005
#4205
Feed designation
: G94:94, G95:95
#4006
#4206
Inch/metric
: G20:20, G21/21
#4007 #4207
Tool nose R compensation :
: G40:40, G41:41, G42:42
#4008
#4208
Tool length compensation
: G43:43, G44:44, G49:49
#4009 #4209
Canned cycle
: G80:80, G73 to 74, G76:76,
G81 to G89:81 to 89
#4010
#4210
Return level
: G98:98, G99:99
#4011 #4211
#4012
#4212
Workpiece coordinate system
: G54 to G59:54 to 59
#4013 #4213
Acceleration/deceleration
: G61 to G64:61 to 64,
G61.1:61.1
#4014
#4214
Macro modal call
: G66:66, G66.1:66.1, G67:67
#4015 #4215
#4016 #4216
#4017
#4217
Constant surface speed control : G96:96, G97:97
#4018
#4218
No variable No.
#4019
#4219
Mirror image
: G50.1:50.1, G51.1:51.1
#4020 #4220
#4021 #4221
No variable No.
(Example)
G28 X0 Y0 Z0 ;
G90 G1 X100. F1000;
G91 G65 L300 X100. Y100.;
M02;
L300;
#1 = #4003;
→
Group 3G modal (pre-read) #1 = 91.0
#2 = #4203;
→
Group 3G modal (now being executed) #2 = 90.0
G#1 X#24 Y#25;
G68;
%