ProSoft Technology MVI56-BAS User Manual
Page 99

MVI56-BAS ♦ ControlLogix Platform
Using DH-485 Communications
BASIC Module (DB/BAS Compatible)
User Manual
ProSoft Technology, Inc.
Page 99 of 234
December 13, 2011
8.5
Data Transfer Between the MVI56-BAS and Remote DH-485 Data Files
In order to transfer data from the MVI56-BAS output buffer to a Remote DH-485
data file, use CALL 91. It is necessary initially to transfer data from the MVI56-
BAS to the internal Output Buffer (starting at address 0) before using CALL 91.
Up to 40 words can be transferred using this method.
The following BASIC program is an example of how to transfer data using CALL
91. The program initially transfers 20 registers to the module output buffer using
CALL 24. After the data has been moved, the program uses CALL 91 to transfer
the 20-register block to the remote DH-485 data file.
10 FOR I=0 TO 19
20 K=100-I
30 PUSH K: REM VALUE TO BE TRANSFERRED
40 PUSH I: REM OUTPUT BUFFER ADDRESS
50 CALL 24
60 NEXT I
70 REM TEST CALL 91
80 PUSH 5: REM REMOTE NODE ADDRESS
90 PUSH 9: REM REMOTE DEVICE FILE NUMBER
100 PUSH ASC(N): REM REMOTE DEVICE TYPE
110 PUSH 0: REM OFFSET
120 PUSH 20: REM NUMBER OF ELEMENTS
130 PUSH 10: REM TIMEOUT
140 CALL 91
150 POP S: REM STATUS
160 PRINT S
Refer to BASIC CALLs Syntax (page 105) for more information about CALLs 24,
25 and 91.