Home › G-codes › Hurco WinMax (NC) › G65
G65 Macro call with arguments
Hurco WinMax (NC) G-code · Mill
Calls a subprogram once or L times and passes argument letters into local variables #1 to #33 (Macro Mode B).
Format
G65 P L [arguments]
Addresses
| Address | What it does |
|---|---|
P | Subprogram number |
L | Repeat count, up to 999 |
A B C I J K and more | Arguments copied to local variables, A to #1, B to #2, I to #4 |
How it works
Non modal, group 12.
Example program
T1 M06 (.250 DRILL)
G90 G54 G00 X0. Y0. S2500 M03 (START)
G43 H01 Z1. (LENGTH OFFSET)
G65 P5080 X1. Y1. Z-.5 R.1 (CALL MACRO WITH ARGUMENTS)
…
G90 G54 G00 X0. Y0. S2500 M03 (START)
G43 H01 Z1. (LENGTH OFFSET)
G65 P5080 X1. Y1. Z-.5 R.1 (CALL MACRO WITH ARGUMENTS)
…
The full 6-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Only numbers can be passed as G65 arguments, not variables or expressions.
- Subprograms nest 15 deep. A program cannot call itself.
- Needs the NC Productivity Package for variables and macros. Macro Mode A is not supported.
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 |
| Mazak (EIA) | Macro call, single |
| 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 |
| Swiss (Citizen Star) | Macro call |
Every G-code for Hurco WinMax (NC) 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 Hurco WinMax G-codes