
Building a VISA Application in Windows
2
Agilent VISA User’s Guide
23
Sample Program Contents
A summary of the VISA function calls used in the preceding sample
Visual Basic program follows. For a more detailed explanation of VISA
functionality, see
Chapter 3
, “Programming with VISA
.”
See the
VISA
Online Help
for more detailed information on these VISA function
calls.
Call viOpen(defrm, "GPIB0::22::INSTR", 0, 0,
vi)
' Initialize device
Call viVPrintf(vi, "*RST" + Chr$(10), 0)
' Ask for the device's *IDN string.
Call viVPrintf(vi, "*IDN?" + Chr$(10), 0)
' Read the results as a string.
Call viVScanf(vi, "%t", strRes)
' Display the results
MsgBox "Result is: " + strRes, vbOKOnly,
"*IDN? Result"
' Close the vi session and the resource
manager session
Call viClose(vi)
Call viClose(defrm)
End Sub
Table 3
Summary of VISA Function Calls in Visual Basic Sample
Function(s)
Description
viOpenDefaultRM
You must first open a session with the default
resource manager with the
viOpenDefaultRM
function. This function will initialize the default
resource manager and return a pointer (
defrm
) to that
resource manager session.
Содержание E2094S
Страница 6: ...6 Agilent VISA User s Guide ...
Страница 116: ...116 Agilent VISA User s Guide 4 Programming via GPIB and VXI ...
Страница 126: ...126 Agilent VISA User s Guide 5 Programming via LAN ...
Страница 143: ...Glossary Agilent VISA User s Guide 143 Windows notification area See notification area ...
Страница 144: ...144 Agilent VISA User s Guide Glossary ...