Closing A Session - Agilent Technologies PSA Series User And Programming Manual

Spectrum analyzers
Hide thumbs Also See for PSA Series:
Table of Contents

Advertisement

Programming Fundamentals
Programming in C Using the VTL
The following is an example of opening a device session with the GPIB
device at primary address23.
ViSession defaultRM, vi;
.
.
viOpenDefaultRM (&defaultRM);
viOpen (defaultRM, "GPIB0::23::INSTR", VI_NULL,VI_NULL,&vi);
.
.
viClose(vi);
viClose (defaultRM);

Closing a Session

The viClose function must be used to close each session. You can close
the specific device session, which will free 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 will be closed.
Since system resources are also used when searching for resources
(viFindRsrc) or waiting for events (viWaitOnEvent), the viClose
function needs to be called to free up find lists and event contexts.
340
Chapter 5

Advertisement

Table of Contents
loading

This manual is also suitable for:

E4440aE4443aE4445aE4448aE4446a

Table of Contents