
B-63943EN-2/01 3.EXECUTION MACRO FUNCTION
- 63 -
3.2.19 P-CODE Workpiece Number Search
When automatic operation is started in the memory or DNC operation
mode, the execution macro specified for variable #8610 is executed
before the main program.
Call conditions and operation
(a) Bit 6 (PWSR) of compile parameter (No. 9002) is set to 1.
(b) The memory or DNC operation mode is selected.
(c) The program number of an execution macro is set for variable
#8610 using a conversational macro or auxiliary macro before
the start of automatic operation.
When the above three conditions are satisfied, starting automatic
operation:
(1) The execution macro specified by #8610 is called. When bit 4
(P98) of compile parameter (No. 9163) is set to 0, the call is
equivalent to a simple call (G65). When bit 4 (P98) of compile
parameter (No. 9163) is set to 1, the call is equivalent to a
subprogram call.
(2) Executes the main program after termination of the execution
macro.
Warning
WARNING
When conditions a) to c) are satisfied, this function
calls an execution macro regardless of the user
program to be started. For this reason, take
countermeasures such as issuing a warning
message using an auxiliary macro or PMC and
setting interlock processing to prevent operator
errors when using this function.
Nesting and local variables
The execution macro is counted among execution macro nesting
levels. Because the execution macro is called in the simple call (G65)
or subprogram call (M98) mode, another execution macro can be
called from the called execution macro using any call method.
In the simple call (G65) mode, the execution macro is executed using
a local variable level different from the level the main program uses.
In other words, the local variables used by the execution macro are
not passed to the main program.
In the subprogram call (M98) mode, the execution macro uses the
same local variable level as the main program. In other words, the
local variables used by the execution macro are passed to the main
program.