Selecting an interrupt program – Rockwell Automation 8520-MUM 9/Series CNC Mill Operation and Programming Manual Documentation Set User Manual

Page 761

Advertising
background image

Program Interrupt

Chapter 29

29-3

Selecting an Interrupt Program

Any legal subprogram or paramacro may be selected as a interrupt
program (refer to the section in chapter 10 on subprograms or chapter 28
for paramacros). For a program to be used as an interrupt program it must
have a program name of 5 numeric characters following an O address (see
the section on program names in chapter 10). This interrupt program must
contain an M99 block as the last block in the interrupt program. This M99
block has all the same restrictions as an M99 block for a subprogram as
discussed in chapter 10.

The subprogram or paramacro program is assigned to a particular type of
interrupt by programming a P word in the M block that enables the
interrupt (M96 in this manual). When selecting a program with a P word
note that only the numeric value of the program name is entered, the letter
O is omitted. For example, programming:

M96L0P11111;

would enable the program O11111 as a type 1 interrupt and allow it to be
executed when switch 0 sends a signal to PAL. If the program called with
the P word does not exist, the control will generate an error when the
switch that activates the program is activated. Note the P word is not
programmed in the disable M code block (M97 in this manual).

Example 29.1

Enabling and Disabling the Interrupt Features

N1M96L0P11111;

Enables program O11111 as a type 1 interrupt and allows it to be
executed when the interrupt signal from switch 0 is received.

N2M96L1P12345;

Enables program O12345 as a type 2 interrupt and allows it to be
executed when the interrupt signal from switch 1 is received.

N3M96L3P11111;

Enables program O11111 as a type 2 interrupt and allows it to be
executed when the interrupt signal from switch 3 is received. Note
that this is the same program as selected for type 0 interrupts.

N4M97L3;

Disables any interrupt program that is called by switch 3. Any signal
to execute an interrupt from switch 3 is ignored after this block is
executed unless reactivated with a M96L3 block.

N5M96L0P22222;

Alters the program that is called for the interrupt with switch 0. The
new program called when the interrupt signal is received is O22222.

N6M97L0;

Disables interrupt switch 0.

N7M97L1;

Disables interrupt switch 1.

Important: All program interrupts that are enabled in a part program are
automatically disabled by the control when either an end of program (M02
or M30) block is read, a new program is selected as active, or a control
reset is performed.

Advertising