Programming instructions

NC Programming 17VRS NC Events
7-5
DOK-MTC200-NC**PRO*V17-ANW1-EN-P
7.4 Interrupting NC Events
The CNC can use NC-events to influence the NC-program execution at
any desired time. Since the status of NC-events can be changed by the
SPS and by other processes, the NC-program can be made to branch
conditional upon certain signal changes.
The control of NC-program flow consists of being able to interrupt the
execution of the active NC-block including the current axis moves and to
call a subroutine and then to return to the interrupted NC-block or to make
a complete branch and to continue the NC-program at a different location.
The interrupting NC-events permit, for example, a move to a position,
which is scanned for, (limit switch), gaging cycles (probe) or joining op-
erations (force sensor). All manner of other conditions used to trigger the
interruption of a move or simply to modify the NC-program flow are con-
ceivable.
The response time to an external NC-event typically is 50 milliseconds
with the CNC.
NC-events from 0 .. 7 of each process are reserved for the interrupt-con-
trolled program branches. If a condition is met, the corresponding NC-
event assumes the 1 state. The priority of NC-events increases with their
number. NC-event "1" has a higher priority than NC-event "0," and NC-
event "7" has the highest priority. This permits a response to an external
NC-event while the handling of a previously detected low-priority NC-
event is not yet completed.
The first action taken to handle an external NC-event is that all axis
moves in the process are brought to a stop as soon as possible. Spindles
are not stopped when an NC-event is called. The position of the stop is
then calculated back into the program coordinate system so that it can be
used as the starting position for the following move. In addition, the previ-
ously prepared motion blocks are cleared, and block processing begins a
new starting at the point in the program which was defined as the start of
NC-event handling. The start of NC-event handling is identified by the
branch label switch was programmed with the NC-event.
The supervision of NC-events and the appropriate response only takes
place when an advance NC-program is running. All NC-event supervi-
sion activities are deactivated at the end of the program, when an axis
is jogged, or when the program is reset by means of a Control Reset.
NC-event commands are processed to completion at the end of the
NC-block. No more than one command for asynchronous handling of
NC-events can be programmed in an NC-block.
NC-events can also be changed by the SPS program. Therefore
please refer to the machine builder's information since the builder may
have used various NC-events for synchronization purposes.