04-28-2011 04:48 PM
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,
04-28-2011 05:58 PM
And that error message would be? Did you remember to install NI-VISA (I'm assuming you're using VISA) on the target computer?
04-28-2011 06:09 PM
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.
04-28-2011 07:29 PM
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 .exe
04-29-2011 12:16 PM
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
04-29-2011 12:55 PM
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?
04-29-2011 12:57 PM
So, did you search for the error code and make sure no other apps (including LabVIEW) have an open reference to that port?
05-04-2011 10:05 AM
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!!!