
B-63944EN/02 PROGRAMMING 17.REAL-TIME CUSTOM MACRO
- 491 -
The operation above is programmed using real time macro commands.
Program
O0001 ;
G92 X0 ;
//1 ZEDGE [#100101 GE 30. ] #IOG[99,5] = 1 ;
//2 ZEDGE [#100101 GE 50.] ZDO ;
G91 G00 Y100 ;
ZEND ;
//3 ZEDGE [#100101GE 80. ] #IOG[99,5] = 0 ;
G90 G01 X200. F150 ;
M30 ;
The timing is as follows. (‘**’ represents the satisfaction of the
condition.)
X coordinate 30 50 80
Peripheral axis Y operation
G99.5 signal
NC statement (machining)
G90 G01 X200. F150
Real time macro command 1
//1 ZEDGE [#100101 GE 30.]
#IOG[99,5] = 1 ;
**
Real time macro command 2
//2 ZEDGE [#100101 GE 50. ]
ZDO ;
G91 G00 Y100 ;
ZEND ;
**
Real time macro command 3
//3 ZEDGE [#100101 GE 80. ]
#IOG[99,5] = 0 ;
**
Explanation
To use the real time custom macro function, a real time macro
command (RTM command) is coded in an NC program.
- Real time macro command (RTM command)
The real time macro command (RTM command) is a macro command
that starts execution in phase with an NC statement in the program.
After the execution of a real time macro command starts, the RTM
command operates independently of the NC statement.
An RTM command is a statement dedicated to the real time custom
macro function.
An RTM command consists of a set of one or more real time macro
statements (RTM statements).
- Real time macro statement (RTM statement)
The real time macro statement (RTM statement) is a statement
included in an RTM command.
One or more RTM statements make up an RTM command.