Pro codes

Pro CNC Codes — System Variables, Look-Ahead, TCP and Hidden Functions

Advanced CNC codes few people are taught: Fanuc system variables, G10 offsets, G05.1 look-ahead, G43.4 TCP, G68.2, Haas G187, Siemens CYCLE832, Heidenhain…

The codes that separate an operator from a programmer: look-ahead and smoothing modes, 5-axis TCP and tilted planes, offsets written from the program, system variables for macros and the parameters that hide builder programs. Most of them are in the manuals, but few people are ever shown them.

High-speed machining

CodeWhat it doesControl
G05.1 Q1AI contour control (AICC) / look-aheadFanuc
G08 P1Advanced preview control (older controls)Fanuc
G05 P10000High-precision contour control (HPCC)Fanuc
G187Accuracy / smoothness controlHaas
CYCLE832High-speed settings (Sinumerik)Siemens
CYCL DEF 32Tolerance cycle (TNC)Heidenhain
G103Limit block look-aheadHaas
COMPCADCompressor for CAM dataSiemens

5-axis

CodeWhat it doesControl
G43.4 / G43.5Tool center point control (TCP)Fanuc
G68.2Tilted working plane (3+2)Fanuc
CYCLE800Swivel planeSiemens
TRAORI5-axis transformation (TCP)Siemens
M128 / FUNCTION TCPMKeep the tool tip positionHeidenhain
PLANE SPATIALTilt the working planeHeidenhain
G234 / G254TCPC and dynamic work offsetHaas

Offsets and data

CodeWhat it doesControl
G10 L2 / L20Set a work offset from the programFanuc
G10 L10–L13Set tool offsets from the programFanuc
G54.1 P1–P48Additional work offsetsFanuc
G51.1 / G50.1Programmable mirror imageFanuc
TRANS / ATRANS / ROTProgrammable framesSiemens

Probing

CodeWhat it doesControl
G31Skip function (probing move)Fanuc

Macro and system variables

CodeWhat it doesControl
#5001–#5066Position variablesFanuc
#5201–#5326Work offset variablesFanuc
#2001–#2400 / #10001…Tool offset variablesFanuc
#4001–#4130Modal informationFanuc
#3000 / #3006User alarm and stop with messageFanuc
#3003 / #3004Suppress single block and feed holdFanuc
#3901 / #3902Parts counterFanuc
#3011 / #3012Date and timeFanuc
POPEN / DPRNT / PCLOSWrite data out of a macroFanuc
#1000–#1035 / #1100–#1135Interface signals (PMC I/O)Fanuc
G66 / G67Modal macro callFanuc
FN 14 / FN 16Error messages and output in Q-parameter programsHeidenhain

Hidden and service

CodeWhat it doesControl
Parameter 3202Protect O8000 and O9000 programsFanuc
Parameters 6700–6713Parts counting set-upFanuc
M198Call a subprogram from external memoryFanuc
$$ $# $G $C $N $J=Grbl system commandsGrbl

Lathe and mill-turn

CodeWhat it doesControl
G12.1 / G13.1Polar coordinate interpolationFanuc
G07.1Cylindrical interpolationFanuc

Run any macro example in the Macro B simulator before it touches a machine. Codes marked as options only work if your machine has them.