
3. EXECUTION MACRO
B–61803E–1/10
PROGRAMMING
26
(2) Differences between subprogram calls and macro calls
(a)
Subprogram calls
– T code subprogram call
– M code subprogram call
– Special code subprogram call
– Range–specified M code subprogram call
A P–CODE program call is made after a command other than a call
code (T, M, or special code) is executed.
If only a call code is specified independently, either of the following
operations is performed depending on the setting of the compilation
parameter bit NOP_B.
Bit 6 (NOP_B) of compilation parameter No. 9004
NOP_B = 0: The P–CODE program is called after a vacant
block is executed in the calling block.
= 1: No vacant block is generated in the calling
block, and the P–CODE program is called im-
mediately.
(b) Macroprogram call – 1
– G code macroprogram call
– M code macroprogram call
– Range–specified G code macroprogram call
The call code must be specified at the beginning of a block (except
O/N).
The subsequent commands are passed to (#1 to #26) as arguments.
For information on specifying arguments, see Section 3.2,
”Transferring Arguments.”
No vacant block is generated in the calling block; the P–CODE
program is called immediately.
(c) Macro program call – 2
– T code macroprogram call
– Axis address macroprogram call
The call code need not specified at the beginning of a block.
All addresses specified in the block are passed to (#1 to #33) as
arguments. Argument specification II cannot be used. Only those
addresses that can be issued to the NC may be specified as arguments.
Only the same effective digits as those of NC commands are posted.
The calling block is handled in either of the following ways
depending on the compilation parameter bit NOP_B.
Bit 6 (NOP_B) of compilation parameter No. 9004
NOP_B = 0: The P–CODE program is called after a vacant
block is executed in the calling block.
= 1: No vacant block is generated in the calling
block, and the P–CODE program is called im-
mediately.