Programming instructions

9-12
Commands for Controlling Processes and Programs NC Programming 17VRS
DOK-MTC200-NC**PRO*V17-ANW1-EN-P
9.5 Reverse Vectors
The CNC permits flags to be defined for reverse programs based on vari-
ous program states relating to certain machine positions. These with-
drawal programs (reverse programs) are used to program how the NC
axis must withdraw from the various positions and return to a defined
state. The flags for the reverse programs, which are identified by labels,
are referred to as "reverse vectors."
The label ".HOME" was defined as the basic reverse vector for the main
program after control power-on. This basic reverse vector must be part of
every NC program, or it must be present in program no. 99 or in the NC
cycle memory, and it must mark the beginning of the basic reverse pro-
gram.
After each end of program via "RET" or "BST" and after each time the
controller is reset in the "power-on state," the reverse vector in the main
program points to the label ".HOME", and all reverse vectors in the sub-
programs are cleared.
Set Reverse Vector ‘REV’
The NC block containing the label declared as the command parameter is
defined as the first NC block in the reverse program—in other words, a
reverse program would start processing at this label beginning at the NC
block.
REV <label>
REV .HOLE1
Reverse vectors can also be defined within subroutines. Such reverse
vectors in subroutines have the same nesting structure in the reverse
program as in the advance program. Reverse programs from subroutines
must also be terminated by the "RTS" command.
When a subroutine is closed, the reverse vectors set up in it are auto-
matically cleared.
A reverse vector programmed in an NC block will not be activated until
the end of the NC block execution.
The label programmed in conjunction with "REV" must be located in
the NC program in which the "REV" command was programmed. The
"REV" command will not find the label in the global program identified
by number 99 or in the NC cycles memory.
Example NC program - Global Homing Program
.HOME Basic reverse vector
MRF Reference tool magazine
D0 Cancel D overrides
G40 G47 G53 G90 Home
G74 Z0 F1000 Go to Z axis reference point
G74 X0 Y0 F1500 Go to X and Y axis reference point
T0 BSR .M6 Tool from spindle to magazine
MRY Wait until magazine is in position
RET End of program
Syntax