Syntax, Example – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 202

Advertising
background image

Publication 1746-RM001A-US-P

13-12 Input Functions

Whenever an attempt is made to read a remote packet, the status of the read is
placed into input word 1, bits 0 through 7. These values have the same definition
as the values POPped in CALL 92. The status becomes valid when the module sets
the input file word 0, bit 10.

Syntax

PUSH [type of READ command]

PUSH [remote node address]

PUSH [remote file number]

PUSH [remote file type]

PUSH [starting word offset of remote file]

PUSH [number of words to be transferred]

PUSH [message time-out value]

PUSH [selection of destination file]

PUSH [word offset within destination file]

PUSH [string number]

CALL 27

POP [CALL 27 status]

Example

>1

REM EXAMPLE PROGRAM

>10

REM ENABLE REMOTE DH485 READ COMMAND INTERRUPT

>20

PUSH 2 : REM SLC TYPED READ COMMAND

>30

PUSH 2 : REM NODE ADDRESS OF REMOTE SLC

>40

PUSH 7 : REM FILE NUMBER OF REMOTE SLC

>50

PUSH ASC(N) : REM FILE TYPE OF REMOTE SLC

>60

PUSH 100 : REM REMOTE ELEMENT OFFSET INTO REMOTE SLC FILE

>70

PUSH 20 : REM NUMBER OF ELEMENTS TO BE TRANSFERRED

>80

PUSH 5 : REM MESSAGE TIMEOUT (X100MS)

>90

PUSH 1 : REM DESTINATION FILE TO PUT DATA (M1 FILE)

>100 PUSH 0 : REM WORD OFFSET INTO DESTINATION FILE

>110 PUSH 0 : REM STRING NUMBER - NOT AVAILABLE FOR THIS

EXAMPLE

>120 CALL 27

>130 POP S

>140 IF (S<>0) THEN PRINT “UNSUCCESSFUL CALL 27 SETUP”

Advertising