Chapter 9
111
Measurement Applications (Sample Programs)
Recovering the Correction State
9.
M
easu
rem
ent
Applica
tio
ns
(S
amp
le
Prog
ra
ms)
ErrorCheck viVPrintf(Agte4981a, "SOUR:FREQ " & Freq + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "CORR:DATA STAN3," & CStr(Load1) &
"," & CStr(Load2) + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "CAL:CABL " & C vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "SYST:FSH " & S vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "CORR:CKIT:STAN1:FORMAT " &
S vbLf, 0) ' Write Primary and Secondary Load Type
ErrorCheck viVPrintf(Agte4981a, "CORR:CKIT:STAN2:FORMAT " &
St vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "CORR:CKIT:STAN3:FORMAT " &
S vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "CORR:DATA STAN1," & CStr(Open1) &
"," & CStr(Open2) + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "CORR:DATA STAN2," & CStr(Short1) &
"," & CStr(Short2) + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "CORR:OPEN ON" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "CORR:SHORT ON" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, "CORR:LOAD ON" + vbLf, 0)
MsgBox "Correction Data sucessfully applied to E4981A from " &
File_Path
'===================================
' ErrorProc
'===================================
End
ErrorHandler:
' Display the error message
MsgBox "*** Error : " + Error$, MB_ICON_EXCLAMATION
End
End Sub