Chapter 9
137
Measurement Applications (Sample Programs)
Reading Measurement Results in Binary Format Using :READ? Command
9.
M
easu
rem
ent
Applica
tio
ns
(S
amp
le
Prog
ra
ms)
'===================================
' Meas Read
'===================================
ErrorCheck viVPrintf(Agte4981a, "TRIG:SOUR INT" + vbLf, 0)
ErrorCheck viVPrintf(Agte4981a, ":READ?" + vbLf, 0)
Call Scpi_read_binary_double_array(Agte4981a, Res, Nop)
Worksheets("Example11").Range("B5").Value = Val(Res(1))
Worksheets("Example11").Range("B6").Value = Val(Res(2))
'===================================
' Setup End
'===================================
Call viClose(defrm)
End
'===================================
' ErrorProc
'===================================
ErrorHandler:
' Display the error message
MsgBox "*** Error : " + Error$, MB_ICON_EXCLAMATION
End
End Sub