07-18-2024 01:43 PM
Friends
I'm developing a program in LabView using tabs. However, when I run the program, if I switch to the next tab, the functions in that tab do not work. How do I make the program run straight even when changing tabs? As it is now, I need to stop what was done in tab 1 and when I go to tab 2, I need to run it again and so on. How can I make the program run completely in all tabs without having to stop the previous tab and run the new tab? Thanks!
07-18-2024 01:48 PM
My guess is that you are reading the tab at the beginning of your application and never again after that. Can you share your code so we know what you are dealing with?
07-18-2024 02:12 PM
A Tab Control is just a container for controls and indicators. It can't do what you are describing unless you have programmed that behavior specifically. We will need to see your code to help.
07-18-2024 10:14 PM
Tabs basically are a way to organize controls and indicators. Switching tabs will not change your application behavior unless you add logic to be aware of the Active tab.
07-20-2024 02:23 AM
@MarceloPinto71 wrote:I'm developing a program in LabView using tabs. However, when I run the program, if I switch to the next tab, the functions in that tab do not work. How do I make the program run straight even when changing tabs? As it is now, I need to stop what was done in tab 1 and when I go to tab 2, I need to run it again and so on. How can I make the program run completely in all tabs without having to stop the previous tab and run the new tab? Thanks!
You have not provided any information on your code architecture and already got some wild guesses what could be wrong with your code. Of course there are millions of other possibilities.
Most often the terminal of the tab control should not connected to anything. Program your code as if all controls are just scattered on the front panel. Typically you should not micromanage the code by e.g. connecting the tab terminal to a case structure or similar.
As a first step attach your VI. Make sure all controls contain typical default values and explain how you operate it. If your LabVIEW is recent, do a "save for previous" (2020 or below) before attaching.
07-24-2024 09:43 AM
Thanks to all for your help! I managed to solve it using a state machine.
Thankful to all of you, friends!