'This program closes and reads channels 5 and 10 of the Model 2001/SCAN. 'It is done in a loop of five times. 'Quickbasic 4.5 and PC-488-CEC interface card are used. ' 5/92 DEC CALL Initialize(21, 0) ' init as system controller '--- Setup 2001 measurement mode DIM k2001data AS STRING * 150 'Dim string CLS CALL SEND(16, ":FORM:ELEM READ", GPIB.STATUS%) CALL SEND(16, ":SENS:FUNC 'VOLT:DC'", GPIB.STATUS%) CALL SEND(16, ":SENS:VOLT:DC:NPLC .01", GPIB.STATUS%) CALL SEND(16, ":TRAC:POIN 1810;EGR COMP", GPIB.STATUS%) CALL SEND(16, ":SENS:VOLT:DC:AVER:STAT 0", GPIB.STATUS%) CALL SEND(16, ":ROUT:SCAN:INT (@5,10)", GPIB.STATUS%) CALL SEND(16, ":TRIG:SOUR IMM", GPIB.STATUS%) CALL SEND(16, ":ARM:SOUR BUS;COUN 5", GPIB.STATUS%) T1 = TIMER 'FOR I = 1 TO 5 CALL TRANSMIT("UNL UNT LISTEN 16 GET", STATUS%) CALL SEND(16, ":FETCH?", GPIB.STATUS%) CALL Enter(k2001data$, Gpib.len%, 16, GPIB.STATUS%) 'PRINT k2001data$ 'CALL SEND(16, ":ROUT:CLOS (@10)", GPIB.STATUS%) 'CALL SEND(16, ":FETCH?", GPIB.STATUS%) 'CALL Enter(k2001data$, Gpib.len%, 16, GPIB.STATUS%) PRINT "DCV = "; k2001data$ 'NEXT I T2 = TIMER T3 = T2 - T1 PRINT "IT TOOK "; T3; " seconds" END