beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 97

background image

MVI56-BAS ♦ ControlLogix Platform

Using DH-485 Communications

BASIC Module (DB/BAS Compatible)

User Manual

ProSoft Technology, Inc.

Page 97 of 234

December 13, 2011

8.3

Reading From a Remote DH-485 SLC Data File (CALL 27)

Ladder logic is required to transfer data from a remote DH-485 SLC data file to

the local ControlLogix rack using the MVI56-BAS through CALL 27.
The destination at the local SLC processor is either the CPU output image file,

Class 3 MSG instruction, and/or an internal string in the within the MVI56-BAS

module.
The data transfer procedure is described below:
Step 1: Run CALL 27 to set up the data transfer parameters.
Step 2: The ladder logic sets output file word 0, bit 10 to inform the MVI56-BAS
that the data is ready to be transferred
Step 3: The MVI56-BAS transfers the data from the remote DH-485 SLC data file
to the ControlLogix processor.
Step 4: The MVI56-BAS moves the transfer status into the input file word 1, bits

0 to 7. After that it sets input file word 0, bit 10 to inform the ControlLogix that the

data had been transferred.
Step 5: The ladder logic resets output file word 0, bit 10.
Step 6: The MVI56-BAS resets the input file word, bit 10.
The following example BASIC code shows the simplest possible example that

transfers data from the remote SLC DH-485 data file to the local ControlLogix

(destination file file = Class 3 MSG instruction):

10 REM SHOWS HOW TO TRANSFER DATA FROM A SLC REMOTE FILE
80 PUSH 2, 5, 9, ASC( N), 0, 5, 20, 1, 0, 0: CALL 27: POP S
100 GOTO 100

Refer to BASIC CALLs Syntax (page 105) for more information about the CALL

27 syntax.