CNC Machinist Calculator Ultra

Home › G-codes › Mach3 Mach4 › G65

G65 Macro call, Mach4

Mach3 Mach4 G-code · Mill

Mach4. Calls a macro program once and passes the letters as local variables, A to #1, B to #2 and so on, like Fanuc macro B.

Format

G65 P [A] [B] [C] [D] ...

Addresses

AddressWhat it does
PProgram number of the macro, O number
A B CArguments, A to #1, B to #2, C to #3
X Y ZArguments, X to #24, Y to #25, Z to #26

How it works

Non modal. No repeat word.

Example program

G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
T1 M6 (TOOL CHANGE)
S5000 M3 (SPINDLE ON)
G43 H1 Z1.0 (LENGTH OFFSET)
…

The full 7-line example is in the app. Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

G66 · G67 · M98

G65 on other controls

The same number can mean something different on another control.

ControlMeaning
FanucMacro call
Haas NGCMacro subprogram call
Mazak (EIA)Macro call, single
Okuma OSPDroop control on
Mitsubishi M70 M80Macro call
Brother SpeedioMacro call
Centroid CNC12 AcornMacro call with arguments
Hurco WinMax (NC)Macro call with arguments
Swiss (Citizen Star)Macro call

Every G-code for Mach3 Mach4 in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.

Open G65 in the app All Mach3 Mach4 G-codes

App Store Google Play