
Programming with VISA
3
Agilent VISA User’s Guide
33
The example again uses the session returned from the resource manager,
with another VISA address, to open a session with the GPIB-VXI
device at primary address 9 and VXI logical address (secondary
address) 24. You will now identify this session as
scanner
when calling
other VISA functions. See the following section, “Addressing a
Session”, for information on addressing particular devices.
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);
Addressing a Session
As shown in the previous section, the
rsrcName
parameter in the
viOpen
function is used to identify a specific resource. This parameter
consists of the VISA interface ID and the resource address. The
interface ID is determined when you run the Agilent Connection Expert
utility. The interface ID is usually the VISA interface type followed by a
number.
The following table illustrates the format of the
rsrcName
for different
VISA interface types.
INSTR
is an optional parameter that indicates that
you are communicating with a resource that is of type INSTR, meaning
instrument. The keywords are:
• ASRL
- used for asynchronous serial devices.
• GPIB -
used for GPIB devices and interfaces.
• GPIB-VXI -
used for GPIB-VXI controllers.
• TCPIP -
used for LAN instruments.
• VXI -
used for VXI instruments.
• USB -
used for USB instruments.
Summary of Contents for E2094S
Page 6: ...6 Agilent VISA User s Guide ...
Page 116: ...116 Agilent VISA User s Guide 4 Programming via GPIB and VXI ...
Page 126: ...126 Agilent VISA User s Guide 5 Programming via LAN ...
Page 143: ...Glossary Agilent VISA User s Guide 143 Windows notification area See notification area ...