09-27-2018 05:08 PM - edited 09-27-2018 05:09 PM
An application I created in LabView 2012 to read incoming serial data cannot see the com port when I export it as an exe and run it on a different machine.
The machine I created it on is running Win7. The machine I transfered the exe to is Win10. I installed the LabView 2012 Runtime Engine on the new machine without issue. The application reads from a serial port using VISA Read, parses data, and displays it. When I open the exe it loads with no problem, but when I run the application it cannot find the com port for the serial data. I look in the device manager and I see the com port that I need to select, but in the dropdown menu for my application, which usually contains the necessary com port, it shows nothing but the default "COM3" value.
When I created the exe, I transferred everything that was in the "build" folder over to the new machine. Do I need to transfer some other (VISA Read?) functionality too?
Solved! Go to Solution.
09-27-2018 05:35 PM
What are you using to fill that dropdown box ?
09-27-2018 06:25 PM
@nyc_(is_out_of_here) wrote:
What are you using to fill that dropdown box ?
VISA Configure Serial Port. See pic below. It's like the "Port" input isn't seeing the com port:
09-27-2018 09:01 PM
You answer makes no sense.
You configure a COM port only after you know that it exists.
.
09-27-2018 11:58 PM - edited 09-28-2018 12:06 AM
My answer makes perfect sense.
Then I export the VI to EXE and put it on a different machine. Step 1 happens no problem, I can see the correct com port in the device manager. But when I do step 2, there is NO active com port listed in the drop down for me to select.
09-28-2018 01:20 AM
@lavadisco wrote:
[..] The machine I created it on is running Win7. The machine I transfered the exe to is Win10. I installed the LabView 2012 Runtime Engine on the new machine without issue. [...]
When I created the exe, I transferred everything that was in the "build" folder over to the new machine. Do I need to transfer some other (VISA Read?) functionality too?
Did you install VISA Device Driver (VISA Runtime) ?
09-28-2018 01:30 AM
Hi lavadisco,
Then I export the VI to EXE and put it on a different machine
Did you create an installer for that EXE?
Did you install VISA on the other computer?
Did you do any error handling in your program? Did you get errors?
How does your user select the COM port when your EXE starts up? The COM port is read immediately at start of the EXE (guessing from your image)…
09-28-2018 10:25 AM
I did not create an installer for the EXE, I just grabbed everything that was in the builds folder after generating it and copied it all onto the new machine.
I did not install VISA on the other computer, I guess I assumed all of that would be packaged up with the EXE that I exported. I will install VISA runtime. I see the Version 15 on the NI site - is that the correct one to install or should I install an older one since my EXE was created in LV 2012?
I do get a VISA error when I run the exe, I'm away from that machine right now so I can't quote the exact text of the error.
When the EXE starts up, there is a com port dropdown that always contains a default COM3 entry in it, regardless of what the active com port is. When the user clicks on the dropdown, there are two other entries - LPT1 printer port and also the active com port. You must then select the active com port. It doesn't find it automatically. It's not a big deal that the user has to do this because there are also some other things they have to configure in the interface before running the exe.
09-28-2018 10:32 AM
@lavadisco wrote:
I did not create an installer for the EXE, I just grabbed everything that was in the builds folder after generating it and copied it all onto the new machine.
I did not install VISA on the other computer, I guess I assumed all of that would be packaged up with the EXE that I exported. I will install VISA runtime. I see the Version 15 on the NI site - is that the correct one to install or should I install an older one since my EXE was created in LV 2012?
I do get a VISA error when I run the exe, I'm away from that machine right now so I can't quote the exact text of the error.
When the EXE starts up, there is a com port dropdown that always contains a default COM3 entry in it, regardless of what the active com port is. When the user clicks on the dropdown, there are two other entries - LPT1 printer port and also the active com port. You must then select the active com port. It doesn't find it automatically. It's not a big deal that the user has to do this because there are also some other things they have to configure in the interface before running the exe.
When it comes to drivers, you need to package them, along with the exe, in an installer. Also, if com ports are physical ports, they will always show up on your PC. That doesn't mean something is necessarily connected to it at the other end. Finally, you can put your code in a loop with an event structure and initialize your com port only when the user selects it from the drop down, rather than immediately at startup
09-28-2018 12:40 PM - edited 09-28-2018 12:45 PM
@GregFreeman wrote:
When it comes to drivers, you need to package them, along with the exe, in an installer. Also, if com ports are physical ports, they will always show up on your PC. That doesn't mean something is necessarily connected to it at the other end. Finally, you can put your code in a loop with an event structure and initialize your com port only when the user selects it from the drop down, rather than immediately at startup