Chapter 8 sample program, 1 gp-ib sample programs, Gp-ib adress – Yokogawa DA100 User Manual

Page 82: Setting the personal computer, Output the setting data

Advertising
background image

IM DA100-11E

8-1

Sample Program

8

8.1

GP-IB Sample Programs

This section describes sampl eprogram for a system using PC 9801 series (NEC) with National
Instruments GP-IB.
Sample programs in this manual are writen in N88-BASIC(Standard language for PC9801 series).
We hope that these samples will aid you in creating your own program.

GP-IB Adress

ALL the sample programs given in this chapter use adress 1 for DA100.

Setting the personal Computer

Be carefull when receiving BINARY data that the received data does not overrun the capacity of the
receive buffer in the personal computer which may be small as 255 bytes in some case.

Output the Setting Data

Read out the setting data from DA100, display them on CRT of personal computer, and save them to
floppy disk.

10

'TS1 <GET> LF

20

OPEN "TS1.DAT" FOR OUTPUT AS #1

30

ISET IFC

40

CMD DELIM=0

50

PRINT @1;"TS1"

60

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

70

PRINT @1;"LF001,010"

80

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

90

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

100

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

110

CLOSE:STOP

120

END

Write the Setting Data to DA100

Read out the setting data from floppy disk, display them on CRT of personal computer, and write
them to DA100.

10

'SETTEI

20

ISET IFC

30

ON SRQ GOSUB *SSS

40

POLL 1,B

50

SRQ ON

60

OPEN "TS1.DAT" FOR INPUT AS #1

70

ISET IFC

80

CMD DELIM=0

90

PRINT @1;"IM2"

100

LINE INPUT #1,D$

110

IF LEFT$(D$,2)="EN" GOTO 140

120

PRINT @1;D$:PRINT D$

130

GOTO 100

140

CLOSE:STOP

150

END

160

'

170

*SSS

180

POLL 1,B

190

IF (B AND &H42)=&H42 THEN PRINT "SYNTAX ERROR"

200

RETURN

Advertising