Kasper Veenvliet Posted January 20, 2006 Report Share Posted January 20, 2006 Hi, I don't have very much LabView experience, but I'm writing an PDA application which calls functions from a DLL. So far so good. But I want to call some of the functions non-blocking. So LabView will continue with it's wait loops etc. Will this be possible? I tried: * "reentrant" on the DLL caller. * Created a subVI for only calling the DLL function. And set "Execution" to data aquisition thread. The GUI is responsible while calling a function from a DLL (so looks like some thread are started after all) But the while loops etc are stalled. Can somebody help me, make my app perfect? Quote Link to comment
MatsB Posted January 20, 2006 Report Share Posted January 20, 2006 You can try creating a subVi of the dll call and call it dynamically. Use "open vi reference" to get a reference to your subvi. Then you use an "Invoke node" and select Run VI. You can then wire a false constant to the "wait until done" input. /Mats Quote Link to comment
Yair Posted January 21, 2006 Report Share Posted January 21, 2006 Dynamic VI calls are not supported in the PDA module. I haven't worked with DLLs in the PDA module, but it sound to me like what you might need is to create a specific loop for the DLL call (with a case structure) and transfer the data between the loops. You should be careful when doing this because my experience has shown that the PDA module does not always like multiple parallel loops. Also, you should think about how much non-blocking you want this to be. For example, does the PDA return information which you will use? If so, how long will it take before you will need to receive the information? If you will want to do several calls in parallel that will mean that you will need several loops and synchronizing them could be a problem (not to mention the performance issues and the possible increased memory consumption). Quote Link to comment
yonatan.tidhar Posted January 22, 2006 Report Share Posted January 22, 2006 Did your dll is nun blocking? if not labview is wait until your call is done because of that by default it runs in the UI thread if your dll is thread safe calling it in reentrant mode can help Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.