
13. Program Support Functions
13.5 User Macro Specifications
363
13.5.9 Precautions
Precautions
When the user macro commands are employed, it is possible to use the M, S, T and other NC
control commands together with the arithmetic, decision, branching and other macro commands
for preparing the machining programs. When the former commands are made into executable
statements and the latter commands into macro statements, the macro statement processing
should be accomplished as quickly as possible in order to minimize the machining time, because
such processing is not directly related to machine control.
As a result, the parameter "#8101 macro single" can be set and the macro statements can be
processed in parallel with the execution of the executable statement.
(The parameter can be set OFF during normal machining to process all the macro statements
together or set ON during a program check to execute the macro statements block by block. This
enables the setting to be made in accordance with the intended objective in mind.)
G91G28X0Y0Z0 ;
• • • • • (1)
G92X0Y0Z0 ;
• • • • • (2)
G00X-100.Y-100. ;
• • • • • (3)
#101=100.
∗
COS [210.] ; • • • • • (4)
#102=100.
∗
SIN [210.] ; • • • • • (5)
G01X#101Y#102F800 ;
• • • • • (6)
Example of program
Macro statement
Macro statements are:
(1) Arithmetic commands (block including =)
(2) Control commands (block including GOTO, DO-END, etc.)
(3) Macro call commands (including macro calls based on G codes and cancel commands (G65,
G66, G66.1, G67))
Executable statements indicate statements other than macro statements.
Flow of processing
Macro single OFF
(1)
(2)
(4)(5)(6)
(3)
(1)
(2)
(4)(5)(6)
(3)
Program analysis
Block executing
Macro single ON
Program analysis
Block executing
(1)
(2)
(3)
(1)
(2)
(3)
(4)
(5)
(6)
(4)
(5) (6)