beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 192

background image

BASIC CALLs Syntax

MVI56-BAS ♦ ControlLogix Platform

User Manual

BASIC Module (DB/BAS Compatible)

Page 192 of 234

ProSoft Technology, Inc.

December 13, 2011

CALL 122: Read Remote DF1 PLC Data File

Use CALL 122 to read up to 99 words of data from a remote DF1 node to the

CLX or a MVI56-BAS internal string. For more information about CALL 122

usage (including ladder logic) refer to Using DF1 Protocol Communications.

Syntax:

PUSH [A]
PUSH [B]
PUSH [C]
PUSH [D]
PUSH [E]
PUSH [F]
PUSH [G]
PUSH [H]
PUSH [I]
PUSH [J]
CALL 122
POP [K]

Where:
A = type of PLC READ command, can have one of the following values:
0 = disable the previously executed CALL 122
2 = PLC-2 unprotected READ command (common interface file)
3 = PLC-3 file: word range READ command
5 = PLC-5 file: typed READ command
B = remote DF1 node address
C = file number to be read (between 0 and 255). If sending a PLC-2 unprotected

READ command to a SLC DF1 channel use 9 as the file number.
D = file type. It should have one of the following values:

File Type Code

Description

Words/Elements

Valid Range

ASC(N)

Integer File

1 word/element

1 to 99

ASC(S)

Status File

1 word/element

1 to 99

ASC(C)

Counter File

3 words/element

1 to 33

ASC(T)

Timer File

3 words/element

1 to 33

ASC(B)

Bit File

1 word/element

1 to 99

ASC(R)

Control FIle

3 words/element

1 to 33

ASC(I)

Input File

1 word/element

1 to 99

ASC(O)

Output File

1 word/element

1 to 99

E = remote file offset
F = number of elements to be transferred. Refer to the table above for the valid

ranges.
G = message time-out. This value is expressed as 0.1s and valid range is

between 1 to 255
H = destination file. The valid values are listed below: