Using the envpc simulator (cont’d) – Rockwell Automation 2708-NBD VBASIC Language Development Kit User Manual

Page 45

Advertising
background image

Chapter 5

A-B VBASIC Application Library

5–8

Display and Keyboard

You may use the full range of PRINT, LOCATE, etc. functions to write to the
display. Do not use the cursor size arguments to LOCATE, but you can turn
the cursor on and off using the third argument.

Reading from the keyboard should only be done using TestEvent% or one of
the functions which use it such as ReadEvent%, ReadStr%, ReadInt%,
Menu%, etc. The keys are returned as the ASCII value of the key. Special
keys such as function keys and cursor keys, will return a negative event code.
All special keys have named constants in ENV.BAS which MUST be used to
test for a key value.

Network I/O

Only LINE INPUT and LINE OUTPUT are supported via TestEvent% as a
NetEvent. The data is left in InNet$. Output to NET is supported with the
Send subroutine. (Note that, as with any output to NET, you must first test to
make sure the previous output to NET has completed, or you will get an
error. This means the host must be online. If you need to send data while the
workstation might be offline from the host, use SendQue instead.) Output to
the network through the queue is supported via SendQue. No support is
provided for opening the QUE device and accessing it as a file. No support is
provided for PRINT # USING to the network.

COM and AUX

Only LINE INPUT is supported for input via TestEvent%. The events are
ComEvent and AuxEvent, and the data is left in InCom$.

For OUTPUT you build a string which is output in exactly the form you
provided it (Line-Feeds are added to Carriage Returns when that option is
enabled). No support is provided for PRINT # USING to the COM or AUX
ports.

Support for the control lines is provided with SetDTR and SetRTS.

Support for the status line is via GetDSR%. No event support is provided for
DSR state changes.

Note: While the BASIC Language Development Kit subroutines will accept
the AUX port as a target for DTR, RTS, and DSR commands, the
WORKSTATION DOES NOT HAVE THESE LINES on the AUX port, and
the results are unpredictable!

Using the ENVPC Simulator
(cont’d)

Advertising