Discussion:
Creating global controls
(too old to reply)
Andre55
2008-08-12 18:40:07 UTC
Permalink
Hello, I was wondering how I would go about creating a global control. I am not sure what is the conventional meaning of a global control, but I am specifically looking for a control that bypasses structures so that I can instruct an infinite loop inside a case structure to stop from outside the case structure. Thanks. Andre
drewsky
2008-08-12 19:10:05 UTC
Permalink
To make a global, you'd want to check for a change on the control then wire the control into a Global Variable.  A global variable in LabVIEW is a variable that can be used anywhere in your project.
Darren
2008-08-12 19:10:06 UTC
Permalink
And if you just need access to this value within a single VI, another option is to create local variables of a front panel control.  I've used this trick before...make a hidden control on the front panel, and use local variables (and its terminal) to share a value between parallel loops on my diagram. If you need access to the value in multiple VIs, however, the previous suggestion of using a Global Variable is the easiest approach.  Just watch out for race conditions...-D
Mythilt
2008-08-12 19:10:07 UTC
Permalink
Do a search for Functional Globals (Also called AE's or Action Engines).  They are a better way to implement what you want to do over a global control.  Another method is to use a queue.  But for what you are describing, the Functional Global is the easier approach.
Continue reading on narkive:
Loading...