04-20-2012 10:31 AM
04-20-2012 10:44 AM
It depends on the need. If you are using USR (Uninitialized Shift Register - More info ) in those sub vi's and want to use the data differently for the different units then make those vi's clone but generally its not required to make the sub vi's clone.
04-20-2012 11:45 AM
04-20-2012 11:47 AM
@ben64 wrote:
I'm not using any AE in the subs
Ben64
But I am Damn sure you will use it in the future.
04-20-2012 11:50 AM
04-20-2012 02:03 PM
You can use non-rentrant in a re-entrant VI but if both instances are trying to use the same non-reentrant sub-VI, the second will hang waiting fo rthe first to finish using the sub-VI.
If you are talking LVOOP and recursive classes... then it appears everything has to be re-entrant. Well at least I LV insisted I make them all re-entrant.
Ben
04-20-2012 02:11 PM
@Ben wrote:
You can use non-rentrant in a re-entrant VI but if both instances are trying to use the same non-reentrant sub-VI, the second will hang waiting fo rthe first to finish using the sub-VI.
If you are talking LVOOP and recursive classes... then it appears everything has to be re-entrant. Well at least I LV insisted I make them all re-entrant.
Ben
Thanks Ben,
In this case it is not LVOOP and recursive classes. I want to test 4 units in parallel so I have 4 copies of my test engine VIs. From what you're saying it seems I should made some of the subVIs reentrant to avoid the other instances to hang. One of the sub is a test state machine so probably this one also will have subVIS to be made reentrant.
Ben64
04-20-2012 02:30 PM
Sounds right.
Here are a couple of tip if you run into a situation where you you would love to use an AE in that scenario but can't because the two different re-entrant instances would interfere with each other.
Option 1
Use Call by Ref nodes to invoke the AE and open a new instance of the Ae for each top-level re-entrant VI.
Option 2
Use a DVR to store the data (one for each top-Level) and pass the RDV ref to a pseudo-AE and let act on the DVR data instance instead of data from its internal SR.
Option 3
Use LVOOP methods instead of an AE, and keep the Class data in the Top-level re-entrant.
Ben
04-20-2012 03:07 PM