Call 32: enable/disable processor interrupt – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 212

Advertising
background image

Chapter
Call Routines 0–68

12

12 -22

Important: This call requires the BASIC module jumper JW5 to be in 16
point mode (page 1 -7).

Use CALL 32 to allow the PLC processor to interrupt the BASIC module.
When enabled the BASIC module monitors PLC output bit 16 for a 0 to 1
transition at the end of every BASIC line and generates the interrupt if the
bit is set. The PLC ladder logic should then clear the PLC output bit 16.

Interrupts are disabled when the BASIC module is in Command mode.
When you enter Run mode CALL 32 is disabled until you enable it.
You must re-execute CALL 32 every time you enter Run mode.

Input and Output Arguments

This routine has one input and no output arguments. The input argument is
the beginning line number of the interrupt routine. The program jumps to
this line number when PLC output bit 16 is set. The BASIC module
detects this transition automatically and jumps to the interrupt routine.
If you execute a RETI (page 11 -33) within the interrupt routine, you return
to the point in the program before the interrupt occurred. Line number 0
disables the processor interrupt.

Syntax

PUSH

beginning line number of interrupt routine

CALL 32

Example

>1 REM EXAMPLE PROGRAM

>10 REM ENABLE PROCESSOR INTERRUPTS

>20 PUSH 1000

>30 CALL 32

>1000 (BEGINNING OF THE PROCESSOR INTERRUPT ROUTINE)

:

>1050 RETI

Sample Ladder Logic

( )

O:001

16

CALL 32: Enable/Disable
Processor Interrupt

Advertising