LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Monitor Frontpanel control change within a Loop

Hi, I have 2 separate loops running and both need to monitor a control to pause the loop. Is there a cleaner way to monitor a control on the front panel in both loops without using local read calls to the control? If I pass a line from the control into a shift register on both loops the shift register value never changes in the loop. I really hate to use a lot of locals if I don't need to. Can anyone suggest a way to monitor the control value from the front panel within mulitple loops?

 

Tnx.

0 Kudos
Message 1 of 4
(2,598 Views)

What a good idea to try and avoid locals!

 

I suggest you take a look at the "synchronization" palette, it contains notifiers, queues and occurences (and some other) subpalettes, these can all be used to communicate between independant loops.

 

You could also have a look at the design patterns examples that comes with LabVIEW if you got to "file" >> "new..." and then browse through the framework templates, there are some examples of multiloop architecturess.

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 4
(2,587 Views)

Thanks, but there has to be a way to do this without a bunch of synchronization code. This is one thing I don't really like about Labview vs. just straight C code when it comes to monitoring the condition of frontpanel controls in multiple places within a VI. I'll probably just stick to the locals if there's no other way to do it since it's a lot easier unless there are other options 😃

 

Tnx

 

0 Kudos
Message 3 of 4
(2,575 Views)

Ah.. it's usually difficult for people who come to LabVIEW with a good background in a different environnement they find it difficult to adapt to the dataflow paradigm.

 

Locals may let you do what you want but it's very easy to get lost with them as well. Tools in the synchronization palette are very good but have specific usage, if you want to share across you application a set of parameters or "current state" maybe you can use functional global variable (just look up the term on the forum you'll find all details you need).

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 4 of 4
(2,567 Views)