Why Use Aliases?
VISA aliases can be used in various programs. In Windows, use with VISA, VISA.NET, and VISA COM; Linux and and Windows on ARM- Use with VISA). (See below for information about SICL and Keysight 488 aliases.)
A VISA alias is a name of your choosing, which you assign to a device and use in your programs. Once assigned, the alias is a synonym for the device's VISA address, so you can use it to open a VISA session (using the viOpen function) and to get resource information (using viParseRsrc or viParseRsrcEx).
Using VISA aliases in your programs, rather than VISA addresses, provides two significant advantages:
-
Portability: If you program using aliases, you can run your program on a new test system that has instruments at different addresses, simply by creating the same aliases on the new system as on your development system. Similarly, you can move or replace instruments without changing or recompiling test code by changing the alias definitions.
-
Readability: Your programs will be much easier to read and understand if, for example, your multimeter is called "myDMM" instead of "GPIB2::14::8::INSTR". This is particularly important in the case of USB instruments, whose VISA addresses are typically long and cumbersome, containing the instrument's serial number among other information.
Notes on VISA Aliases
This section is important if you have both Keysight IO Libraries Suite and National Instruments (NI) VISA installed.
The following are true for VISA aliases, assuming that NI-VISA is installed and (for 32-bit programs only) NI Passport for TULIP is enabled:
-
Both NI MAX and Keysight software support VISA aliases, but each program maintains its own separate alias list.
-
A VISA program can use an alias defined in NI MAX to access any device that is shown in NI MAX. This includes Keysight devices that appear in NI MAX if NI Passport for TULIP is enabled (for 32-bit programs).
-
An alias that is defined for a device in Keysight software on any Keysight interface (such as a Keysight GPIB card) can also be used by a VISA program to access the device.
-
An alias that is defined in Keysight software for a device on the TCPIP0 or USB0 interface can also be used by a VISA program to access the device. Note also that when an alias is created in Keysightsoftware, the actual I/O is done using Keysight VISA rather than NI-VISA. This means that Keysight software will trace the Keysight calls for these devices.
Creating Multiple VISA Aliases for an Instrument
You may want to create more than one VISA alias for a given instrument if, for example, you need to run several programs that refer to the instrument using different aliases. In this way, you can reuse another programmer's code simply by creating a new alias that matches the one used by that programmer. You do not need to change or even recompile the other programmer's code, nor do you need to change your test system configuration, even if the other programmer's test system was configured differently than yours.
Default Aliases for USB Devices
IO Libraries Suite automatically gives an alias to each instrument you connect via USB, because VISA addresses for USB devices are long and cumbersome. IO Libraries Suite assigns aliases USBInstrument1, USBInstrument2, etc.; you can change these names by selecting the alias in the Aliases view and changing it. As with all aliases, if the instrument is disconnected, the alias is not deleted, but remains available for use when that same instrument is re-connected. You can delete unneeded aliases in the Aliases view.
Using Aliases with SICL and with Keysight 488
When you create a VISA alias, Connection Expert automatically creates a SICL alias of the same name. You can use a SICL alias in place of a SICL address in the iopen function call, with the same advantages described above.
Keysight 488 uses VISA aliases; you can use an alias in a device-level call to ibfind.