App-16
IM 767361-01E
Example of response
MDL767303;REV1.01
REL0;PU4;PD0;ML4,0.000;MH4,130.000
DMM1;DF1
HD0;AG3;DIS0
VO0L;BL0;BP1
SM0;SN01;SR0;SND20
DR0;CMP0;CMD0.000,130.000
END
Sample Program
Operating Environment
Target model:
NEC PC-9801 Series
Target language: N88-BASIC (standard program language on the PC-9801
Series)
GP-IB board:
PC-9801-29N interface board
10 ‘*************************************************************************
20 ‘* Program that reads/displays the measured data 10 times (GP-IB)’ *
30 ‘*************************************************************************
40 ‘
100
ISET
IFC
‘
interface/clear
110
ISET
REN
‘
set
remote
120 CMD DELIM=0
‘controller side delimiter = CR+LF
130
IO=1
‘Address=1
140 ‘
150 PRINT @IO;”PU4”
‘Pressure units = kPa
160 PRINT @IO;”H1”
‘Communications output data header present
170 PRINT @IO;”DL0”
‘Communications output delimiter=CR+LF+EOI
180 ‘
190 FOR I=1 TO 10
‘read measured data ten times
200 INPUT WAIT 10,” “,A
‘wait (random)
210 PRINT @IO;”OD”
‘measured data output request
220 LINE INPUT @IO;D$
‘read measured data
230 PRINT D$
‘display measured data
240 NEXT I
250 ‘
260 ‘
300 ‘************************************************************************
310 ‘* Program that reads data using trigger and serial poll (GP-IB)’ *
320 ‘************************************************************************
330 ‘
340
@IO;”HD1”
‘data
hold
350 ‘
360 PRINT @IO;”IM1”
‘status byte mask
370 POLL IO,STB
‘status byte initialization
380 ‘
390 FOR I=1 TO 10
‘read measured data ten times
400
@IO;”E”
‘activates
trigger
410 POLL IO,STB
‘send serial poll
420 IF (STB AND &H41)<>&H41 THEN 410
‘check whether measurement has finished
430 PRINT @IO;”OD”
‘measured data output request
440 LINE INPUT @IO;D$
‘read measured data
450 PRINT D$
‘display measured data
460 NEXT I
470 ‘
480 PRINT @IO;”HD0”
‘release data hold
Appendix