Configuring Multiple Aliases for a Single VISA Resource Name

Updated Aug 13, 2018

Reported In

Software

  • Measurement & Automation Explorer (MAX)

Driver

  • NI-VISA

Issue Details

How can I configure several aliases for the same instrument? For example say I have an Optical Powermeter with two slots, 1 and 2. I know the VISA (Virtual Instrument Software Architecture) session is the same but the slot is different and logically they are actually two separate instruments. Can I setup an alias in the Measurement & Automation Explorer (MAX) for each slot in the same instrument?

Solution

MAX stores configuration settings for VISA resources in C:\VXIpnp\WinNT\NIvisa\visaconf.ini. To set up multiple aliases for the same resource, you will need to edit this file directly.

For example here is the aliases section of my visaconf.ini file:
  • [ALIASES]
    Alias0 = "'LPT1','ASRL10::INSTR' "
    Alias1 = "'COM1','ASRL1::INSTR' "
    Alias2 = "'COM2','ASRL2::INSTR' "
    Alias3 = "'COM15','ASRL::JOEL-UDP09323099UDS::1::INSTR' "
    Alias4 = "'simulator','GPIB1::2::INSTR' "
    Alias5 = "'NI','TCPIP::www.ni.com::80::SOCKET' "
    NumAliases = 6

and here is what I did to add another alias, simulator2, which accesses the same VISA resource as simulator:
  • [ALIASES]
    Alias0 = "'LPT1','ASRL10::INSTR' "
    Alias1 = "'COM1','ASRL1::INSTR' "
    Alias2 = "'COM2','ASRL2::INSTR' "
    Alias3 = "'COM15','ASRL::JOEL-UDP09323099UDS::1::INSTR' "
    Alias4 = "'simulator','GPIB1::2::INSTR' "
    Alias5 = "'NI','TCPIP::www.ni.com::80::SOCKET' "
    Alias6 = "'simulator2','GPIB1::2::INSTR' " 
    NumAliases = 7 

WAS THIS ARTICLE HELPFUL?

Not Helpful