LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control the tab control using event structure?

Hi,
I am using tab control and event structure in the program.
When i run the application event is not happening for the active page.
When user switches from active page to the other page then event is taking place for all pages
 
So, how to get the event trigger for the active page when the application is started
 
For more clarification i am attaching the code "Test Control Tab using Event Structure.vi"
0 Kudos
Message 1 of 2
(3,098 Views)

You have a basic misunderstanding of dataflow. Maybe you should start with some tutorials or study some of the examples that ship with LabVIEW.

  1. The event structure belongs inside the while loop, and not vice versa. RIght now, the event structure only runs exactly once and never again.
  2. If the stop is pressed first, the VI will stop. Game over.
  3. If the tab control is changed (from any state to any other state!), the inner loop will spin forever as fast as the CPU allows, either executing one or the other case. It just reads the tab terminal to decide which case to execute. Changing tab never triggers any events. The VI is trapped inside the event until stop is pressed to stop the VI.

you were closer to a reasonable program in the other thread:

http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=287905

Have you tried execution highlighting? Maybe things would become more clear of you do. 🙂

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