Call 16: enable/disable df1 packet interrupt – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 200

Advertising
background image

Chapter
Call Routines 0–68

12

12 -10

Use this routine to enable or disable the DF1 packet interrupt capability.
This call has the same functionality as the ONDF1 statement (page 11 -22).
You process the DF1 packet within an interrupt routine. To return to the
point in the program before the interrupt occurred, execute a RETI (page
11 -33) within the routine. Once you enable this call the processor checks
the PRT2 port for a received DF1 message at the end of each line of
BASIC code.

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

If the DF1 packet arrives in PRT2 due to a CALL 122 (page 13 -58) or
CALL 123 (page 13 -66) you receive the DF1 packet interrupt when you
enable CALL 16. However, the DF1 packet is not in BASIC module input
buffer. It has already been removed.

This command has no effect if you have not set JW4 (page 1 -6) properly
and enabled the DF1 protocol (see CALL 108, page 13 -38).

Input and Output Arguments

This routine has one input argument and no output arguments. The input
argument is the beginning BASIC line number of the interrupt routine.
The program jumps to this line number when the PRT2 port buffer receives
a valid DF1 packet. A line number of 0 disables the DF1 packet interrupt.

Syntax

PUSH

beginning line number of interrupt routine

CALL 16

RETI

Example

>20

PUSH 800: REM LINE NUMBER OF START OF INTERRUPT ROUTINE

>30 CALL 16

>800 (BEGINNING OF INTERRUPT ROUTINE)

: (PROCESS THE PACKET)

>850 RETI

CALL 16: Enable/Disable
DF1 Packet Interrupt

Advertising