Flexible NC programming
1.14 Interrupt routine (ASUB)
Job planning
Programming Manual, 07/2010, 6FC5398-2BP40-0BA0
113
References
Function Manual, Basic Functions; BAG, Channel, Program Operation, Reset Response
(K1),Chapter: "Asynchronous subprograms (ASUBs), interrupt routines"
1.14.2 Creating an interrupt routine
Create interrupt routine as subprogram
The interrupt routine is identified as a subprogram in the definition.
Example:
Program code Comments
PROC LIFT_Z ; Program name "ABHEB_Z"
N10 ... ; The NC blocks then follow:
...
N50 M17 ; At the end, the end of the program and return to the main
program.
Save modal G functions (SAVE)
The interrupt routine can be designated by defining with SAVE.
The
SAVE attribute means that the active modal G functions saved before calling the interrupt
routine and are re-activated after the end of the interrupt routine (see "
Subprograms with
SAVE mechanism (SAVE) (Page
161)").
This means that it is possible to resume processing at the interruption point after the interrupt
routine has been completed.
Example:
Program code
PROC LIFT_Z SAVE
N10 ...
...
N50 M17
Assign additional interrupt routines (SETINT)
SETINT instructions can be programmed within the interrupt routine (see "Assign and start
interrupt routine (SETINT)" (Page
114)) therefore activating additional interrupt routines.
They are triggered via the input.
References
You will find more information on how to create subprograms in Chapter "Subprograms,
Macros".