![Keysight Technologies E4981A Programming Manual Download Page 146](http://html1.mh-extra.com/html/keysight-technologies/e4981a/e4981a_programming-manual_1961965146.webp)
144
Chapter 9
Measurement Applications (Sample Programs)
Reading Measurement Signal Level Monitor (IMON & VMON) Results
'===================================
' Measurement
'===================================
While Finish_pros <> "1" ' Loop till processing is finished. *OPC?
retruns 1 when processing of all commands is finished.
ErrorCheck viVPrintf(Agte4981a, "*OPC?" + vbLf, 0)
ErrorCheck viVScanf(Agte4981a, "%t", Finish_pros)
Wend
ErrorCheck viVPrintf(Agte4981a, "Data? IMON" + vbLf, 0)
ErrorCheck viVScanf(Agte4981a, "%t", Imon1)
ErrorCheck viVPrintf(Agte4981a, "Data? VMON" + vbLf, 0)
ErrorCheck viVScanf(Agte4981a, "%t", Vmon1)
MsgBox ("Current Monitor Value: " & Val(Imon1) & vbNewLine &
"Voltage Monitor Value: " & Val(Vmon1)), vbInformation
'===================================
' Setup End
'===================================`
Call viClose(defrm)
End
'===================================
' ErrorProc
'===================================`
ErrorHandler:
' Display the error message
MsgBox "*** Error : " + Error$, MB_ICON_EXCLAMATION
End
End Sub