Get -38, Purpose – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 228

Advertising
background image

Publication 1746-RM001A-US-P

13-38 Input Functions

GET

Purpose

Use the GET operator in the Run mode. It returns a result of zero in the
Command mode. The GET operator reads the console input device. If a character
is available from the console device, the value of the character is assigned to GET.
After GET is read in the program, it is assigned the value of zero until another
character is sent from the console device.

Use the GET# operator to read port PRT2 and the GET@ operator to read port
PRT1. The following example prints the decimal representation of any character
sent from the console device.

0000

T4:0

DN

EN

DN

TON

Timer On Delay
Timer

T4:0

Time Base

0.01

Preset

1000

Accum

0

0001

T4:0

DN

O:1

10

L

O:1

10

0002

I:1

10

EQU

Equal
Source A

I:1.1

0

Source B

0

COP

Copy File
Source

#M1:1.0

Dest

#N10:20

Length

20

NEQ

Not Equal
Source A

I:1.1

0

Source B

0

MOV

Move
Source

I:1.1

0

Dest

N10:20

0

L

O:3

0

U

O:1

10

0003

I:2

0

OSR

B3:0

0

U

O:3

0

0004

END

Buffer Data if Status OK

Initiate CALL 122 in the module
every 10 seconds via timer T4:0.

Buffer Status Byte if Non-zero

Reset alarm P.B.

CALL 122 Request Bit

CALL 122 Request Bit

Command Failed Indication

Command Failed Indication

Advertising