LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering Tab Control with Boolean Change

Solved!
Go to solution

I have gotten by by searching and lurking for awhile now, but have finally met an obstacle I couldn't solve.  I am self taught with LabVIEW and you guys here have helped a huge amount with it all.

 

My problem is that I have multiple tabs that contain numerous indicators displaying info from a cDAQ.  The tabs automatically cycle on a specified time frame, and what I am trying to do is make them go to a specific tab if a value goes above a specified value.  To make sure the value in question is seen I want to have the tab control automatically switch to that tab for the duration of the problem.

 

There are already boolean's for each of these indicators as I have property nodes changing the text colors if the values go over the specified number, but I cant figure out how to make the tab control respond to the changes.

 

Any help on the issue would be very helpful.

0 Kudos
Message 1 of 16
(4,032 Views)

Simply add events to your event structure (you are using events, right?) that when a button is pressed it selects the desired tab.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 16
(4,030 Views)

There aren't any actual buttons being pressed, once its started it will be running on its own.  From what I understand events are only triggered by actual user input.

0 Kudos
Message 3 of 16
(4,022 Views)

No, Grasshopper, you must open your mind to greater possibility... (pardon me a moment while I have a 70`s TV flashback -- David Carradine, bald, walking through desert...)

 

User interface events are the only ones taught in the Core 2 class, but there are many other sources. You can get events from DAQ inputs, or even create your own user-defined events. So where is this boolean actually coming from?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 16
(4,009 Views)

Hi rifenbug,

 

Events are either user driven or they can occure them self sometimes, like value change event, If value of any boolean indicator changes then an event is registered.

 

use value change event for your already existing boolens and your problem will be solved.

so whenever you get any alarm the boolean indicator related to that alarm will change state and you will get an event, using which you can change tab.

With Regards

Miraz
Kudos is better option to thank somebody on this forum
------------------------------------------------------------------------------
0 Kudos
Message 5 of 16
(4,008 Views)

Thanks for the help guys, I will try it out on a sample VI and see how it works.  Will post the VI if I fail.

0 Kudos
Message 6 of 16
(4,001 Views)

So I made an example VI and I tried out, what I think was mentioned, and had no luck.  The VI is attached and input would be welcomed.

0 Kudos
Message 7 of 16
(3,987 Views)

You don't need a singaling proerty to switch the tab control, a simple local variable would be sufficient (you dson't have event associated to the tabs). Place it after the event structure and you'll only need a single instace. There is no need to duplicate the same code across all cases.

 

However, writing to an indicator will not fire and event. You need to write to a signaling property of the boolean LEDs. Note that a signaling property, when called, will fire the event even if the value does not change, thus you should place the property node in a case structure that only goes true if the boolean changes from false to true.

 

(and please don't maximise the front panel and diagram to the full screen. Very annoying!)

0 Kudos
Message 8 of 16
(3,978 Views)
Solution
Accepted by topic author rifenbug

Here's a quick draft....

 

Of course you need to decide where to go if more than one LED lights up at the same time.

Message 9 of 16
(3,972 Views)

Thank you very much for the help, this looks like what I am trying to do and might take me a while to figure out how you did it, I should be able to break it down.  As far as multiple ones at once, that is a problem I was thinking about and will have to address down the road.  

 

My only question is my only remaining question is, is there a way to make the tab stay on the specified page until the value returns to below the cutoff point?

0 Kudos
Message 10 of 16
(3,949 Views)