
Operation
Page 65 of 87
2.7.3 Sample Program for National Instruments GPIB card
REM start with qb filename /l qbib4 ***** this is mandatory ****
REM $INCLUDE: 'qbdecl4.bas'
'******************** INITIALIZE 1865********************************
start:
ADAP$ = "GPIB0": qt1865$ = "Dev4" 'address 4
stalp:
CALL IBFIND(qt1865$, qt1865%)
CLS '***************** MEASURE AND DISPLAY DATA*******************
'get the identification of the unit
SET$ = "IDN?"
'1865 setup string
CALL IBWRT(qt1865%, SET$)
'send string to 1865
c$ = SPACE$(25)
CALL IBRD(qt1865%, c$)
'get data
PRINT "unit ID is "; c$
'print result
SET$ = "CONF:VOLT 100"
'1865 setup string
CALL IBWRT(qt1865%, SET$)
'send string to 1865
SET$ = "CONF:tme 0"
'1865 setup string
CALL IBWRT(qt1865%, SET$)
'send string to 1865
SET$ = "CONF:tdw 0"
'1865 setup string
CALL IBWRT(qt1865%, SET$)
'send string to 1865
SET$ = "CONF:tch 0"
'1865 setup string
CALL IBWRT(qt1865%, SET$)
'send string to 1865
SET$ = "CONF:tdis 0"
'1865 setup string
CALL IBWRT(qt1865%, SET$)
'send string to 1865
SET$ = "CONF:fres e"
'1865 setup string
CALL IBWRT(qt1865%, SET$)
'send string to 1865
SET$ = "CONF:LIM 997000"
'1865 setup string
CALL IBWRT(qt1865%, SET$)
'send string to 1865
'make measurement
c$ = SPACE$(18)
SET$ = "MEAS:res"
'1865 setup string
CALL IBWRT(qt1865%, SET$)
'send string to 1865
' wait for completion of measurement
mask% = &H0800
CALL ibwait(qt1865%, mask%)
IF (ibsta% AND &HC000) <> 0 THEN PRINT "ibsta% = "; ibsta%
'get result
SET$ = "FETC?"
'1865 setup string
CALL IBWRT(qt1865%, SET$)
'send string to 1865
CALL IBRD(qt1865%, c$)
PRINT "result is "; c$
'enable front panel
SET$ = "SYSTEM:LOCK 0"
'1865 setup string
CALL IBWRT(qt1865%, SET$)
'send string to 1865
CALL IBLOC(qt1865%): CALL IBGTS(gpib0%, V%)
'return to local control
END
Содержание 1865
Страница 2: ...Page 2 of 87...
Страница 6: ...Page 6 of 87...
Страница 8: ...Page 8 of 87...
Страница 12: ...Page 12 of 87...
Страница 14: ...Page 14 of 87...
Страница 20: ......
Страница 28: ......
Страница 82: ......