17.CUSTOM MACRO PROGRAMMING B-63324EN/03
- 628 -
17.6 MACRO CALL
A macro program can be called using the following methods:
Macro call Simple call (G65)
modal call (G66, G66.1, G67)
Macro call with G code
Macro call with M code
Subprogram call with M code
Subprogram call with T code
Subprogram call with S code
Subprogram call with 2nd auxiliary function
- Differences between macro calls and subprogram calls
Macro call (G65) differs from subprogram call (M98) as described
- With G65, an argument (data passed to a macro) can be specified.
M98 does not have this capability.
- If a G65 block contains another NC command (for example, G01
X100.0 G65 Pp), an alarm "PS0090 NC statement/macro
statement duplicated" is issued.
When an M98 block contains another NC command (for example,
G01 X100.0 M98Pp), the subprogram is called after the command
is executed. On the other hand, G65 unconditionally calls a
- A G65 block does not cause the machine to stop in a single-block
If an M98 block contains another NC command (for example, G01
X100.0 M98 Pp), the machine stops in a single-block mode.
- With G65, the level of local variables changes. With M98, the
level of local variables does not change.