LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timer function till some boolean become true

Highlighted

I want that a loop waits till some boolean from another loop becomes true.

Is it possible to make it with a kind of timer?

 

Thanks in advance

0 Kudos
Message 1 of 4
(418 Views)
Highlighted

Why a timer? You could use an event structure with a user event. You could wait on a queue or a notifier. These are preferred methods for waiting for data from another task.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 2 of 4
(395 Views)
Highlighted

As Mark mentioned, here's how notifiers can be used to do what you want:

notifiers_snippet

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'

0 Kudos
Message 3 of 4
(368 Views)
Highlighted

Just don't (ever) name those Notifiers (nor queues)!

 

Naming them will essentially create a global. Nothing good will come from it. Unless it should explicitly be a global, do not give them a name. At some point you want this behavior twice. So you make the VI\code reentrant. Now you have two unrelated VIs communicating with each other.

 

Give the constant a label. That will show up in the probes. The name of the Notifier doesn't do any good, and a lot of bad. IMHO, but I've seen it go sour quite a few times.

 

I've seen libraries that used "Main" as queue name. And then 3 people searching for hours, because their template names queues with VI name - ".vi". They named their main VI Main.vi...

 

Just be warned... 

0 Kudos
Message 4 of 4
(347 Views)