LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

run endless c-dll and use GUI in parallel

Solved!
Go to solution

Hi,

 

I want to start a function from a c-dll in LabVIEW (that works fine) and while executing this function (it may run for

a long time), I want to collect input from the LabVIEW GUI (e.g. a change in a numeric control).

I put these two tasks in two unconnected while-loops but still, as long as the c-function is running I cannot

collect changes from the GUI (at least the changes are not shown, after the c-function has stopped, the

changes become visible).

 

So running the function from the c-dll completely blocks the LabView GUI. Can anyone give me a hint

how I can run these two things in parallel?

 

thanks,

CF

0 Kudos
Message 1 of 3
(2,122 Views)
Solution
Accepted by topic author CF333

You need to change the Call Library Function Node configuration from "Run in the UI thread" to "Run in Any Thread."  Normally this option should be used only when you know the DLL is reentrant (thread-safe).  However, if you're only running one function from the DLL and it's running continuously, it will stay in the same thread for the duration of the call so it won't matter in which thread you call it.  By allowing it to run in any thread you'll free the user interface thread to handle the user interface.

Message 2 of 3
(2,113 Views)

Thank you, thank you, thank you, thank you ...

0 Kudos
Message 3 of 3
(2,104 Views)