From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front panel Tab control page change

Solved!
Go to solution

Hello,

 

I am trying to create a Labview GUI to control a motor. I use a tab control in which on page 1, it is all about the control of motor and page 2 for the configuration of motor controller. I wanted to make the GUI work in the way that when I click page 2 of the tab control to configure the motor controller, the motor stop by itself. To implement this, the act of clicking on page 2 must change something or produce a number, just like the button "ok". 

 

Does anyone has any idea how to implement this? I could have used a separate button to stop the motor but I am trying to make a more user-friendly GUI.

0 Kudos
Message 1 of 3
(2,711 Views)
Solution
Accepted by topic author Trainee123

Just use an event for the tab control in an event structure.

0 Kudos
Message 2 of 3
(2,708 Views)
Solution
Accepted by topic author Trainee123

Teritask's message will do what you want.

 

But I question whether causing the motor to stop because you changed the tab control is a good idea.  I wouldn't call that a user friendly GUI experience.  When I'm working with tabbed controls in any application, not just LabVIEW, as a user,  I don't expect the behavior of the application to change just because I wanted to view a different page, and I certainly wouldn't expect something physical to happen like the shutting down of a motor.

 

A friendlier user experience would allow a user to view other pages.  If they happen to change some configuration values on that page while the motor is running, then when they click an Apply button or something like that, then the application should warn them that doing so will require the motor to automatically stop.  Then you'd have an OK/Cancel dialog box to allow them to back out.  If they cancel, then the changed values would go back to their original values.

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