08-20-2014 12:10 AM
In the VI attached, I have set the Timed Loop to terminate once the Delay 1 reaches zero. However the Timed Loop continues to run and only terminates if I OR both the Delay 1 and Delay 2. ( Tried with different timings for Delay 2 which are less than Delay 1 , equal to Delay 1 and more than Delay 1 - no luck unless it is also linked to stop )
What is the reason for this ?? ( The VI is in LV2012 )
Solved! Go to Solution.
08-20-2014 12:36 AM
You need to attach the Time Delay SubVI since that is the one that is doing the work and outputing the boolean value that continues or stops the loop.
08-20-2014 01:04 AM
Oh..sorry. Attaching it now .
08-20-2014 01:10 AM - edited 08-20-2014 01:15 AM
And it is password protected which keeps us from looking into it.
Is this your VI or did you get it from somewhere else?
The SubVI properties seem to show it is non-reentrant. That means it can only run one instance at a time. And if it happens to store some data in it from one time it is called to the next in uninitialized shift registers, the execution of one instance is probably interfering with the execution of the other instance.
08-20-2014 02:41 AM
It is MY very own VI
It was inside a project in a SubVI folder and when I posted forgot to unlock it. I am attaching the same duly unlocked ...
I checked the point regarding re-entrancy and just for trial chose the option " Shared Clone Re-Entrant mode " It solved the problem.
But I think better would be to choose "Preallocated clone re-entrant mode " as in which case I dont have to worry about any jitter. ( Right now memory is not a problem )
Thank you very much for pointing this out.
08-20-2014 06:30 AM - edited 08-20-2014 06:31 AM
@Raghunathan wrote:
It is MY very own VI
It was inside a project in a SubVI folder and when I posted forgot to unlock it. I am attaching the same duly unlocked ...
I checked the point regarding re-entrancy and just for trial chose the option " Shared Clone Re-Entrant mode " It solved the problem.
But I think better would be to choose "Preallocated clone re-entrant mode " as in which case I dont have to worry about any jitter. ( Right now memory is not a problem )
Thank you very much for pointing this out.
You definately want Preallocated Clone reentrant mode. The reason is because you are storing some sort of state in that VI with the feedback node. If you use the shared clone mode, you have no idea which instance you will call and therefore no clue what the data in that instance's feedback node is. By using the preallocated clone, each call has its own stored data and you don't have to worry about getting another call's data accidentally.
I would highly recommend reading this blog series on the LabVIEW Field Journal: Maintaining State Information in LabVIEW Applications, Part 1. And be sure to read the entire series on state information (5 parts).
08-20-2014 10:28 AM
Hi Crossrulz,
I asked a doubt and in response got educated on some nice concepts. Thanks for the link to the blog - must say it was very good in explaining the concept of re-entrant VIs.
Cheers