Omega Speaker Systems VR200 Computer Monitor User Manual


 
7 - 4
7.4 Program to Output Measured Data (in ASCII Code) from VR200
and Write to Disk
100 ‘************************************************************
110 ‘** RS422A Example Program for IBM PC **
120 ‘** **
130 ‘** To input and save measured data **
140 ‘** (ASCII code) **
150 ‘** **
160 ‘************************************************************
170 ‘**
180 ‘** Baud rate: 1200 Stop bit: 1 bit
190 ‘** Parity: none Control: OFF/OFF
200 ‘** Data length: 8 bits Others: LF is sent automatically.
210 ‘**
220
230 OPEN “COM1:1200,N,8,1,LF” AS #1
240 OPEN “TEST.DAT” FOR OUTPUT AS #2
250
260 LF$=CHR$(&HA) :’ Line feed = 0AH
270 PRINT #1,CHR$(27)+”O 01"
280 PRINT #1,”TS0"
290 PRINT #1,CHR$(27)+”T”;
300 PRINT #1,”FM0,01,04"
310 LINE INPUT #1,D$
320
IF LEFT$(D$,1)=LF$ THEN D$=MID$(D$,2) :’ Remove “LF” of head string
330 PRINT D$
340 PRINT #2,D$
350 IF MID$(D$,2,1)<>”E” THEN GOTO 310
360
370 PRINT #1,CHR$(27)+”C 01"
380 CLOSE
390 END