07-06-2018 11:26 PM
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.
07-07-2018 08:01 AM
Do you receive any error dialogue or any specific error code when you use the dll in the .EXE?
07-07-2018 08:50 AM - edited 07-07-2018 08:51 AM
You try to execute your exe on the same computer as when you run it in the LabVIEW project?
07-07-2018 10:07 AM
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.
07-09-2018 01:00 AM
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?
07-09-2018 06:15 AM
@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.
07-09-2018 06:23 AM
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.)