beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 181

background image

MVI56-BAS ♦ ControlLogix Platform

BASIC CALLs Syntax

BASIC Module (DB/BAS Compatible)

User Manual

ProSoft Technology, Inc.

Page 181 of 234

December 13, 2011

CALL 29: Read/Write To/From Internal String (DF1 or DH-485)

Use CALL 29 with CALL 27, CALL 28 (DH-485) or CALL 122, CALL 123 (DF1) to

use an internal string as a source (or destination) data. The advantage is that

using CALL 29 does not require ladder to transfer data if one of these CALLs

was executed before CALL 29.

Syntax:

PUSH [A]
CALL 29
POP [B]

Where:
A = BASIC CALL to be activated. Valid values are 27, 28 (DH-485) or 122 or
123 (DF1).
B = CALL 29 status code. It returns one of the following values:
0 = successful
1 = selected CALL is disabled (27, 28, 122 or 123)
255 = the internal string is not selected in CALL (27, 28, 122 or 123)

Example:

10 REM Execute DF1 PLC remote read from internal
20 REM string with no CLX intervention
30 PUSH 5,3,10,ASC(N),0,10,10,1,1,1: CALL 122: POP STATUS
40 PUSH 122: CALL 29: POP S
50 IF(S=1) THEN PRINT "CALL 122 Not Active!"
60 IF(S=255) THEN PRINT "CLX File Chosen for CALL 122"
70 IF(S=0) THEN PRINT "Successful Transfer"
80 IF (S<>0) THEN PRINT "Unsuccessful Transfer!"
90 END