LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question of page actions

Solved!
Go to solution

I have some questions of the action when clicking the pages in front panel. Since the program is too complicated, I am using a simplified one to ask for help.

As you can see from this picture, I have 3 pages. In this third page, I can click "start light" button to turn on the light. What I want is to achieve the function of the following

(1) For another button "reset and leave page 3". What I want is " when click this button, the main while loop will be turn off. At the mean time, the front panel will show page 1 or page 2, any thing is OK but not page 3.

(2) If in page 3, light is ON, if we do not click this "reset and leave page 3button, just click page 1 or page 2, there will be a dialogue box coming out to say "please reset system first before going to the others". And it keeps the front panel in page 3.

 

Could anybody advise me how can I implement these two functions? Thank you very much!

 

 

 

""1.PNG

0 Kudos
Message 1 of 3
(2,356 Views)

Hi,

 

you need to compare the old value of the tab control along with the value of light, under tab control value change event. if your condition is not satisfied as you mentioned in the queastion, you can call the dialog to intimate the user and pass the old value to the tab page using the property node of the tab control.

 

Upon termination of your loop you can pass the required value to the tabcontrol using the tab control property node. 

0 Kudos
Message 2 of 3
(2,353 Views)
Solution
Accepted by topic author bhl3302

-          Some recommendations:

-          Check your stop condition, if you are using events is not a good idea to use the stop outside the event structure (you can include an event to stop the execution).

-          Avoid using local variables. They are not necessary in this case. You can set the default value of the light to false by right clicking>>data operations>>make current value default.

-          To leave a page you can use a property node to set the value to page 1 for example.

-          To avoid going to page 1 or page 2 when the light is ON, you can use a property node to make them invisible.

-          Here a clue to manipulate pages individually:

tab control

0 Kudos
Message 3 of 3
(2,328 Views)