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: 

tab contol locked during while

Solved!
Go to solution

Hi everybody,

 

in a part of my program there are two numeric controls inside a while loop (while all values are selected, user hits stop). The loop is activated in a tab of my tab control, but controls are in another tab. 

When the loop starts it's impossible for me to change from a tab to another, although I've placed the tab contol inside the while loop. The problem is that the tab wich I'm locked in is not the tab with control and stop buttons !

 

Any ideas ?

 

Thanks in advance

0 Kudos
Message 1 of 8
(2,738 Views)

It'll be helpful if you upload your VI for people to look at.

 

Two (simple) causes of not being able to switch tabs.

  • Your tab is an indicator not a control. Fix by right clicking tab and selecting switch to control.
  • One of the tab's pages is locked. Fix by right clicking tab page and selecting Advance> Page enabled state> Enabled

I would also recommend - if you haven't done this already - ensuring you have placed a wait function in your while loop so that it doesn't hog CPU.

Message 2 of 8
(2,735 Views)

@Potterton wrote:

It'll be helpful if you upload your VI for people to look at.

 

Two (simple) causes of not being able to switch tabs.

  • Your tab is an indicator not a control. Fix by right clicking tab and selecting switch to control.
  • One of the tab's pages is locked. Fix by right clicking tab page and selecting Advance> Page enabled state> Enabled

I would also recommend - if you haven't done this already - ensuring you have placed a wait function in your while loop so that it doesn't hog CPU.


Very good guess.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 8
(2,728 Views)

Thanks for the answer. My Tab control is not an indicator and has no pages locked, added the wait function in while loop, but was not helpful ....

 

The test of this vi is a little complicated: I post here a llb. The vi to open is Imaging2.vi, other files are subVis. Unpack the archive data.rar, it contains datas to test the software. 

Open Imaging2.vi and select the folder where you unpacked data.rar, using the path <where u unpacked>\data\analisiPicchi, and selecting 4 in 'passi per lato' control.

 

Run the vi, and go to 'Imaging' tab, then open on the right the 'investigate pixel' tab, and modify one of the coordinates (for example X). Hit ok on the dialog box wich opens, and then try to change tab. I experienced all the panel locked.

 

Are u experiencing same issue ?

 

Thaks for the help

 

 

0 Kudos
Message 4 of 8
(2,698 Views)

sorry, forgot llb

0 Kudos
Message 5 of 8
(2,696 Views)
Solution
Accepted by topic author uge026

Ahh, I didn't realise the tab control was in an event structure. Your 'Y' value event change structure is set to 'lock panel' - so you can't do anything until that event has completed, which it can't because you're stuck in a loop.

 

Fix it by right clicking the "X", "Y" value change event, selecting the "Y" event and unticking the 'lock panel' check box.

 

 

Also, an FYI: if you right click your filepath control and select 'Browse options...' you can change to folder selection mode.

 

And not be too disparaging, but your VI is really bloody messy - your future self will thank you if you keep it tidier.

0 Kudos
Message 6 of 8
(2,686 Views)

@Potterton wrote:

And not be too disparaging, but your VI is really bloody messy - your future self will thank you if you keep it tidier.



I always liken this to writing text code with random indents.  It will still run, but you'll be pulling your hair out trying to figure out how the code runs.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 8
(2,679 Views)

Thanks for hits, I thoght that the lock panel option was for all the event instead of just the X value change 

 

In future I'll write more ordinated Vi !

0 Kudos
Message 8 of 8
(2,647 Views)