B-63324EN/03 PROGRAMMING 17.CUSTOM MACRO
- 643 -
17.6.7 Macro Call Using an M Code
By setting an M code number used to call a macro program in a
parameter, the macro program can be called in the same way as with a
simple call (G65).
Explanation
By setting an M code number from 3 to 99999999 used to call a custom
macro program (O9020 to O9029) in the corresponding parameter
(No.7080 to No.7089), the macro program can be called in the same
way as with G65.
- Correspondence between parameter numbers and program numbers
Program number Parameter number
O9020
O9021
O9022
O9023
O9024
O9025
O9026
O9027
O9028
O9029
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
Repetition
As with a simple call, a number of repetitions from 1 to 999999999 can
be specified at address L.
Argument specification
As with a simple call, two types of argument specification are
available: Argument specificationIand argument specification II. The
type of argument specification is determined automatically according
to the addresses used.
Limitation
- An M code used to call a macro program must be specified at the
start of a block.
- In a macro called with a G code or in a program called as a
subprogram with an M, S, T, 2nd auxiliary function code when
parameter GMP (No.7000#5) is 1, no macros can be called using
an M code. An M code in such a macro or program is treated as an
ordinary M code.
O0001 ;
:
M50 A1.0 B2.0 ;
:
M30 ;
O9020 ;
:
:
:
M99 ;
Parameter @No.7080=50