Output the measurement data (binary code) – Yokogawa DR240 User Manual

Page 109

Advertising
background image

8-11

IM DR231-11E

Sample Program

8

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

8.3 RS-422-A/RS-485 Sample Programs

Advertising
This manual is related to the following products: