Purpose, Syntax, Example – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual
Page 209

Publication 1746-RM001A-US-P
Input Functions 13-19
CALL 84 – Transfer
DH485 Interface File to
BASIC Input Buffer
Purpose
Use CALL 84 to transfer up to 40 words starting at the designated offset of the
DH485 Common Interface File to the module input buffer starting at the same
designated offset from word 0. This routine has two input arguments and one
output argument. The first input argument is the starting offset in the DH485
Common Interface File and the module input buffer (0 to 39). If the number is not
within the range 0 to 39, the output argument equals 1, and the transfer does not
take place. The second input argument is the length in words to be transferred (1 to
40). If the number of words is not within the range 1 to 40, the output argument
equals 2, and the transfer does not take place.
•
0 – Successful transfer
•
1 – Illegal starting offset
•
2 – Illegal length
Word integrity is guaranteed during this transfer. File integrity is not. Handshaking
bits can be used in your application program to provide file integrity.
Syntax
PUSH [starting word offset in DH485 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 : REM
PRINT ERROR
READY
>RUN
READY
>