Sample Program For National Instruments Gpib Card - QuadTech 1865 Instruction Manual

Megohmmeter/ir tester
Table of Contents

Advertisement

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?"
CALL IBWRT(qt1865%, SET$)
c$ = SPACE$(25)
CALL IBRD(qt1865%, c$)
PRINT "unit ID is "; c$
SET$ = "CONF:VOLT 100"
CALL IBWRT(qt1865%, SET$)
SET$ = "CONF:tme 0"
CALL IBWRT(qt1865%, SET$)
SET$ = "CONF:tdw 0"
CALL IBWRT(qt1865%, SET$)
SET$ = "CONF:tch 0"
CALL IBWRT(qt1865%, SET$)
SET$ = "CONF:tdis 0"
CALL IBWRT(qt1865%, SET$)
SET$ = "CONF:fres e"
CALL IBWRT(qt1865%, SET$)
SET$ = "CONF:LIM 997000"
CALL IBWRT(qt1865%, SET$)
'make measurement
c$ = SPACE$(18)
SET$ = "MEAS:res"
CALL IBWRT(qt1865%, SET$)
' wait for completion of measurement
mask% = &H0800
CALL ibwait(qt1865%, mask%)
IF (ibsta% AND &HC000) <> 0 THEN PRINT "ibsta% = "; ibsta%
'get result
SET$ = "FETC?"
CALL IBWRT(qt1865%, SET$)
CALL IBRD(qt1865%, c$)
PRINT "result is "; c$
'enable front panel
SET$ = "SYSTEM:LOCK 0"
CALL IBWRT(qt1865%, SET$)
CALL IBLOC(qt1865%): CALL IBGTS(gpib0%, V%)
END
Operation
'1865 setup string
'send string to 1865
'get data
'print result
'1865 setup string
'send string to 1865
'1865 setup string
'send string to 1865
'1865 setup string
'send string to 1865
'1865 setup string
'send string to 1865
'1865 setup string
'send string to 1865
'1865 setup string
'send string to 1865
'1865 setup string
'send string to 1865
'1865 setup string
'send string to 1865
'1865 setup string
'send string to 1865
'1865 setup string
'send string to 1865
'return to local control
Page 65 of 87

Advertisement

Table of Contents
loading

Table of Contents