
B–62073E–2/03
3. EXECUTION MACRO
45
Because a P–CODE program is called using a user G, M, S, T, or B code,
the following is inhibited: calling of a user G code during a P–CODE call
by a user G code, and the calling of a user M code, S code, T code, B code,
M codes specifying a range, or a specific code during a P–CODE call by
a user M code, S code, T code, B code, M codes specifying a range, or by
a specific code.
The PGMP bit of parameter 8509 sets whether to permit the following:
calling of a user M code, S code, T code, B code, M codes specifying a
range, or a specific code during a P–CODE call by a user G code, and the
calling of a user G code during a P–CODE call by a user M code, S code,
T code, B code, M codes specifying a range, or by a specific code.
After a P–CODE program (execution macro program) is called from a
user program, another user program can be called as a subprogram by
using the M code specified in parameter No.8533 of the execution macro
program.
[User program]
O0001;
G100 X10. Z20. ;
M30 ;
O1000 ;
:
M99 ;
[P–CODE program]
O9010 ;
:
Mmm P1000 ;
:
M99 ;
Call format)
Mmm Ppppp;
where,
mm: M code specified in parameter No.8533
pppp: Number of the user program to be called
Notes
1 Another P–CODE program (execution macro program)
cannot be called from the called user program.
2 The sequence number cannot be specified when returning
from the called user program.
A specified range of programs can be called at a time by specifying the
G code corresponding to the first program to be called in parameter
No.8551, the program number of the first program to be called in
parameter No.8552, and the total number of programs to be called in
parameter No.8546. The specified number of programs are called in the
order of the G codes and corresponding program numbers, starting with
the first specified program.
3.2.7
Calling a P–CODE
Program from an
Execution Macro Using
the G, M, S, T, or B
User Code
3.2.8
Calling a User Program
Using an Execution
Macro
3.2.9
Specifying of the G
Code for Macro Calls
of P–CODE Programs