User`s guide
Building a VISA Application in Windows 2
Agilent VISA User’s Guide 25
viOpen This function establishes a communication channel
with the device specified. A session identifier (vi) that
can be used with other VISA functions is returned. This
call must be made for each device you will be using.
viVPrintf and viVScanf These are the VISA formatted I/O functions. The
viVPrintf call sends the IEEE 488.2 *RST command to
the instrument (plus a linefeed character) and puts it in
a known state. The viVPrintf call is used again to query
for the device identification (*IDN?). The viVScanf call
is then used to read the results (strRes) that are
displayed in a Message Box.
viClose This function must be used to close each session.
When you close a device session, all data structures
that had been allocated for the session will be
deallocated. When you close the default manager
session, all sessions opened using that default
manager session will be closed.
Table 3 Summary of VISA Function Calls in Visual Basic Sample