Closing A Session 3-1 - Agilent Technologies ESA-E Series Programmer's Manual

Esa spectrum analyzers
Hide thumbs Also See for ESA-E Series:
Table of Contents

Advertisement

Programming Examples
C Programming Examples using VT L
VXI0 ::24 ::INSTR Device at VXI logical address 24 that is of VISA typ e
INSTR.
VXI2 ::128
Device at VXI logical address 128, in the third VXI
system (VXI2) .
GPIB-VXIO : :24 A VXI device at logical address 24. This VXI device is
connected via an GPIB/VXI command module.
GPIBO ::7: :0
An GPIB device at primary address 7 and secondar y
address 0 on the GPIB interface .
The following is an example of opening a device session with the GPI B
device at primary address 23 .
ViSession defaultRM, vi ;
viOpenDefaultRM(&defaultRM) ;
viOpen(defaultRM, "GPIBO : :23 : :INSTR", VI_NULL,VI_NULL,&vi) ;
viClose(vi) ;
Closing a Sessio n
The
viClose
function must be used to close each session . You can clos e
the specific device session, which will free all data structures that ha d
been allocated for the session . If you close the default resource manage r
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
viC lose
function needs to be called to free up find lists and event contexts .
Chapter 3
3-11

Advertisement

Table of Contents
loading

Table of Contents