5520A
Service Manual
3-50
’Initial 3458 Set-up:
errmsg = gpibPut(a_3458, "TARM HOLD; DCV 10; APER 1.0e-3; MEM FIFO; SWEEP 0.1, 100; END
ALWAYS")
------------------------------------------------------------------------------
’5700 setup
If (range(stp) > .002) Then ’ 1mF range with LCR Meter, 3mF range with I charge
’ 3458 has already been set-up for measurement; now
’ set up system 5700 for DCI output, set to OPERate
errmsg = gpibPut(a_5700, "CUR_POST AUX; OUT " + Str$(dci(stp)) + " A, 0 Hz")
srcSettled
errmsg = gpibPut(a_5700, "OPER")
srcSettled
Call trig_3458(stp)
errmsg = gpibPut(a_5700, "STBY")
End If
---------------------------------------------------------------------------------
Sub trig_3458 (stp As Integer)
Dim x As Integer, errmsg As String, response As String, no_samples As Integer, deltav
As Single
result = 0
’ all of the voltage data is stuck into this array for optional regression analysis
Dim CapChan As Integer
CapChan = FreeFile
Open "C:\DATA\HICAP." & Format$(Str$(stp), "#") For Output As CapChan
’ this triggers the readings and stores them internally in the 3458
errmsg = gpibPut(a_3458, "TARM SGL")
’ retrieve the number of samples stored - loop until meter is finished taking samples
errmsg = gpibPut(a_3458, "MCOUNT?")
Do
response = Space$(80)
errmsg = gpibGet(a_3458, response)
Loop Until (Len(response) <> 0)
no_samples = Val(response)
’ now retrieve the data and put into array
Print #CapChan, Val(response)
For x = 1 To no_samples
Do
response = Space$(80)
errmsg = gpibGet(a_3458, response)
Figure 3-19. Example Visual Basic Program