Call 117: get df1 packet length – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 309

Advertising
background image

Chapter
Call Routines 69–127

13

13 -51

Use CALL 117 to get the length of the DF1 data packet.

When CALL 117 is read in a program, the BASIC module checks to see if
DF1 communications have been enabled through CALL 108 (page13 -38).
If DF1 communications have not been enabled, an error message is printed
to the console device and the BASIC module enters Command mode.

After you receive the length of the DF1 packet has been retrieved, you
must use it in conjunction with the GET statement (page11 -12). The GET
statement retrieves the data in the received DF1 packet.

Important: If the receive buffer is found empty, then 0000 is returned to
the argument stack.

Input and Output Arguments

This routine has no input arguments and one output argument. The output
argument returns the length of the oldest DF1 packet queued up in the DF1
receive buffer.

Syntax

CALL 117

POP

length of DF1 packet

Example

>1 REM EXAMPLE PROGRAM

>10 CALL 117

>20 POP X

>30 END

CALL 117: Get DF1 Packet
Length

Advertising