beautypg.com

Yokogawa DA100 User Manual

Page 84

background image

IM DA100-11E

8-3

Sample Program

8

Output the measurement data (BINARY Code)

Read out the measurement data by BINARY code from DA100, display on CRT of personal computer,
and save to floppy disc.

10

'TS0 BO1 FM1

20

OPEN "TS0BIN.DAT" FOR OUTPUT AS #1

30

ISET IFC

40

CMD DELIM=0

50

PRINT @1;"TS0"

60

PRINT @1;"BO1"

70

WBYTE &H3F,&H21,&H8,&H3F;

80

PRINT @1;"FM1,001,010"

90

CMD DELIM=3

100

LINE INPUT @1;D$:PRINT #1,D$

110

A=CVI(MID$(D$,1,2)):PRINT A

120

L=0

130

PRINT ASC(MID$(D$,3,1));:PRINT "/";

140

PRINT ASC(MID$(D$,4,1));:PRINT "/";

150

PRINT ASC(MID$(D$,5,1));:PRINT

160

PRINT ASC(MID$(D$,6,1));:PRINT ":";

170

PRINT ASC(MID$(D$,7,1));:PRINT ":";

180

PRINT ASC(MID$(D$,8,1));:PRINT

190

L=0

200

FOR I=6 TO A-1

210

PRINT RIGHT$("0"+HEX$(ASC(MID$(D$,I+3,1))),2)+" ";

220

L=L+1

230

IF L=6 THEN L=0 :PRINT

240

NEXT I

250

CLOSE:STOP

260

END

Output the system configuration data

Read out the configuration data from DA100, display on CRT of personal computer, and save to
floppy disc.

10

'TS5 CF

20

OPEN "TS5.DAT" FOR OUTPUT AS #1

30

ISET IFC

40

CMD DELIM=0

50

PRINT @1;"TS5"

60

WBYTE &H3F,&H21,&H8,&H3F;

70

PRINT @1;"CF0"

80

LINE INPUT @1;D$:PRINT D$:PRINT #1,D$

90

LINE INPUT @;D$:PRINT D$:PRINT #1,D$

100

IF LEFT$(D$,2)<>"E:" GOTO 90

110

CLOSE:STOP

120

END

8.1 GP-IB Sample Programs