Acu-Rite CNC 3500i User Manual

Page of 472
408
11 G-Code Edit, Help, & Advanced Features
1
1
.4 A
d
v
a
nced Pr
ogr
a
mming
Macro Body Structure
The macro body is defined in the same way as a sub-program.
Format:  Oxxx
O identifies it as a macro.
xxx is the label number.
Terminate the macro with an M99 code.
Use local variables within the body of a macro or sub-program only. 
You cannot use them to transfer data to other macros or 
sub-programs. If further sub-program calls are made from the macro 
body, you must transfer data from the local variables to common 
variables. The common variables can then be referenced to transport 
data to the further sub-program.
Common variables range from #100 to #220.
The macro must either be part of the program from which it is called 
or "included" using the program inclusion code. Refer to "File Inclusion" 
in this section.
 
Example 1:
N200
O 201
N210
-----
N220
#100 = #20
N230