Home › G-codes › Mazak (EIA) › G65
G65 Macro call, single
Mazak (EIA) G-code · Mill and lathe
Calls a macro program once and passes arguments. Letters such as A B C become local variables in the macro.
Format
G65 P [L] [A B C ...]
Addresses
| Address | What it does |
|---|---|
P | Program number of the macro |
L | Repeat count |
A to Z | Arguments passed as local variables |
How it works
Non-modal.
Example program
G90 G54 G00 X0. Y0. (CENTER OF PATTERN)
G65 P9100 A6. R2. Z-.5 (CALL BOLT CIRCLE MACRO, 6 HOLES, R 2.)
G00 Z1. (RETRACT)
G65 P9100 A6. R2. Z-.5 (CALL BOLT CIRCLE MACRO, 6 HOLES, R 2.)
G00 Z1. (RETRACT)
Example is in inch. Check offsets and clearances first.
Watch out for
- G65 passes arguments, M98 does not. Do not mix them up.
- Local variables are cleared when the macro ends.
Related codes
G65 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Macro call |
| Haas NGC | Macro subprogram call |
| Okuma OSP | Droop control on |
| Mitsubishi M70 M80 | Macro call |
| Brother Speedio | Macro call |
| Mach3 Mach4 | Macro call, Mach4 |
| Centroid CNC12 Acorn | Macro call with arguments |
| Hurco WinMax (NC) | Macro call with arguments |
| Swiss (Citizen Star) | Macro call |
Every G-code for Mazak (EIA) 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 Mazak G-codes