FANUC commonly used system variables 
 
  
 
#4000: Main program number 
#4120: Current tool number 
#3100: Data empty (macro variable) 
#3004=2: Control G01 feed 
#3901: Processed quantity 
#3902: Processing target number 
#3290: Bit 1=1, macro variable unlocked 
#3001: Timer unit [milliseconds] 
#3002: Timer unit [hours] 
#3011: Machine date 2022.9.15 (20220915) 
#3012: Machine time 9.10.25 (091025) 
#5023 Z value (value that cannot be changed) 
#5022→Current mechanical coordinate Y value (value that cannot be changed) 
#5021 X value (unchangeable value) 
#5043 Z value (unchangeable value) 
#5042 → Absolute coordinate Y value (unchangeable value) 
#5041 X value (unchangeable value) 
#5063 
#5062 Relative value of absolute coordinate and current machine coordinate 
#5061 Coordinate system probe corresponding to system variable into system variable-coordinate system-probe program 
#5201 Common coordinate X value 
#5202 Coordinate Y value 
#5203 Coordinate Z value 
#5221 → G54 coordinate X value U54 
#5241 → G55 coordinate X value U55 
#5261 → G56 coordinate X value U56 
#5281 → G57 coordinate X value U57 
#5301 → G58 coordinate X value U58 
#5321 → G59 coordinate X value U59 
(Note: If the last digit of the system variable coordinate system is "1", it indicates the X value, "2" indicates the Y value, and "3" indicates the Z value.) 
#7001→G54.1P1X value U1001 
#7021→G54.1P2X value U1002 
#7041→G54.1P3X value U1003 
#7061→G54.1P4X value U1004 
#7081→G54.1P5X value U1005 
#7101→G54.1P6X value U1006 
#7121→G54.1P7X value U1007 
(Note: If the last digit of the coordinate system is "1", it indicates the X value, "2" indicates the Y value, and "3" indicates the Z value.) 
 
Parameters 
 
7851; Tool change tool disk rotation speed 
 
7810: Current tool number, (must be the same as the current tool number) 
 
3201: Disconnect when transferring the program, and change the 2nd digit "0" from the left to "1" 
 
3202: Remove the program protection starting with "8" and "9"? 
 
6031: Set the macro variable number protection start 
 
6032: Set the macro variable number protection Tail 
1321: Control machine travel 
 
Comparison operator 
 
LE: Less than or equal to ≤ 
GE: Greater than or equal to > 
EQ: Equal to = 
NE: Not equal to ≠ 
END: End 
IF: If GOTO: Jump 
THEN: Then 
OR: And 
AND: Or ABS: Absolute value 
G90G10L2P0 (common coordinates) X0Y0Z0 
Write G90G10L2P0 in the program and the coordinate value after it will be automatically entered into the corresponding coordinate system. For example: G90G10 L2P1(G54)X50Y10Z0: 
X50Y10Z0 at the end of the program, after CNC reads this sentence, the G54 coordinate will be X50Y10Z0: 
G90G10L2P0(public coordinate)X0Y0Z0; meaning: (P: coordinate number L2) 
G90G10L2P2(G55)XOY0Z0; meaning: (P: coordinate number L2) 
G90G10L2P2(G55)XOY0Z0; meaning: (P: coordinate number L2) 
G 90G10L2P3(G56)X0Y0Z0; Meaning: (P: coordinate number L2) 
G90G10L2P4(G57)X0Y0Z0; Meaning: (P: coordinate number L2) 
G90G10L2P5(G58)X0Y0Z0; Meaning: (P: coordinate number L2) 
G90G10L2P6(G59)XOY0Z0; Meaning: (P: coordinate number L2) 
G90G10L20P1(G54.1P1)XOY0Z0; Meaning :(P: coordinate number L2) 
G90G10L20P2(G54.1P2)XOY0Z0; meaning:(P: coordinate number L2) 
G90G10L20P3(G54.1P3)XOY0Z0; meaning:(P: coordinate number L2) 
G90G10L20P4((G54.1P4)XOY0Z0; meaning:(P: coordinate number L2) 
G90G10L20P5(G54.1P5)XOY0Z0; meaning:(P: coordinate number =L2) 
G90G10L20P6(G54.1P6)XOY0Z0; Meaning: (P: coordinate number L2) 
G90G10L20P7(G54.1P7)X0Y0Z0; Meaning: (P: coordinate number L2) 
G90G10L20P8(G54.1P8)XOY0Z0; Meaning: (P: coordinate number L2) 
G90G10L10P1R95.; Meaning: #11001 is equal to 95. (P: tool number R: value L10) 
G90G10L11P2R95.; Meaning: #10002 is equal to 95. (P: tool number R: value L11) 
G90G10L12P3R95.: Meaning: #13003 is equal to 95. (P: tool number R: value L12) 
G90G10L13P4R95.; Meaning: #12004 is equal to 95. (P: tool number R: value L13) 
G10L52; N3202R01010001 (open parameter) 
G10L52: N 6031?R650 (open parameter) 
G11; (close parameter) 
 
Tool length compensation [H] 
 
Geometry compensation #11001, #11002..#11400 
Wear compensation #10001, #10002....#10400 [Compensation number 1....400] 
Tool radius compensation [D] 
Geometry compensation #13001, #13002....#13400 
Wear compensation #12001, #12002...#12400  |