Call 31 – display current prt2 port setup, Call 31 – display current prt2 port setup -14, Example – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 164: Purpose, Syntax

Advertising
background image

Publication 1746-RM001A-US-P

12-14 Output Functions

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

®

at node 3, to the

internal string $(1) of the module.

>1

REM EXAMPLE PROGRAM

>10

REM EXECUTE DF1 PLC REMOTE READ FROM INTERNAL

>20

REM STRING WITH NO SLC INTERVENTION

>21

REM SET UP CALL 122

>25

PUSH 5, 3, 10, ASC(N), 0, 10, 10, 1, 1, 1: CALL 122: 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 “SLC FILE CHOSEN FOR CALL 122”

>80

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

>90

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

>100 END

CALL 29 does not require SLC bit handshaking at the end of the command, unlike
CALLs 27, 28, 122, and 123 when using an SLC file as a source or destination.

CALL 31 – Display
Current PRT2 Port Setup

Purpose

Use CALL 31 to display the current PRT2 port configuration on the program port
terminal screen. No arguments are PUSHed or POPped.

Syntax

CALL 31

Example

>CALL 31

1200 Baud

Hardware Handshaking OFF

1 Stop Bit(s)

No Parity

8 Bits/Char

Xon/Xoff

READY

>

Advertising