4 - special devices in a-b vbasic, Introduction, Special devices in a-b vbasic – Rockwell Automation 2708-NBD VBASIC Language Development Kit User Manual
Page 22
A–B
4
Chapter
4–1
Special Devices in A-B VBASIC
Most I/O in A-B VBASIC is performed by accessing special device names
which are unique to the workstation. In A-B VBASIC, as in Visual BASIC,
devices are accessed with the same statements as files. For example, access
to the workstation’s barcode reader is obtained by an OPEN of the device
named “BAR”, followed by GETs or LINE INPUTs.
We highly recommend use of the VBASIC Language Development Kit
(Catalog No. 2708-NBD) of subroutines for faster, easier development of
larger programs. Subroutines in that library automatically open the required
devices and perform the appropriate timeouts and formatting operations. In
addition, debugging can be done on the PC without the need for downloading
each time a program change is made. Refer to Appendix C.
Most of the following information assumes that you are not using the BASIC
Language Development Kit, but are writing a program which directly
addresses I/O devices.
Here is a list of all reserved filenames which address the special devices.
Note that they are different from DOS device names, and that they do not
contain colons:
Real Devices
Name
Front panel LCD
LCD
. . . . . . . . . . . . . . . . . .
Keypad
KEYS
. . . . . . . . . . . . . . . . . . . . . . . . .
Comm line - primary
COM
. . . . . . . . . . . . . .
Comm line - auxiliary
AUX
. . . . . . . . . . . . .
Barcode
BAR
. . . . . . . . . . . . . . . . . . . . . . . . .
Lights on keypad
LITE
. . . . . . . . . . . . . . . . .
Timer
EGG
. . . . . . . . . . . . . . . . . . . . . . . . . .
Host computer
HOST and NET
. . . . . . . . . . . . . . . . . . .
Pseudo Devices
Name
Queue to host computer
QUE
. . . . . . . . . . . .
User status display
STAT
. . . . . . . . . . . . . . . .
RAM files (any non-reserved name, 12 characters per file name max.)
Introduction