Call 17 – disable df1 packet interrupt, Call 20 – enable processor interrupt – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 99

Advertising
background image

Publication 1746-RM001A-US-P

Execution Control and Interrupt Support Functions 8-3

CALL 17 – Disable DF1
Packet Interrupt

Purpose

Use CALL 17 to disable the DF1 packet interrupt capability enabled with CALL
16. This routine has no input or output arguments.

Syntax

CALL 17

Example

>1

REM EXAMPLE PROGRAM

>10 REM DISABLE DF1 PACKET INTERRUPT ENABLED WITH CALL 16

>20 CALL 17

CALL 20 – Enable
Processor Interrupt

Purpose

Use CALL 20 to allow the processor to interrupt the module. One argument is
PUSHed and no arguments are POPped. The PUSH is the BASIC line number of
the beginning of the interrupt routine that the program should jump to, when
word 0, bit 15 in the CPU output image table, toggles from a low to a high value.
The module detects this transition automatically and jumps to an interrupt
routine. A RETI executed within the interrupt routine returns you to the point in
the module program before the interrupt occurred.

The module monitors CPU output file word 0, bit 15 at the end of every BASIC
line and generates the interrupt if the bit goes high. The CPU must hold the
interrupt request bit low for at least 10 milliseconds prior to requesting interrupt
service. The bit must be held high for at least one scan so the bit can be detected by
the module.

If another interrupt is detected before the previous one is fully serviced, the new
interrupt is marked pending. Only one interrupt is pending at a time.

Interrupts are disabled when the module is in Command mode. CALL 20 disabled
is the default of the module when entering Run mode. CALL 20 must be
re-executed every time Run mode is entered.

Syntax

PUSH [BASIC line number]
CALL 20

Advertising