Standard G-code is linear and static. To machine families of parts, write custom pockets, or perform complex logic, we use Fanuc Macro B variables.
Macro B variables are prefixed with a # symbol and are classified into local (#1-#33), common (#100-#199), and system variables (#5000+).
In this lesson, we define the parameters of a rectangular contour:
#100 = Width of the pocket in X (3.000″)#101 = Length of the pocket in Y (2.000″)#102 = Depth of Cut (0.250″)Instead of hardcoding positions, the G-code commands compute coordinates dynamically:
G01 X#100 F20.0 engages the tool to the parameter width.#100 updates the toolpath envelope instantly without rewriting lines of G-code!