Agilent Technologies ESA-E Series Programmer's Manual page 69

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

Advertisement

Programming Examples
C Programming Examples using VT L
viOpenDefaultRM (sesn) ;
viOpen (sesn, rsrcName, accessMode, timeout, vi) ;
The session returned from
viOpenDefaultRM
must be used in the sesn
parameter of the
viOpen
function . The
viOpen
function then uses that
session and the device address specified in the (resource name)
parameter to open a device session . The
vi
parameter in
viOpen
returns
a session identifier that can be used with other VTL functions .
Your program may have several sessions open at the same time by
creating multiple session identifiers by calling the
viOpen
functio n
multiple times.
The following summarizes the parameters in the previous functio n
calls :
sesn
This is a session returned from the
viOpenDefaultRM
function that identifies the resource manager session .
rsrcName
This is a unique symbolic name of the device (device
address) .
accessMode
This parameter is not used for VTL . Use VI_NULL .
timeout
This parameter is not used for VTL . Use VI NULL.
vi
This is a pointer to the session identifier for this
particular device session . This pointer will be used t o
identify this device session when using other VT L
functions.
The following is an example of opening sessions with an GPI B
multimeter and an GPIB/VXI scanner:
ViSession defaultRM, dmm, scanner ;
viOpenDefaultRM(&defaultRM) ;
viOpen(defaultRM, "GPIBO : :22 : :INSTR", VI_NULL ,
VI_NULL, &dmm) ;
viOpen(defaultRM, "GPIB-V%IO : :24 : :INSTR", VI_NULL ,
VI_NULL, &scanner) ;
viClose(scanner) ;
viClose(dmm) ;
viClose(defaultRM) ;
Chapter 3
3-9

Advertisement

Table of Contents
loading

Table of Contents