Rockwell Automation 2708-DH5B2L_DH5B4L Attended Workstation User Manual

Page 106

Advertising
background image

Chapter 12

Special Devices in A-B VBASIC

12–10

LINE INPUT # for HOST and NET
GET # for HOST and NET
(OPEN with RANDOM)

These statements will read one record which the host computer has sent to
this. If there is no record available, the program waits for its arrival. Use the
EOF or LOC functions first if waiting is not acceptable.

LINE INPUT # for QUE
GET # for QUE
(OPEN with RANDOM enforced)

These statements act as if a file is being accessed because QUE is a file.

EOF for HOST and NET

EOF returns TRUE when a record is available for reading. When FALSE,
nothing is present.

LOC for HOST and NET

LOC returns the number of characters which can be read from the network
input buffer.

Example:

IF LOC(#1) 0 THEN

LINE INPUT #1, INLINE$

ELSE

‘ Do something else

END IF

LOF for HOST

LOF returns the size of the queue, that is, the number of bytes awaiting
transmission to the host.

LOF for NET

LOF returns the number of bytes free in the network output buffer. When
non-zero, a single record of that size may be output without waiting. When 0,
output is permitted but the A-B VBASIC program will wait until the
previous record is accepted by the network. Note that only one record may be
output even though the record is shorter than the buffer. For example, say the
function returned 200. It is not possible to output 3 records of 20 bytes
without waiting.

Details of Specific Statements
and Functions (cont’d)

Advertising
This manual is related to the following products: