Call 94 – display current prt1 port setup, Call 96 – clear prt1 input/output buffers, Example – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 174: Purpose, Syntax

Advertising
background image

Publication 1746-RM001A-US-P

12-24 Output Functions

Example

>1

REM EXAMPLE PROGRAM

>30 PUSH 1 : REM REMOTE NODE ADDRESS = 1

>40 PUSH 0 : REM OFFSET = 0

>50 PUSH 10 : REM WORDLENGTH = 10

>60 PUSH 5 : REM THE TIME-OUT VALUE = 0.5 SECONDS

>70 CALL 93 : REM WRITE DATA FROM BASIC OUTPUT BUFFER

>80 POP R : REM GET THE OUTPUT ARGUMENT

>90 IF R<>0 THEN PRINT READ ERROR CODE = ”,R

READY

>RUN

READ ERROR CODE = 5

READY

>

CALL 94 – Display
Current PRT1 Port Setup

Purpose

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

Syntax

CALL 94

Example

>CALL 94

19200 Baud

Hardware Handshaking OFF

1 Stop Bit(s)

No Parity

8 Bits/Char

Xon/Xoff

CALL 96 – Clear PRT1
Input/Output Buffers

Purpose

Use CALL 96 to clear port PRT1 input and output buffers. Use the following
PUSHes to clear the corresponding buffer:

PUSH 0 to clear the output buffer

PUSH 1 to clear the input buffer

PUSH 2 to clear both buffers

Advertising