
22
Agilent VISA User’s Guide
2
Building a VISA Application in Windows
If the program does not run, see the
Event Viewer
for a list of run-time
errors. The source file
idn.bas
follows.
Option Explicit
''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''
' idn.bas
' This example program queries a GPIB device for
' an identification string and prints the
' results. Note that you may have to change the
' VISA Interface Name and address for your
' device from "GPIB0" and "22",respectively.
''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''
Sub Main()
Dim defrm As Long 'Session to Default
Resource Manager
Dim vi As Long 'Session to instrument
Dim strRes As String * 200 'Fixed length
string to hold results
' Open the default resource manager session
Call viOpenDefaultRM(defrm)
' Open the session to the resource
' The "GPIB0" parameter is the VISA Interface
' name to a
' GPIB instrument as defined in
' Connection Expert.
' Change this name to what you have defined
' for your VISA Interface.
' "GPIB0::22::INSTR" is the address string
' for the device.
' this address will be the same as seen in:
' Connection Expert)
Summary of Contents for E2094S
Page 6: ...6 Agilent VISA User s Guide ...
Page 116: ...116 Agilent VISA User s Guide 4 Programming via GPIB and VXI ...
Page 126: ...126 Agilent VISA User s Guide 5 Programming via LAN ...
Page 143: ...Glossary Agilent VISA User s Guide 143 Windows notification area See notification area ...