62
Programa de ejemplo en QBASIC
start:
EOFch=26
CLS
port%=1
PRINT SPC(20); "DPI 740 Druck Iniversal Communications
Interface : Example Program" PRINT SPC (19);
"=============================================="
PRINT
PRINT Before commencing, ensure that the DPI 740 Communications
Parameters are set as follows:"
PRINT
PRINT "Baudrate : 9600, Parity : None, Handshaking : None, Databits :
8, Stopbits : 1"
PRINT
PRINT "The PC serial comms port used is COM";
PRINT port%
PRINT
PRINT "Please note DOS File Name : Pressure Readings will be Logged
in this File"
PRINT
INPUT Nm$
PRINT
PRINT "Ready"
PRINT "Starting communications"
OPEN Nm$ FOR OUTPUT AS #2
IF port% = 2 THEN
OPEN "COM2:9600,N,8,1,RS,RB6000" FOR RANDOM AS #1
ELSE
OPEN "COM2:9600,N,8,1,RS,RB6000" FOR RANDOM AS #1
END IF
PRINT "Comm port opened OK"
a$=""
PRINT #1, "#sa?" = CHR$(13);
PRINT #2, "#sa?" = CHR$(13) = CHR$(10);
GOSUB GetReply
address$=RIGHT$(a$,4)
address$=LEFT$(address$,2)
KE0200 Edición N.º 1
DPI 740 Manual del usuario
Tabla 6-3
PRINT "Press <CTRL><BREAK> to exit"