From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-MAX for VISA 4.2 Runtime

Solved!
Go to solution

Hi,

 

I posted this on the Instrument Control board, but maybe that is the wrong place since I haven't gotten any replies. Here's my question:

 

I've been searching for over an hour and have not come up with anything. Is there a runtime version of NI-MAX? I have deployed LabVIEW executables on many other PCs and am having a problem on one of them where the VISA Find Resource vi does not return the exact same COM port list as does the VISA Configure Serial Port vi's drop-down list box. For example, the list box might show COM1, COM4, and COM10, but the VISA Find Resource vi shows ASRL1::INSTR, ASRL4::INSTR, and ASRL12::INSTR (this one should be ASRL10::INSTR). So I need a program like NI-MAX to change of the alias on the PC with the VISA 4.2 runtime engine so that it matches what the VISA Configure Serial Port vi shows, which incidentially matches what is shown in Device Manager.

 

The PC in question does NOT have the LabVIEW development environment installed, so it doesn't have NI-MAX. Is there a stand-alone exe of NI-MAX I can install on other PCs without the LV IDE? Will manually editing visaconf.ini do the trick? If so, should I delete all aliases, uninstall all external (VCP) ports in Device Manager, reboot the PC (or not) and start over, reconnecting devices?

 

Thank you very much for any help or advice.

Ed

0 Kudos
Message 1 of 8
(4,618 Views)

Are you using an Installer to distribute your executable? MAX can be installed along with the run-time engine or not. If you build an installer, you can include it with the installer of your executable.

I think if you download the normal Run-time installer from the NI website, MAX is an optional checkbox during the wizard custom setup as well.

 

Along with getting MAX, if you use your own custom installer for the executable, you can choose to include MAX Configuration files with the installer, so the installed-upon computer will then know the alias that you've already assigned.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 8
(4,604 Views)
Solution
Accepted by topic author Edjsch

James,

 

Thank you for your reply. Yes, I'm using the Application Builder, and no, I did not select installing NI-MAX, but I do see it there in my project file under "Additional Installers". I'll check out the run-time installer from the NI website.

 

After I posted this question I experimented further. I manually edited visaconf.ini so that the ASRL numbers agreed with Device Manager's / Windows' port assignment, and low and behold it worked! If this happens on a customer's PC, installing MAX would probably be a better solultion, though.

 

Now I'm wondering if the VISA Find Resource vi is just reading that file? I suppose so.

 

Thanks again,

Ed

0 Kudos
Message 3 of 8
(4,578 Views)

I did some experimenting to see when visaconf.ini gets updated in normal operation (other than by NI-MAX). I have Device Manager open so I can see what's happening. When I connect a serial device via a USB cable to my PC for which I have the VCP (Virtual COM Port) driver installed, after several seconds that device gets a COM port assignment (eg., "COM8" or whatever). (In Device Manager, right click the port, select Properties, and the port assignment can be changed in the Port Settings tab by clicking the Advanced button.)

 

Then I opened visaconf.ini and it had not changed. Then I launched my LabVIEW application that uses VISA resources, and when I reopened visaconf.ini I saw that the following new item was added to the [ALIASES] section:  Alias7 = "'COM8','ASRL8::INSTR'". (Also, all the details for that port were added to the [ASRL-RSRC-ALIAS] section.)

 

So, to summarize, visaconf.ini gets updated when LabVIEW launches and the VISA driver sees a new device that is not in the visaconf.ini file. It appears that this is how VISA keeps track of "non-present" devices, i.e., devices that previously had been connected and installed, but are not currently attached to the PC. (Tip: Search the internet for "set devmgr_show_nonpresent_devices=1" to see how you can start Device Manager (from either a batch file or an elevated CMD prompt) to show all non-present devices. Remember in the View menu to select "Show hidden devices".)

 

I hope this information helps others. Cheers!

 

Ed

Message 4 of 8
(4,474 Views)
Solution
Accepted by topic author Edjsch

Ed,

 

I came across this thread while trying to find why NI-MAX 15 uses LabVIEW Runtime 14.0 instead of 15.0, and I was wondering if your VISA Find Resource function is set to use the "Canonical Names Only" search mode. Now maybe this is irrelevant as I do have NI-MAX installed, but I have VISA Find Resource configured to search "Aliases Only" and I get "COM*" style names for everything that shows up as a COM port in device manager, and I have not manually set up any aliases whatsoever. So unless NI-MAX automagically assigns aliases that match the COM port numbers in device manager, maybe your application is just asking for the canonical names? Attached are screenshots showing what my VISA Find Resource vi returns in the two search modes.

VISA Find Resource - Aliases Only

VISA Find Resource - Canonical Names Only

____
Ryan R.
R&D
Message 5 of 8
(4,326 Views)

Ryan,

 

Thanks for your post. I'm using the default search mode, Canonical Names Only. Then I split the string on the "::" to get ASRLn and replace it with COMn". Here's the code (the input wire to Index Array is from the VISA Find Resource output; the vi on the right is Replace Substring):

 

ASRL-COM Conversion.png

I just tried setting the mode to Aliases Only, and got just COM ports listed, as you said! That saves me from doing the above code. Thanks for the tip!

 

Ed

 

0 Kudos
Message 6 of 8
(4,315 Views)

No problem, Ed. Notice that the ASRLn doesn't always map to COMn in my pictures above, which show LPT1 enumerating as ASRL10::INSTR. I didn't expect this myself, but it's another argument for going right for the aliases only.

____
Ryan R.
R&D
0 Kudos
Message 7 of 8
(4,303 Views)

Yeah, I also noticed that LPT1 enumerates as ASRL10. However, it shows up as LPT1 in the COM port drop-down list box, as it does in Device Manager. So that list box control, which is an input the the VISA Configure Serial Port vi as "VISA resource name", seem to show the Aliases Only. I had not seen the ASRL name until I used the VISA Find Resource, or in NiMax. Thanks again.

0 Kudos
Message 8 of 8
(4,298 Views)