beautypg.com

Device: lcd display, Introduction (cont’d) device: lcd display – Rockwell Automation 2708-DH5B2L_DH5B4L Attended Workstation User Manual

Page 98

background image

Chapter 12

Special Devices in A-B VBASIC

12–2

Some statements and intrinsic functions implicitly refer to a specific device.
These are:

Front panel LCD

CLS, CSRLIN, LOCATE, POS, PRINT and WRITE

. . . . .

(without file numbers)

Keypad

INKEY$, INPUT$ (without filenumber),

. . . . . . . . . . . .

LINE INPUT (without filenumber)

Beeper

BEEP, SOUND

. . . . . . . . . . . . .

Timer

DATE$, SLEEP, TIME$, TIMER

. . . . . . . . . . . . .

Files

KILL

. . . . . . . . . . . . . .

Reserved device name: LCD
These statements always access the LCD display:

PRINT and PRINT USING (without a file number)
WRITE (without a file number)
CLS
CSRLIN
LOCATE
POS
Prompts for LINE INPUT (without a file number)

As an alternative, OPEN “LCD” may be used to associate the device with a
file number and PRINT # or WRITE # used.

Note: Once OPENed, the “LCD” file CANNOT be closed.

At program start, the LCD displays the words “BASIC START”. The cursor
is at the home position and is on. The LCD is set to clear when the program’s
first character is output to it. Thus, the programmer can act as if the LCD
were actually already blank.

PRINTs to the LCD, ending without a comma or semicolon (, or ;) leave the
cursor at the start of the next line. Thus, the next PRINT causes that line to
be cleared before data is written.

PRINT statements terminated by a comma or semicolon leave the cursor
where it was at statement’s end, as shown in the following example.

Introduction (cont’d)

Device: LCD Display

This manual is related to the following products: