LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop a while loop while typing in Numerical control

Hello,
i'm having a while loop running for updating several values but while still being able to write to some numerical controls.
My problem is now, when i want to type into the numerical control it get's unselected and i can't type into it.
What i could find out so far is, that this happens whenever the whileloop executes again (by putting in a long enough delay).
So how do i get the whileloop to wait til i'm done typing into the numerical control or where to position the control to not run into that issue?

Best Regards,
MT_at_home
0 Kudos
Message 1 of 9
(4,620 Views)

It looks like you made some architecture mistakes. can you show us your code and explain exactly how you interact with it?

 

Is the program changing key focus, for example?

0 Kudos
Message 2 of 9
(4,608 Views)

Hi MT_at_home,

 

I suspect there's a better way of doing what you're trying to do but it's difficult to say without seeing the code.  Can you post at least a representative snippet for us to have a look at?

 

PsyenceFact

0 Kudos
Message 3 of 9
(4,606 Views)

Put an Event Structure in the While Loop.  Have a Timeout event case if needed.

Read your controls in Value Change event cases.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 9
(4,605 Views)

I'm having a tabcontrol inside a while loop.
In some pages of the tabcontrol i've positioned several buttons, indicators and numerical controls.
When i want to type into one of the control fields they get unselected whenever the loop updates and though i'm unable to type into them.
It's hard to get a screenshot of my code because it won't fit onto one page.
I'll give paul_cardinale's suggestion a try and let you know if it fixes my problems already.

Best Regards,
MT_at_home
0 Kudos
Message 5 of 9
(4,599 Views)

We don't want any screenshot. can you attach a simplified version of the VI itself?

Does the loop change the tab value?

 

0 Kudos
Message 6 of 9
(4,597 Views)

I found my problem:
I'm using a subvi, which hasn't a loop on its own but is reloaded in my loop over and over again but appears as the top window, so my Main.VI gets unselected whenever the loop loads the other VI again.
I solved it now by creating a whileloop in the subvi and creating a terminal for its stop button so i can end it from my Main.vi.
Thx for the ideas of you, i was searching at the wrong end.

Best Regards,
MT_at_home
0 Kudos
Message 7 of 9
(4,578 Views)

What does the subVI do?

Is there a reason you have it opening up?

 

It is very unusual to have subVI's open their front panel.  If it is to provide a dialog box and a user interface, then yes you open the front panel.  But the vast majority of subVI's are just subroutines or functions (using text based language terminology) that contain code and would not have their front panels opened.

0 Kudos
Message 8 of 9
(4,568 Views)

Hello RavensFan,
it's indeed a dialog box / simulation of inputs.
I used it while working at home for simulating my controls at a machine.

Best Regards,
MT_at_home
0 Kudos
Message 9 of 9
(4,512 Views)