Chapter 9
121
Measurement Applications (Sample Programs)
Reading Measurement Results in ASCII Format Using *TRG Command
9.
M
easu
rem
ent
Applica
tio
ns
(S
amp
le
Prog
ra
ms)
'===================================
ErrorCheck viVPrintf(Agte4981a, "*TRG" + vbLf, 0)
ErrorCheck viVScanf(Agte4981a, "%t", Result)
Res = Split(Result, ",")
Worksheets("Example6").Range("B5").Value = Val(Res(1))
Worksheets("Example6").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