Rockwell Automation 8520 9/Series CNC Lathe User Manual

Page 733

Advertising
background image

Program Interrupt

Chapter 29

29-3

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,

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. 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.

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:

an end of program (M02 or M30) block is read
a new program is selected as active
a control reset is performed

Advertising