Example Programs
G-18
Program (bufclint.bas) (cont.)
' Idle 2002 and 7001.
'
cmd$ = "*RST; :init:cont off"
GOSUB send2002 ' Reset 2002 and disable continuous
' initiation
cmd$ = ":abor"
GOSUB send2002 ' Place 2002 in idle
cmd$ = "*RST; :init:cont off"
GOSUB send7001 ' Reset 7001 and disable continuous
' initiation
cmd$ = ":abor"
GOSUB send7001 ' Place 7001 in idle
'
' Initialize 2002.
' cmd$ = ":syst:azer:stat on"
GOSUB send2002 ' Enable auto zero
cmd$ = ":form:elem read"
GOSUB send2002 ' Use only the reading in the data
' string
cmd$ = ":sens:volt:dc:nplc .01"
GOSUB send2002 ' Set DCV reading rate for 0.01 nplc
cmd$ = ":sens:volt:dc:rang 1"
GOSUB send2002 ' Select 2V range
cmd$ = ":sens:func 'temp'"
GOSUB send2002 ' Select TEMP function
cmd$ = ":sens:temp:aver:stat off"
GOSUB send2002 ' Disable filter
cmd$ = ":sens:temp:nplc .01"
GOSUB send2002 ' Set TEMP reading rate for 0.01 nplc
cmd$ = ":rout:scan:ext:func (@1),'rjun1'"
GOSUB send2002 ' Assign RJUN1 to external channel 1
cmd$ = ":rout:scan:ext:func (@2,3),'temp'"
GOSUB send2002 ' Assign TEMP to channels 2 and 3
cmd$ = ":rout:scan:ext:func (@4,5),'volt:dc'"
GOSUB send2002 ' Assign DCV to channels 4 and 5
cmd$ = ":rout:scan:ext (@1:5)"
GOSUB send2002 ' External scan list = chans 1 thru 5
'Set up TC parameters
cmd$ = ":temp:tran tc"
GOSUB send2002 ' Select TC transducer type
cmd$ = ":temp:tc:type k"
GOSUB send2002 ' Specify K type TC transducer
cmd$ = ":temp:rjun1:rsel real"
GOSUB send2002 ' Select REAL reference type
cmd$ = ":rout:clos (@1!1)"
GOSUB send7001 ' Close channel 1!1
cmd$ = ":temp:rjun1:real:offs 0.05463"
GOSUB send2002 ' Set 0¯C voltage offset to 0.05463V
cmd$ = ":temp:rjun1:real:tco .0002"
GOSUB send2002 ' Set temperature coefficient to 0.0002
cmd$ = ":temp:rjun1:acq"
GOSUB send2002 ' Update reference temperature SLEEP 1
cmd$ = ":rout:open (@1!1)"
GOSUB send7001 ' Open channel 1!1
cmd$ = ":arm:lay1:sour imm"
GOSUB send2002 ' Set arm layer 1 source to Immediate
cmd$ = ":arm:lay2:sour imm"
GOSUB send2002 ' Set arm layer 2 source to Immediate
cmd$ = ":trig:sour tlin"
GOSUB send2002 ' Set trigger layer source to Triglink