LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ VI and control VI in same DLL

Hello all,
 
I have one VI that continuously acquires data, and another VI that reads the data and stops the acquiring VI via global variables.  They work just fine when I open and run them separately, but I would like them to work together within a DLL.  The first time I built the DLL and called the acquiring VI (via a LabWindows app) the program hung up on me, I'm guessing because I passed control to a VI with a while loop and had no way to stop it and kick control back to LabWindows.  The second time I let the acquiring VI run separately and tried to control it via the DLL, but failed again because the acquiring VI wasn't "seeing" the changes the control VI made to the global variables.
 
Is there any way to get two such VIs to work together within the same DLL?  
 
Thank you!
 
Slowpoke
Slowpoke
CLAD (believe it or not!), using LabVIEW 8.5

They don't call me "Slowpoke" for nothin'!
0 Kudos
Message 1 of 3
(2,314 Views)
Hi Slowpoke.

I don't see any problems in controlling the execution of a VI by a global variable - even if both of them reside in a LabVIEW DLL and the global variable is set by a DLL function call (executed by a CVI application).
Attached are two sample projects:
A LabVIEW 8.2 DLL   and  a CVI 8.1 APP.
All code is included for your checks. The code is very lean (or should I say "quick and dirty" ?).

Hope it helps, Guenter
Message 2 of 3
(2,301 Views)

Hello Guenter,

Thank you for your reply, and your sample code.  I had dabbled with using the "Run VI" Invoke node before, but put it out of my mind for some reason.  Maybe it seemed kind of "clunky" to me at the time...if so, your code has definitely changed my mind.  Very helpful!

Thanks again,

Slowpoke

P.S. Maybe I should change my handle to "Tunnel Vision"...  Smiley Happy

 

Slowpoke
CLAD (believe it or not!), using LabVIEW 8.5

They don't call me "Slowpoke" for nothin'!
0 Kudos
Message 3 of 3
(2,279 Views)