Aliases and Alias Manager
This section contains information that applies to Windows, Linux, and Windows on ARM.
Aliases let you create an alternative, common-language name for a VISA address.
This topic covers the following:
- Creating new aliases for a single instrument using the editor in the Details > Connection Strings section of Instrument View.
- Modifying or deleting existing aliases:
- For more on how aliases can be useful, read the Using VISA Aliases for Program Portability and Readability section below.
About alias names
VISA alias names must be less than 256 characters in length, and can contain any characters except the double quote ("), vertical bar (|), space, and non-printing control characters (such as tab, return, newline, vertical tab, and form-feed).
These VISA aliases also work in the SICL (Windows and Linux) and Keysight 488 (Windows only) APIs.
The case of VISA aliases is preserved, however, case is ignored when an alias is used in place of the VISA address in a viOpen call. For example, UsbDevice1, usbdevice1, and USBDevice1 all refer to the same device.
If you create an alias for an instrument (auto-discovered or manually-added), that alias will be preserved even when the instrument connection is lost or removed. You can see aliases for disconnected or nonfunctioning instruments in the Aliases view. This allows you to use the same alias again when you reconnect the instrument; it also allows you to modify the same alias to use a different instrument in case the original instrument has been replaced.
Creating and editing aliases (Windows)
Creating a new alias for a specific instrument in Windows
When an instrument is selected in the My Instruments list and its details are displayed on the right, the Connection Strings section lists any VISA Addresses for that instrument.
-
In the VISA Address Aliases field, click the ellipsis
button. This opens the Edit Alias dialog box.
- Click
- In the Alias Name field, type the new alias name.
- Click OK to save the new alias.
Editing or deleting an alias for a specific instrument in Windows
When an instrument is selected in the My Instruments list and its details are displayed on the right, the Connection Strings section lists any VISA Addresses for that instrument.
- In the VISA Address Aliases field, click the ellipsis
button to open the Edit Alias dialog box. Existing aliases are listed on the left.
- To change an alias name, select it and in the Alias Name field, edit the name if needed.
- To delete an alias, click click the
icon next to the alias you want to remove.
Tip: You can also open the Edit Alias dialog box by right clicking on an instrument in the My Instruments pane and selecting Edit Alias from the menu.
Using Alias Manager for multiple instruments in Windows
The Alias Manager feature allows the same control over aliases as the editor, except that it shows aliases all instruments that have had an alias created. To use this feature, click in the IO Control title bar, then select Tools > Alias Manager. Any existing aliases are listed alphabetically, along with the Instrument and VISA Address pairing for that alias.
To create a new alias:
- Click
![]()
- Click in the Name column to set the name for that alias.
- Select an instrument from the Instruments column.
- Verify the VISA Address. If that instrument has multiple addresses, select a different address from the drop-down menu.
- Click OK to save the new alias.
Editing an alias in Alias Manager
- To edit a name, click in the Name field, make the desired change, and click Apply.
- To delete an alias, click the
icon next to the alias you want to remove and click Apply.
- To use an existing alias for a different instrument, select it from the Instrument drop-down. The VISA Address field will automatically update to an address for that instrument; if an instrument has multiple addresses, verify that the correct address is selected. Click Apply.
- To select a different address for an instrument that has more than one VISA address, select the correct one from the drop-down under Address and click Apply.
Click OK to close the Alias Manager when finished making changes.
Creating and editing aliases (Linux)
Creating a new alias in Linux
When an instrument is selected in the My Instruments list and its details are displayed on the right, the Connection Strings section lists any VISA Addresses for that instrument.
-
Locate the Aliases area just below the VISA Address field.
- In the Alias Name field, replace the italic words Create alias with your new alias name.
- Click the checkmark next to the field to save the new alias.
Editing or deleting an alias in Linux
When an instrument is selected in the My Instruments list, the Connection Strings section lists any existing VISA Addresses for that instrument, as well as any aliases for that instrument at that addresses.
- Locate the Aliases area just below the VISA Address field.
- To change a specific alias, click on its name and make changes, then click the checkmark next to the field to save.
- To delete an alias, click the
(trash) icon.
Using VISA Aliases for Program Portability and Readability
VISA aliases can be used in various programs. Windows - use with VISA, VISA.NET, and VISA COM;
Linux and and Windows on ARM- Use with VISA).
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).
Click here for sample code demonstrating the use of VISA aliases.
Why Use VISA Aliases?
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:
![]()
NI Passport for TULIP is not enabled by default during NI MAX installation; you must manually enable it. See Enabling the NI-VISA Passport for Tulip for instructions.
- 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.
(Windows only) Keysight 488 uses VISA aliases; you can use an alias in a device-level call to ibfind.
See Also
Using the Keysight IO Libraries Suite with Other Vendors' I/O Software