![Keysight Technologies E4981A Programming Manual Download Page 158](http://html1.mh-extra.com/html/keysight-technologies/e4981a/e4981a_programming-manual_1961965158.webp)
156
Chapter 9
Measurement Applications (Sample Programs)
Measuring Results with Contact Check Enabled
' Frequency should be 120 or 1000. The contact check is not
available 1MHz.
ErrorCheck viVPrintf(Agte4981a, ":SOUR:FREQ 1000" + vbLf, 0)
' Write the SCPI commands for your desire setting. This should be
the same as one in the CC_ReadParameter
ErrorCheck viVPrintf(Agte4981a, ":SOUR:VOLT 1" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, ":RANG 1E-6" + vbLf, 0)
CCParamHi = Worksheets("Example17").Range("D2").Value
CCParamLo = Worksheets("Example17").Range("D3").Value
'===================================
' Measurement
'===================================
' Setup Contact Check Threshold parameters
ErrorCheck viVPrintf(Agte4981a, ":CONT1:VER ON" + vbLf, 0) 'Contact
Check Function On
ErrorCheck viVPrintf(Agte4981a, ":CONT1:VER:THR1 " + Str(CCParamHi)
+ vbLf, 0) ' Threshold of Contact Check parameter for Hp/Hc (TH1)
ErrorCheck viVPrintf(Agte4981a, ":CONT1:VER:THR2 " + Str(CCParamLo)
+ vbLf, 0) ' Threshold of Contact Check parameter for Lp/Lc (TH2)
'
'
' Execute Measurement
ErrorCheck viVPrintf(Agte4981a, "*TRG" + vbLf, 0)
ErrorCheck viVScanf(Agte4981a, "%t", Result)
'
Res = Split(Result, ",")
Worksheets("Example17").Range("B6").Value = Val(Res(0))
Worksheets("Example17").Range("C6").Value = Val(Res(1))
Worksheets("Example17").Range("D6").Value = Val(Res(2))