Device: host computer (cont’d) – Rockwell Automation 2708-DH5B2L_DH5B4L Attended Workstation User Manual

Page 103

Advertising
background image

Chapter 12

Special Devices in A-B VBASIC

12–7

Note: There is no queue for data FROM the host, only a single buffer. Input
operations from HOST and NET access this buffer.

As just mentioned, the FIFO queue is a special file. As such, it can be
manipulated as a file, through the reserved file name QUE.

IMPORTANT NOTE: Outputs to the QUE device will remain in the queue
and will not be sent to the host until the QUE device is closed and the HOST
device is opened. Nothing further needs to be done with the HOST device; it
only needs to be left open until the entire queue is emptied.

If, on the other hand, data should be routed to the host as quickly as possible,
do not use the QUE device at all, but rather send everything directly to the
HOST device. It will still use the queue, but will not wait to transmit.

General restrictions and warnings:

1. Only printable ASCII characters may be moved through the network.

Output only characters within this range:

Lowest valid: Space, CHR$(32), Hex 20
Highest valid: }(right curly bracket), CHR$(125), Hex 7D

Programs which access QUE as a binary file will also encounter carriage
return/line feed sequences. These have been inserted by the interpreter.
Do not remove them or try to insert them explicitly using CHR$( ).

2. Like any other RAM file, the size of QUE and HOST is limited by

physical RAM. Use the FRE function often to prevent out-of-memory
conditions which could have disastrous effects on operations.

3. All output operations must contain a complete record in ONE statement.

All outputs place a trailing carriage return/line feed sequence after the
data provided. It is not possible, for example, to use multiple PRINT
statements, terminated by a comma to assembly a HOST or QUE record
piecemeal. THIS RESTRICTION IS ENFORCED, see PRINT.

4. Do not allow HOST and QUE to be OPEN at the same time.

5. Input FROM the host computer may not begin with < or > or a numeric

digit (0 to 9). Chapter 8 describes the effect which these characters have
on the firmware.

6. All output to NET has the potential disadvantage that its data might be

classified as a network status or other error message and not application
related data. This can happen because, when using the NET device, the
“Transaction Code” digits 9 and 10 of the 10 character record header are
set to zeroes, and cannot be changed by an IOCTL statement (see IOCTL
description later in this chapter). Two zeroes are typically an indication of
a status or diagnostic message, BASIC ERROR, or other system
generated response.

Device: Host Computer
(cont’d)

Advertising
This manual is related to the following products: