LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Non terminating Timed Loop

Solved!
Go to solution

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 )

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 1 of 7
(746 Views)

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.

0 Kudos
Message 2 of 7
(732 Views)

Oh..sorry. Attaching it now .

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 3 of 7
(720 Views)
Solution
Accepted by MogaRaghu

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.

0 Kudos
Message 4 of 7
(717 Views)

It is MY very own VI Smiley Happy

 

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.

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 5 of 7
(694 Views)
Highlighted

@Raghunathan wrote:

It is MY very own VI Smiley Happy

 

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).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 6 of 7
(667 Views)

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

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 7 of 7
(648 Views)