01-05-2017 01:19 PM - edited 01-05-2017 01:30 PM
I have a problem with third party DLL that I'm using for my project.
It controls a device connected to USB port and reads the sensor data.
When I'm starting vi from the project it shows correct result:
But after creating application I'm getting different value on the same computer:
The dll that I'm reading is moved to data folder after building exec
The code I'm using is rather simple:
Please help
Solved! Go to Solution.
01-05-2017 01:54 PM
Remove the path from the Call Library function and then put the DLL in the same directory as your EXE.
01-05-2017 02:10 PM - edited 01-05-2017 02:24 PM
Hey
Do you mean like that?
I have a broken Run Arrow:
Should I set something more?
I also tried this:
but it didn't change anything. It has the same result at vi and exec 😕
01-05-2017 02:33 PM
No, remove the path, not the filename.
01-05-2017 02:51 PM
Hi
So I've done this:
I moved this dll to where vi was, after starting vi, I didn't get correct results (different that the two before)
After creating application, I moved dll from data to where exe was but I've got the same result as before (this big number, that was not ok)
01-05-2017 03:04 PM
Put indicators on your front panel after all of the DLL calls to see which ones are wrong. The Units DLL call doesn't have the GM0.dll reference in the name. Is there something about that call that is different than the others?
01-05-2017 04:01 PM
First guess: this dll uses another dll that is originally next to it. Labview puts near build only top level dll, it looses connection to all others.
Try to specify absolute path to original dll, not relative to exe.
Second guess: some error happens in the first call, because com-port is not closed (I see "start-connect", but not "close" function), it gives wrong number.
Connect errors and check for errors, verify output after all dll calls
01-06-2017 10:08 AM
Hi
Thanks for ideas
Yes, it seems like there were another dlls that the original dll made a call to.
I've done relative path and put all to folder with exe.
I've also moved them to system32 folder, does this makes a difference?
It appears like now it sometimes works straight away, sometimes after couple tries, but I guess this is related to some other issue, maybe, as you suggested, because connection is not closed properly.
Thanks again for your time and ideas