beautypg.com

Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 246

background image

Chapter
Call Routines 0–68

12

12 -56

Syntax

PUSH

type of DH-485 WRITE command

PUSH

remote DH-485 device node number

PUSH

remote DH-485 device file number

PUSH

remote DH-485 device file type

PUSH

element offset into destination file

PUSH

number of elements to be transferred

PUSH

message time-out value(X100MS)

PUSH

block transfer write buffer

PUSH 1

PUSH

Internal string number

CALL 50

Example

>10 PUSH 64 : CALL 4 : REM SET BLOCK TRANSFER WRITE LENGTH

>20 PUSH 2 : REM SLC TYPED WRITE

>30 PUSH 1 : REM REMOTE SLC NODE NUMBER

>40 PUSH 7 : REM REMOTE SLC FILE NUMBER

>50 PUSH ASC(N) : REM REMOTE SLC FILE TYPE

>60 PUSH 0 : REM ELEMENT OFFSET INTO DESTINATION FILE

>70 PUSH 20 : REM NUMBER OF ELEMENTS TO BE TRANSFERRED

>80 PUSH 10 : REM MESSAGE TIME-OUT VALUE(X100MS)

>90 PUSH 0 : REM LOCAL BTW BUFFER

>100 PUSH 1 : REM ALWAYS 1

>110 PUSH 0 : REM INTERNAL STRING NUMBER–UNUSED FOR THIS EXAMPLE

>120 CALL 50

>130 POP S

>140 IF (S=1) THEN PRINT “CALL 50 DISABLED”

>150 IF (S=2) THEN PRINT “CALL 50 BAD INPUT PARAMETER”

>160 IF (S=3) THEN PRINT “PORT DH485 NOT ENABLED”