C – modem control lines, Device: ram files – Rockwell Automation 2708-DH5B2L_DH5B4L Attended Workstation User Manual
Page 109
Chapter 12
Special Devices in A-B VBASIC
12–13
C – Modem Control Lines
The primary communication port is equipped with DTR and RTS. These can
be set through the IOCTL statements. The character string passed must
contain two bytes. There are two valid options for each byte:
“0” to turn the line off
“1” to turn the line on
The first byte controls DTR, the second controls RTS. Thus:
IOCTL #5, “01”
turns off DTR and turns on RTS.
These modem lines can also be controlled using the BASIC Language
Development Kit routines SetDTR and SetRTS.
AUX has only one line, DTR. It is controlled in the same way as COM. For
future compatibility, always add a second (character) zero, to imply RTS off.
Name: Any name which is not reserved and is within the rules for file
names.
Description:
Data files on a PC are resident on disk. They are RAM resident in the
workstation. A-B VBASIC supports the three types of file access provided
with Visual BASIC, sequential, binary, and random. File I/O is thoroughly
discussed in Microsoft’s “Programming in BASIC”, Chapter 3.
Statements and Functions supported:
①
CLOSE
LOF
EOF
OPEN
GET
INPUT$
PUT
KILL
SEEK Statement
LINE INPUT
SEEK function
LOC
WRITE
CONST DataFile = 1
OPEN “EMPLOYEE” FOR OUTPUT AS #DataFile
PRINT #DataFile, “Employee ”;EmpName$ ;“ – ”;TIME$
CLOSE #DateFile
!
ATTENTION: Both Visual BASIC and A-B VBASIC allow a
PUT to a record number which is greater than the last record in
existence before the PUT. Both BASICs extend the file to the
length required to accommodate the request.
① Refer to Appendix M for any restrictions on Syntax.
Devices: Communication
Ports, Primary and
Auxiliary (cont’d)
Device: RAM Files