LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application Builder: Can you create non-blocking, return-immediately functions in a dll?

I need to include a procedure in a dll that is non-blocking, i.e. it should return immediately after the procedure has been called, and not return after its processes are completed.

The procedure is a LabView 7.0 VI, and the dll is being created using the Application Builder. Currently the procedure completes its desired task and then returns, but I would like the function to return immediately. Thanks for your help!
0 Kudos
Message 1 of 2
(2,461 Views)
Rischaard,

I don't know if that will work in a dll, however as an idea:

use the vi-server functions:
Your dll-procedure opens a OwnTreat.vi(wich will do the work) with vi-server, and run it without waiting for completion.

First thing OwnTreat.vi should do is opening (with vi-server) a reference to itself (So your caller dll can close without stopping the OwnTreat.vi)
Then OwnTreat.vi con do what YOU want. When finished close the self-reference

Maybe you need a short wait or a feedback to make sure that OwnTreat has opened his own reverence before your dll stops.
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 2
(2,444 Views)