
6. FUNCTIONS OF THE MACRO
EXECUTOR
B–61803E–1/10
PROGRAMMING
124
(1) Referencing common valiables
An execution, conversational, or auxiliary P-CODE program can
reference and write common variables (#100 to #199, #500 to #999)
used by a user program for custom macro B. With variables #99100
to #99199 and #99500 to #99999, the P-CODE program can reference
and write common variables #100 to #199 and #500 to #999 of the
user program.
#99100 → Corresponds to #100.
:
#99149 → Corresponds to #149.
:
#99500 → Corresponds to #500.
:
#99531 → Corresponds to #531.
NOTE
The common variables #100 to #149 and #500 to #531 can
be referenced or written.
(2) Referencing custom macro system variables
System variables used for custom macro B can be referenced and
written from an execution, conversational, or auxiliary macro. The
variables of M–series tool compensation memory C (#10001 to
#19099) and 300 workpiece coordinate systems (#14001 to #19988),
however, cannot be directly referenced because the variable numbers
match P–CODE variables (#10000).
The function to reference and write custom macro system variables
references and writes a variable having a variable number on the over
of #100000, so that all variables of custom macro B can be referenced
and written.
#10000=#110001;:Reads tool wear compensation value 1 into
P–CODE variable #10000.
#14001=#12.345; :Writes 12.345 as X coordinates of 300 workpiece
coordinate systems.
This function can reference and write all variables of custom macro
B as well as variables of tool compensation memory C and 300
workpiece coordinate systems.
This function can also reference and write new system variables
added to the CNC system of a version that is not supported by the
macro executor.
With the conventional compilation parameter, DAUX (No. 9002, #5), the
screen of CNC series and edition is displayed while the CNC unit is in the
emergency stop state or external reset state. If a new parameter, DAUXR
(No. 9006, #3), is specified, the conversational macro screen can be
immediately displayed even in the emergency stop state or external reset
state.
DAUXR=1: The conversational macro screen is displayed when the
power is turned on.
Parameter DAUX (No. 9002, #5) must also be set to 1.
6.25
REFERENCING
COMMON
VARIABLES
6.26
DISPLAYING THE
CONVERSATIONAL
MACRO SCREEN
WHEN THE POWER
IS TURNED ON