Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 209

Advertising
background image

Chapter
Call Routines 0–68

12

12 -19

Syntax

PUSH

49, 50, 122, or 123 for the CALL you want to activate

CALL 29

POP

status of transaction

Example

CALL 122 must be enabled with internal string only prior to executing
CALL 29 in this example. Upon execution of CALL 29, an attempt is
made to transfer one element from integer file 10, starting at element 0 of
the PLC-5 processor at node 3, to the internal string $(1) of the BASIC
module.

>5 STRING 1000, 100

>10 REM EXECUTE DF1 PLC REMOTE READ FROM INTERNAL

>20 REM STRING WITH NO PLC INTERVENTION

>21 REM SET UP CALL 122

>25 PUSH 5, 3, 10, ASC(N), 0, 10, 10, 1, 1, 1: CALL 122

>27 POP STATUS

>30 PUSH 122

>40 CALL 29

>50 POP S

>60 IF (S=1) THEN PRINT “CALL 122 NOT ACTIVE”

>70 IF (S=255) THEN PRINT “PLC FILE CHOSEN FOR CALL 122”

>80 IF (S=0) THEN PRINT “SUCCESSFUL TRANSFER”

>90 IF (S<>0) THEN PRINT “UNSUCCESSFUL TRANSFER”

>100 END

Advertising