Owner's manual
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 a n 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 i s 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 programO11111 as a type 1 interrupt and allows it to be
executed whentheinterruptsignal fromswitch0 isreceived.
N2M96L1P12345; EnablesprogramO12345 asa type 2interruptandallowsitto be
executed whentheinterruptsignal fromswitch1 isreceived.
N3M96L3P11111; Enablesprogram O11111 as a type 2 interrupt and allows it to be
executed whentheinterruptsignal fromswitch3 isreceived. Note
that thisisthesameprogram asselected fortype0 interrupts.
N4M97L3; Disablesany interruptprogramthatis called byswitch 3. Any signal
to execute aninterruptfromswitch3 isignoredafterthis blockis
executed unlessreactivated witha M96L3 block.
N5M96L0P22222; Alterstheprogramthatiscalledforthe interruptwith switch0. The
newprogramcalled whentheinterruptsignal is received isO22222.
N6M97L0; Disablesinterruptswitch0.
N7M97L1;
Disables interruptswitch 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.










