03-25-2010 04:08 AM
Hi,
I built this "caller" VI which opens another VI (server), opens it´s front panel, then waites for 2 seconds and then read a value from the remote VIs front panel.
Now I had to wrap this VI into a DLL. When I access the caller now through opening my DLL I expect it to work the same way than before.
Unfortunatley, the delay from opening the front panel to reading a value from it seems not work any longer.
The wait in the DLL seems to free the server VI.
Every sugestion / workaround higly appreciated
03-29-2010 08:45 AM
Hello jojp,
could you please be more specific what you are doing exactly. What functions do you use?
Have you considered that some functions may not be applicable in a DLL, such as opening a frontpanel?
Regards, Topp
03-29-2010 09:58 AM
Hi Topp,
Thanks for your response.
Actually I grab a VI Server reference from a array, then I use the "run VI" property node, next is the "open front panel" property node, then I used the "wait (ms)" property node, after that I used "get control value" node.
This caller VI runs perfect in the Development Enviroment. I starts the server VI, opens its front panel, waits for a few seconds and then gets the value from the server´s controls.
Now I wrap the VI with a few others into a DLL from some reasons.
When I call the function which stands now for the caller VI, its starts the server VI, opens its front panel, a then the server vi holds on for the wait time. This means the front panel freezes and no interaction is possible until the wait time is over.
After that the caller gets now not the correct values from the server VI since it did not have enough time to get initialized.
I hope this understandable?
Best regards jojp
03-29-2010 10:01 AM
Have you looke a VI Server call by reference?
It will return values the same way a sub-VI can return values.
Ben
03-30-2010 01:23 AM
Hi Ben,
no I didn´t use a strict reference. Propbably I should try if this changes the behavior of the DLL.
Thanks for your comment.