ProSoft Technology MVI56-BAS User Manual
Page 78
Using ASCII Communications
MVI56-BAS ♦ ControlLogix Platform
User Manual
BASIC Module (DB/BAS Compatible)
Page 78 of 234
ProSoft Technology, Inc.
December 13, 2011
6.3
ASCII Data Transfer from CLX to MVI56-BAS Serial Port
The MVI56-BAS can interface serial devices such as printers and bar code
readers to the ControlLogix processor. This section shows how to send data from
the ControlLogix to a remote ASCII device.
In order to transfer data from the ControlLogix processor to a MVI56-BAS serial
port, CALL 23 is required to set up the transfer parameters. The following shows
a CALL 23 example:
10 REM BASIC CALL 23
20 PUSH 2: REM SERIAL PRT SELECTION
30 PUSH 1: REM SOURCE FILE
40 PUSH 0: REM SOURCE FILE OFFSET
50 PUSH 1: REM INTERNAL STRING NUMBER
60 PUSH 0: REM BYTE SWAP
70 CALL 23
80 POP S: REM CALL STATUS
9999 GOTO 9999
After CALL 23 is executes, the MVI56-BAS module gets the data from the
selected source file and transfer it to the selected destination port (or internal
string). CLX Input and Output image bits are used for handshaking purposes.
If using a MSG instruction as the data source, the following MSG parameters
must be configured:
After CALL 23 is successfully executed, the required transfer parameters are
configured.
At this point the transfer sequence can begin:
Step 1 - The ladder logic sets the correct output image bit in order to inform the
MVI56-BAS there is new data to be transferred:
Destination is PRT1 => Local:x:O.Data[0].6