Rockwell-automation 2708-NBD VBASIC Language Development Kit Manual de usuario Pagina 34

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 84
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 33
Chapter 4
Special Devices in A-B VBASIC
413
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 Microsofts “Programming in BASIC, Chapter 3.
Statements and Functions supported:
CLOSE LOF
EOF OPEN
GET PRINT
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 (contd)
Device: RAM Files
Vista de pagina 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 ... 83 84

Comentarios a estos manuales

Sin comentarios