
Programming with VISA
3
Agilent VISA User’s Guide
37
Closing a Session
You must use the
viClose
function to close each session. Closing the
specific resource session frees all data structures that had been allocated
for the session. If you close the default resource manager session, all
sessions opened using that resource manager session will close.
Since system resources are also used when searching for resources
(
viFindRsrc
), the
viClose
function needs to be called to free up find
lists. See the following section, “Searching for Resources”, for more
information on closing find lists.
Searching for Resources
When you open the default resource manager, you are opening a parent
session that knows about all the other resources in the system. Since the
resource manager session knows about all resources, it has the ability to
search for specific resources and open sessions to these resources. You
can, for example, search an interface for devices and open a session with
one of the devices found.
Use the
viFindRsrc
function to search an interface for device resources.
This function finds matches and returns the number of matches found
and a handle to the resources found. If there are more matches, use the
viFindNext
function with the handle returned from
viFindRsrc
to get
the next match:
viFindRsrc(sesn, expr, findList, retcnt,
instrDesc);
.
.
viFindNext(findList, instrDesc);
.
.
viClose (findList);
Содержание 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 ...