7-11
Sample Program
7
Output the Measurement Data (Binary Code)
Read out the measurement data by BINARY code from DR series, display on CRT of the personal
computer, and save to floppy disk.
10
‘
20
OPEN “COM1:E81N” AS #1
30
OPEN “TS0BIN.DAT” FOR OUTPUT AS #2
40
‘
50
PRINT #1,CHR$(&H1B)+”O 01"
60
LINE INPUT #1,D$ :PRINT D$
70
PRINT #1,”TS0"
80
LINE INPUT #1,D$ :PRINT D$
90
PRINT #1,”BO1"
100
LINE INPUT #1,D$ :PRINT D$
110
PRINT #1,CHR$(&H1B)+”T”
120
LINE INPUT #1,D$ :PRINT D$
130
PRINT #1,”FM1,001,010"
140
D$=INPUT$(2,#1)
150
PRINT #2,D$
160
A=CVI(MID$(D$,1,2))
170
PRINT A
180
D$=INPUT$(A,#1)
190
PRINT #2,D$
200
PRINT ASC(MID$(D$,1,1)); :PRINT “/”;
210
PRINT ASC(MID$(D$,2,1)); :PRINT “/”;
220
PRINT ASC(MID$(D$,3,1)); :PRINT
230
PRINT ASC(MID$(D$,4,1)); :PRINT “:”;
240
PRINT ASC(MID$(D$,5,1)); :PRINT “:”;
250
PRINT ASC(MID$(D$,6,1))
260
‘
270
L=0
280
FOR I=7 TO A
290
PRINT RIGHT$(“0”+HEX$(ASC(MID$(D$,I,1))),2)+” “;
300
L=L+1
310
IF L=5 THEN L=0 : PRINT
320
NEXT I
330
‘
340
PRINT #1,CHR$(&H1B)+”C 01"
350
LINE INPUT #1,D$ :PRINT D$
360
CLOSE
370
END
7.3 RS-422-A/RS-485 Sample Programs
Содержание DR130 SERIES
Страница 1: ...http www omega com e mail info omega com User sGuide DR130 DR230 DR240 SERIES Communication Interface ...
Страница 39: ...4 9 Command Format 4 4 5 Input Range Parameter This page intentionally left blank ...
Страница 40: ...4 10 4 5 Input Range Parameter This page intentionally left blank ...
Страница 56: ...5 15 Commands 5 This page intentionally left blank 5 5 Other Settings ...
Страница 71: ...6 9 Output Format 6 This page intentionally left blank ...