01-23-2014 11:14 AM
Folks,
I have an application that I wrote in LabVIEW using an arduino uno, connected via USB for external i2c communication. Everything works fine on my windows development station, but when I compile the application and deploy it onto other windows boxes with the NI Runtime Engine installed, the init function fails to locate the arduino. If I look in the device manager, the arduino shows up and is assigned a valid com port. It never fails on my machine, but it never succeeds on the three others I've tried it on. Anybody have any idea what's going on? I'll attach a snippit of the (dead simple) code that is failing. The Init function fails, not the i2c function.
Thanks,
Jason
01-23-2014 12:24 PM
Jason,
I think I have had the same issue. It has to do with serial enumeration that each computer does depending on what peripheral is connected to it. That is, Arduino is connected to different serial port number in every different computer. You need to make accommodation to select the correct serial port in the beginning of the program.
01-23-2014 12:26 PM
barddya,
Thanks for the response. I figured that serial enumeration has something to do with it. However, as I do not specify a serial port at all, but let the init function search through the available ports and detect the apporiate one, I had hoped to avoid this issue. I'll have to add a control that lets the end user select the serial port and see if that works.
Thanks,
Jason
01-23-2014 12:57 PM
ah-ha! Looks like the machines where I deploy the applicaiton to need to have the NI-VISA and possibly NI-Serial runtime stuff installed in addition to the labview runtime. When I created the new app with the serial selection box, there were no serial ports to select on the machines to which I deployed the application. I suspect this is the problem. I'll update once I finish downloading and installing the nearly 700MB of NI-VISA cruft...
Thanks,
Jason
01-23-2014 04:05 PM
That was totally it. The NI-VISA runtime must be installed separately from the LabVIEW runtime. They're both needed, and no useful error is generated from the executable.
01-23-2014 04:29 PM
I had an issue once where one time I installed the Arduino drivers and the system recognized it and gave it an appropriate interface description (e.g. "Arduino Mega 2560") but then I installed it on another system and it no longer gave it the proper description (e.g. "%asdf%") but still worked (when manually specifying a COM port). This is how the Init function actually searches. It looks at the interface description to see if it contains the string "Arduino".
You should see the interface description in your device manager (i.e. it should be shown in the main list with the "(COM3)" after it). I'm curious what your's currently is.