![HP E4401B Programmer'S Manual Download Page 72](http://html.mh-extra.com/html/hp/e4401b/e4401b_programmers-manual_161548072.webp)
3-8
Chapter 3
Programming Examples
C Programming Examples using VTL
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
function
multiple times.
The following summarizes the parameters in the previous function
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 to
identify this device session when using other VTL
functions.
The following is an example of opening sessions with an HP-IB
multimeter and an HP-IB/VXI scanner:
ViSession defaultRM, dmm, scanner;
.
.
viOpenDefaultRM(&defaultRM);
viOpen (defaultRM, “GPIB0::22::INSTR”, VI_NULL,
VI_NULL, &dmm);
viOpen (defaultRM, “GPIB-VXI0::24::INSTR”, VI_NULL,
VI_NULL, &scanner);
.
.
viClose (scanner);
viClose (dmm);
viClose(defaultRM);
The above function first opens a session with the default resource
manager. The session returned from the resource manager and a device
address is then used to open a session with the HP-IB device at address
22. That session will now be identified as dmm when using other VTL
functions. The session returned from the resource manager is then used
again with another device address to open a session with the
HP-IB/VXI device at primary address 9 and VXI logical address 24.
That session will now be identified as scanner when using other VTL
functions. See the following section for information on addressing
particular devices.
Summary of Contents for E4401B
Page 6: ...vi ...
Page 14: ...xiv Contents ...
Page 64: ...2 34 Chapter2 HP ESA Status Registers Using the Analyzer Status Registers ...
Page 65: ...3 1 3 Programming Examples ...
Page 151: ...4 1 4 Programming Command Cross References ...
Page 286: ...5 132 Chapter5 Language Reference UNIT Subsystem ...
Page 287: ...6 1 6 HP 8590 HP ESA Spectrum Analyzers Programming Conversion Guide ...
Page 292: ...1 HP 8590 HP ESA Spectrum Analyzers Conversion Guide ...
Page 368: ...7 1 7 Error Messages ...
Page 393: ...7 26 Chapter7 Error Messages 201 to 799 Device Specific Errors ...