04-13-2007 03:37 AM
04-13-2007 05:57 AM
Q1: No, all subVIs on renentrant VI don't need to be reentrant. However if your subVI is part of the recursive call chain, then it needs to be reentrant.
@02Fede69 wrote:Hello guys,I'have the following:VI_1 Reentrant VIVI_2 Reentrant VIAll SubVIs in VI_1 and VI_2 are reentrant1 question:Is it correct that all SubVIs inside a reentrant VI must be reentrant as well? (I did so, but I'm not sure that it is correct)2 question:VI_1 is called inside a while loop of my applicationVI_1 does the following:Open reference to VI_2 (Option = 0x08)Set ctrl value [Variant]Run VI_2 (Wait until done = TRUE; Auto dispose ref = FALSE)Get ctrl value [Variant]Close reference openVI_2 by using a wrapper SubVI calls by Call Library Node a Multithreading safe method of a dll (the Call Library Node is configured as Reentrant)What I see is that memory is increasing up to LabView crash.Why? I thougth that closing reference of VI_2 would force LV to release memory allocated for VI_2 execution.If I set VI_2 not reentrant and if VI_1 opens a VI_2 reference with option 0x00 It works.Please help me.Thank youFederico
04-13-2007 08:10 AM
04-13-2007 08:22 AM
04-13-2007 08:34 AM
Tomi You are helping me and I'm implementing what you told me.
I only explain to you why I have to you use reentrant VIs called dynamically.
What I do not understand is: Do you think that my dynamic call is not correct?
I already correct my SubVIs making them not reentrant but the problem persists.
Only if I set the VI_2 not reentrant it works
Thank you
Federico
04-13-2007 08:57 AM
04-13-2007 09:31 AM
Tomi.... I used Call by ref as you told me and it seems to work!!!! ; - )
As attached you find my code but consider that now everything is not reentrant.
Normally I used my VIs as following:
At the begining of my application
1 - GenDUTdrv - Configure.vi
2 - GenDUTdrv - Initialize.vi
Then
Any action (see GenDUTdrv - Protective - Get alarm message.vi as example)
At the end of my application
1 - GenDUTdrv - Close.vi
2 - GenDUTdrv - Dispose.vi
Waiting your feedback...
Thank you a lot
Federico
04-13-2007 09:53 AM
Tomi I 've just verify that if a SubVI of a reentrant VI is not reentrant
then I've a serial execution on SubVI not reentrant without advantage
Fede
04-13-2007 12:21 PM
04-16-2007 07:25 AM
Hi Timi,
I'd like to thank you a lot for your help. Everything seems to work.
Ciao e buona foruna [By and good luck]
Federico