LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stop dentro de event structure

Saludos a todos.

Necesito una pequeña ayuda en un problema que me esta rompiendo la cabeza. Estoy utilizando el event structure para realizar mi programa. Dentro de un case del event structure hago unas operaciones con una estructura while hasta que presione el boton stop para finalizar el bucle while. El problema es que no puedo finalizar el bucle while porqu no reconoce cuando yo pulso este stop.

Si alguien pudiera ayudarme, le estaria muy agradecido

0 Kudos
Message 1 of 5
(2,889 Views)

Spanish to English translation

 

I need a little help on a problem that is breaking my head. I am using the event structure for my program. In a case of the event structure do some operations with a structure while until you press the stop button to end the while loop. The problem is I can not complete the loop while failing to recognize this when I stop pulse.

If somebody could help me, I would be grateful
 

 
Please attach your VI so we can see what you are trying to do.
0 Kudos
Message 2 of 5
(2,880 Views)

I cant't stop the bucle while in the "caso 1" with the stop button. What can I do?

0 Kudos
Message 3 of 5
(2,875 Views)

First, it is a bad idea to set up a while loop inside of an event case.  An event case should return quickly from whatever it is doing so that the event structure can be ready to handle the next event.  A while loop inside prevents that.

 

Your main problem is that if you right click on the event case and edit its properties, down to the lower left, you'll see you have a checkbox checked that says Lock front panel until this event completes.  You've created a catch 22, the event case can't complete until you stop that inner while loop by way of the stop button, but you can't hit the stop button because the front panel has been locked.

 

Uncheck that box and you will find things working better.

 

But in reality, the stop button should have its own event case to handle its button press, and you shouldn't have any code inside an event case like a while loop or user dialog that blocks the execution of the event structure for a long period of time.

0 Kudos
Message 4 of 5
(2,870 Views)

Thanks man. Now I understand my mistake. I will try changing the program

0 Kudos
Message 5 of 5
(2,864 Views)