LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using multiple events structure inside state machine to control the Tab

Hi y'all,

 

Anne here.I have a Tab indicator in my front panel and I want to be able to control the flow of my program based on what controls I clicked inside the tab. I am using a state machine architecture and inside every state, I use an event structure to check for user interaction  to determine the next state and what tab page is going to be displayed next. This means that I am actually using multiple event structures in my application and I use them in just one while loop, but just that they are not running in parallel since I am only using "one event structure per state" which means that only one event structure is running at one time. My questions is, programming technique wise, am I doing it correctly? So far, I am not facing any problem (I am still in the early stage of the project) but I want to check with you all first on your opinion regarding this architecture. Will there be any issue on using multiple event structures in a vi? Since I will be using a tab, and the controls available in the tab will be the controls that will control my event structure for that state, by right, there should be no issue. Am I correct to assume this? Is there any limit on the use of event structures? I have attached here a simple sample of the architecture that I am talking about for your reference. I have attached a 2010 version and a 8.6 version. Let me know what you think or any opinions that you may have.

 

Hoping to hear from you soon! Thanks so much in advance!

 

Cheers!

 

Anne

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

Hi,

 

first thing that comes to my mind after playing around with your VI:

Do you really have to control the Tab Control via Buttons? Normally Tabs are chosen by simply clicking them. That way you save the trouble of using all the buttons and subsequently the multiple event Structures.

Additionally, designing your interface you always have to think of the stupidest user possible. If he uses your program he can get really annoyed by him not being able to choose the tabs directly.

 

If you don't want all this, and you want to use the buttons, I can't see any errors, but maybe someone else ist more qualified to answer that.



Remember Cunningham's Law
0 Kudos
Message 2 of 4
(2,804 Views)

Another way to do it, if you are trying to create different operation level for different persons is to use property node of the tab control and maybe a password to choose which tabs will be visible or which buttons will be visible.

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

Hi jak888,

 

I decided to use tabs cause I don't want to have subvi pop ups every time i need to perform the process in the state and show an update in the front panel. This is actually going to be more of an ATE where you will have to choose first whether the one using is the operator or the engineer. If the operator is logged in, she will proceed to choose what test to run (this state will have its own event structure). This part, I don't want a pop up, so what happens is that from Login page, if the user logs in as operator, the tab will automatically switch to the Test Selection page. After selecting the test, it will proceed to Start Test state and the tab will show the Result Summary page. If the user logs in as engineer, then a totally different tab will be automatically shown next and so on. By doing this, I will be able to show an update on the front panel objects without having the subvis pop up. I will also just need to use the call reference functions to call my subvis, making my Main VI more generic. The tab Page header will be hidden so the operator will actually not see that there is a tab and that there are a lot of controls and indicators cause they are hidden in the tabs and that page will only be shown based on what they selected from the main tab. 

 

I appreciate your thoughts! thanks so much! 🙂

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