LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

C++

In Labview can a C process running through one call to a DLL and have that process continue running and subsequent calls to read/write operations simply access this already running thread?

0 Kudos
Message 1 of 3
(2,276 Views)

The CIN will be locked until it passes out the data you are requesting, so i don't think that is possible. I COULD be wrong on this though...

________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 2 of 3
(2,264 Views)

Your verbiage is not very clear but if you mean if the Call Library Node call will return while the C function is still operating then no it won't. The Call Library Node is simply a function call and that blocks until the function returns independant if you call that function from LabVIEW or C, or anything else.

 

What you have to do is spawning a thread (or process) in the DLL function and then return to LabVIEW, and most likely provide some means to communicated from LabVIEW with this thread/process somehow by using pipes, a queue or something like this in the DLL and exporting functions from the DLL to send messages through these channels to the thread/process and possibly retrieve answers from it.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 3
(2,253 Views)