LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front panel freezes on very shot click on control

HI!
I have a while loop which is stopped by a stop control (switch until released)there is a timer as well to wait for the next execution of the while loop. This is set to 75ms. If I presse the control long then it works fine. If I press it very short, then the stop button is catched by the "stop if true" condition. Then the front panel freezes and does not accept any actions anymore.
I had problems when I used "latch when released" (therefore I was using "switch until released) because I have an Event Stucture in a Case Structure (flase) which reacts on the same stop button. (in the other case (true)the while loop is running) There the stop button was not released anymore.

How could I make sure that the "stop if tr
ue" condition gets the value of the stop button for sure and make the event sturcture work, too. Is it possible at all to control a while loop and a event with the same stop button? How could I solve this problem?
0 Kudos
Message 1 of 5
(2,861 Views)
Hey Andy,
I am sorry i am not able to understand your problem,could you attach your VI along with the reply so that i can understand your problem
regards
vicky
0 Kudos
Message 2 of 5
(2,861 Views)
Hi vicky!

Sorry about that. I already thought it got a bit confusing. So I reproduced the problem in a basic VI which I have attached. If you set the toggle switch to event -> no problem in that mode. If you set the toggle switch to while and push the stop button very shortly the front panel might freeze and doesn't let you change any control anymore.

If you change the mechanical action of the stop button to "latch until released" the while loop works fine but in case of the Event the stop button doesn't get released anymore (the mechanical action is not triggered ?!). If you edit the event and the boolean is in latch mode it already notes you that there might be problems.

I solved it so far in putting to stop buttons on top of each other and
use the visible property in order to let only one of them appear to the user depending on the selected case. That works fine.

I'm still interested if this is possible with one stop button as well?
Andy
0 Kudos
Message 3 of 5
(2,861 Views)
Hello AndyBE,

I tried running your example and it appears that even though the event structure is not running, it is still trying to handle the event. Since the default value is to lock the front panel during the event handling, it results in a frozen UI when the event occurs.

If we use LabVIEW 7.0 or later we can prevent this by selecting the lock front panel option when creating the value change event.

The other option we have is to use the mechanical action "Switched when pressed". With this action we will need to manually reset the control to guarantee the button is false during the next execution. I have attached a modified VI that shows how to do this.

Regards,

Matt F
0 Kudos
Message 4 of 5
(2,861 Views)
HI! Thanks for your input. As I wrote I solved it with two different controls with different mechanical actions. The "Switch when pressed" function had problems as well if used with both of the control structures. As I don't have 7.x I'll stick to my solution.
0 Kudos
Message 5 of 5
(2,861 Views)