CNC Machinist Calculator Ultra

Home › G-codes › Siemens 808D ISO › G65

G65 Macro call, single

Siemens 808D ISO G-code · Mill, Lathe

On mills: Macro call, single

Calls macro program P and runs it L times, passing the other addresses in the block as arguments. Non-modal: it runs once at this block.

Format

G65 P [L] [arguments]

Addresses

AddressWhat it does
PMacro program number
LNumber of runs
A to ZArguments passed to the macro

How it works

Non-modal, group 18. Optional function.

Example program

G90 G54 G00 X100. Y50. Z33. (POSITION)
S1000 M03 (SPINDLE CW)
G65 P10 F55. X150. Y100. S2000 (CALL 0010 WITH ARGUMENTS)
X50. (NORMAL MOVE AFTER THE MACRO)
…

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

Watch out for

On lathes: Macro call, single

Calls a macro program once (or L times) and passes the other addresses in the block as arguments. The arguments land in system variables $C_A to $C_Z.

Format

G65 P [L] [arguments A to Z]

Addresses

AddressWhat it does
PProgram number of the macro
LNumber of runs
A to ZArguments, stored in $C_A to $C_Z. I J K up to 10 times as $C_I[n]

How it works

Non-modal, G group 18.

Example program

G00 X52.0 Z2.0 (START POINT)
G65 P0010 X30.0 Z-20.0 F0.2 (CALL MACRO 0010 WITH 3 ARGUMENTS)
G00 X150.0 Z100.0 (RETRACT)

Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

G66 · G67 · M98 · M99

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
Mach3 Mach4Macro call, Mach4
Centroid CNC12 AcornMacro call with arguments
Hurco WinMax (NC)Macro call with arguments
Swiss (Citizen Star)Macro call

Every G-code for Siemens 808D ISO 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 Siemens 808D ISO G-codes

App Store Google Play