LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB dongle code runs fine but build doesn't

I wrote code to talk to an USB dongle device (at virtual port COM5). If I run the program from source code it works just fine, but when buid it and run it from build, the program doesn't configure COM5 and it send the error msg.

 

Why is it different to run from source code than from build?

How can I fix this problem?

 

Regards,

0 Kudos
Message 1 of 8
(2,650 Views)

And that error message would be? Did you remember to install NI-VISA (I'm assuming you're using VISA) on the target computer?

0 Kudos
Message 2 of 8
(2,639 Views)

Other thoughts would be are you making any type of dynamic calls? If you, you need to include these in your built application. I would also make sure that all of your paths are correct. The paths are different in the development environment and the run-time environment.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 8
(2,637 Views)

Does the dongle driver call a dll?  Is the dll in a directory the .exe can find?  the LabVIEW IDE knows how to look for dlls in /system/  the App you created by building wants the dll in the same directory as the .exeSmiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 8
(2,632 Views)

Thanks for your support Kudos,

 

The dongle is not calling any dlls, at least not that I'm aware off. But supposing it does, why the source code is working but the build doesn't. Now, I need to point out that the running code and the running build is on the same computer, meaning that the resources for the running source code are suppossed to be available for the build as well, right?

 

 

Error Msg:

Code: -1073807246

Source: Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->VINAME.vi

0 Kudos
Message 5 of 8
(2,610 Views)

Have you tried a search for that error code, or placed an error handler? Either one will tell you the error most often happens when you are trying to open a session to a resource that has already been opened. Are you trying to run the application at the same time as the source code? Are you selecting the VISA resouce using a VISA resource control on the front panel? If so, is there a little icon next to the name to indicate the status? Did you try quitting LabVIEW before running your built application?

0 Kudos
Message 6 of 8
(2,604 Views)

So, did you search for the error code and make sure no other apps (including LabVIEW) have an open reference to that port?

0 Kudos
Message 7 of 8
(2,603 Views)

Ok Kudo, you were right! I had to close Labview completelly for the executable to run. To be honest, I was not expecting this kind of problem since, in labview code, I am closing the session. But anyway, it's working... Thank you for your help!!!

0 Kudos
Message 8 of 8
(2,581 Views)