Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 270

Advertising
background image

Chapter
Call Routines 69–127

13

13 -12

Use CALL 84 to transfer up to 40 words starting at the designated offset of
the DH-485 Common Interface File to the BASIC module input buffer
starting at the same designated offset from word 0.

This call does not interrupt nor is it interrupted by a DH-485 read or write
from or to the DH-485 common interface file.

Input and Output Arguments

This routine has two input arguments and one output argument. The first
input argument is the starting offset in the DH-485 Common Interface File
and the BASIC module input buffer (100 to 139). The second input
argument is the length in words to be transferred (1 to 40). The output
argument is the status of the call:

0 = successful transfer
1 = illegal starting offset; transfer does not take place
2 = illegal length; transfer does not take place

Syntax

PUSH

starting word offset in DH-485 interface file

PUSH

number of words to be transferred

CALL 84

POP

transfer status

Example

>1 REM EXAMPLE PROGRAM

>40 PUSH 0 : REM OFFSET ADDRESS = 0

>50 PUSH 32 : REM WORD OFFSET = 32

>60 CALL 84 : REM TRANSFER THE DATA TO THE BASIC INPUT BUFFER

>70 POP R : REM GET THE OUTPUT ARGUMENT

>80 IF (R<>0) THEN PRINT “TRANSFER ERROR CODE = ”,R

>90 REM PRINT ERROR

CALL 84: Transfer DH-485
Common Interface File to
BASIC Input Buffer

Advertising