
3-58 Agilent B1500A/B1505A Programming Guide, Edition 11
Programming Examples
Sampling Measurements
session.WriteString("AAD " & t(1) & ", 1" & vbLf) ’sets HR ADC for t(1) ’36
session.WriteString("AAD " & t(2) & ", 1" & vbLf) ’sets HR ADC for t(2)
session.WriteString("AIT 1,1,2" & vbLf) ’number of averaging samples for 1 data
session.WriteString("AZ 0" & vbLf) ’sets auto zero off ’39
session.WriteString("MT " & bias_h & "," & interval & "," & nop1 & "," & base_h &
vbLf)
session.WriteString("MV " & t(1) & ",0," & base & "," & bias & "," & icomp & vbLf)
session.WriteString("MV " & t(2) & ",0," & base & "," & bias & "," & icomp & vbLf)
session.WriteString("MM 10," & mch(0) & "," & mch(1) & vbLf)
session.WriteString("RI " & mch(0) & "," & range(0) & vbLf)
session.WriteString("RI " & mch(1) & "," & range(1) & vbLf)
session.WriteString("ERR? 1" & vbLf) : err = session.ReadString(4 + 2)
If err <> 0 Then session.WriteString("DZ" & vbLf) : GoTo Check_err ’47
session.WriteString("DV " & t(0) & ",0," & vlout & "," & ilcomp & ", 0" & vbLf)
session.WriteString("DV " & t(3) & ",0," & vlout & "," & ilcomp & ", 0" & vbLf)
session.WriteString("TSR" & vbLf)
session.WriteString("XE" & vbLf)
session.WriteString("*OPC?" & vbLf) : rep = session.ReadString(1 + 2) ’53
session.WriteString("ERR? 1" & vbLf) : err = session.ReadString(4 + 2)
If err <> 0 Then session.WriteString("DZ" & vbLf) : GoTo Check_err
session.WriteString("NUB?" & vbLf) : rep = session.ReadString(3 + 2)
If rep <> nop1 * 3 Then session.WriteString("DZ") : GoTo Check_nop
Line Description
36 to 38 Sets the A/D converter.
39 Sets the SMU auto zero function off.
40 to 42 Sets the sampling timing parameters and the constant voltage sources.
43 to 47 Sets the sampling measurement mode, and sets the current measurement range. And
checks if an error occurred. If an error is detected, forces 0 V and goes to Check_err.
48 to 51 Applies 0 V to the device low terminal, resets the time stamp, and performs the sampling
measurement.
53 to 57 Waits until the measurement is completed, and checks if an error occurred. If an error is
detected, forces 0 V and goes to Check_err. Also checks number of returned data. If it is
not correct, forces 0 V and goes to Check_nop.
Comentários a estes Manuais