LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.EXE with 3rd party dll

Hi I use Siemens servo profinet device for my application,I use a .dll file to communicate with servo drive,That dll works fine in project window but does not execute when .Exe is built.Please help me to build .exe file.Thanks in advance.

0 Kudos
Message 1 of 7
(3,455 Views)

Do you receive any error dialogue or any specific error code when you use the dll in the .EXE?


CLD Using LabVIEW since 2013
0 Kudos
Message 2 of 7
(3,424 Views)

You try to execute your exe on the same computer as when you run it in the LabVIEW project?

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 7
(3,418 Views)

I don't get any errors while execution.But the dll file itself is not executed,I came to conclusion based on communication loss between servo drive and labview when exe is executed.

0 Kudos
Message 4 of 7
(3,407 Views)

Is the location of the dll file is same as in labview project? How do you specify the dll location : Directly in the shared variable node or external path is provided?


CLD Using LabVIEW since 2013
0 Kudos
Message 5 of 7
(3,374 Views)

@Achuarjun wrote:

I don't get any errors while execution.


Do you handle the errors? If you don't have any error handling in your program, you won't get any errors while execution as well. That doesn't mean there are no errors.

 


@Achuarjun wrote:

But the dll file itself is not executed,I came to conclusion based on communication loss between servo drive and labview when exe is executed.


If there is no communication, other things might be wrong. It doesn't automatically mean the .dll is not executed.

 

If it's not executing, LabVIEW either can't find it (path problem), it can't execute it (missing dependency or rights issue) or it's not called at all.

 

Often something else turns up as a problem, like absolute paths that are wrong in the executable. A solid error handling mechanism is crucial.

 

You might try compiling with debugging on, and then remotely connect to the executable. Then you should be able to put probes on wires, giving you much more to go on. I consider this a workaround: ideally, the application should give that kind of feedback.

0 Kudos
Message 6 of 7
(3,365 Views)

Are you expecting the dll to be included inside the executable?  The only way the executable comes along for the ride is if you add it manually, and even then it goes into the data folder, not as part of the executable.

 

As for no errors, if you are relying on LabVIEW handling the errors automatically, you will be sorely disappointed to know that auto-error handling is turned off by default inside an executable, so you won't know if you had an error or not, unless you explicitly handle them.  (Hint: ALWAYS handle "expected" errors explicitly, unexpected ones in a generic fashion.  An example of an "expected" error is "file not found" if you are looking for a file.)

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 7
(3,360 Views)