02-26-2011 09:47 AM
Hola
Tengo un problema que creo debe ser sencillo de resolver solo que no se como. Estoy realizando un programa en LabView de adquisicion de datos y quiero agregar un boton que me permita salir del programa. El problema es que el VI es muy largo y utilizando un ciclo While no es sufuciente para mi, necesito alguna manera de estar verificando continuamente el boton de salir. Tampoco me sirve la funcion STOP, ya que al salir del ciclo while necesito pasar a otra etapa para finalizar la comunicacion con el instrumento.
Gracias
02-27-2011 09:19 AM
Hi Vanfer,
I think you may get more replies when you try to explain in English. Is this possible for you?
Kind regards,
Bjorn
02-27-2011 09:20 AM
"Hello
I think I have a problem that should be easy to resolve just do not know how. I amimplementing a program in LabView data acquisition and want to add a button thatallows me to exit the program. The problem is that the VI is very long and using a While loop not it is enough for me, I need some way to be constantly checking out the button.Nor do I use the STOP function, since leaving the while loop need to go to another stageto end the communication with the instrument.
Thanks"
02-27-2011 09:29 AM
Hi,
I tried to translate it myself.
Use a parallel loop where you check your STOP button. Like shown in the image in attachement.
In your DAQ loop, you can read the indicator in every case you are in. If its pressed, you can go to any state you want in your DAQ loop.
Maybe you want to initialise the Stopped indicator as false when your program starts
Kind regards,
Bjorn
03-01-2011 11:19 AM
thank you for your help but this does not solve my problem
attached a picture hoping my question can be understood in a better way
thanks again
03-01-2011 11:29 AM
Which is the part that take so long? Can't you do the configuration outside the loop?
can you break the capture data sequence into small parts and put them in a simple state engine?
the good thing about the state-engine is that you don't "lock" your application.
Kind regards,
Bjorn
03-02-2011 12:31 PM
Hola Banfer,
No estoy muy familiarizado con tu código, pero cuando tu tienes funciones de Wait o de Waint until next ms multiple con tiempos muy grandes, estos afectan la velocidad de procesamiento de las instrucciones dentro de tu VI, lo que puedes hacer es utilizar otros métodos de espera para poder tener tu ciclo while corriendo de manera más rápida.
Te recomiendo revisar este pequeño tutorial que te da todas las bases de LV: http://digital.ni.com/worldwide/latam.nsf/web/all/6224ee1564f4688786256ed60057896a
Revisalo y si puedes ser un poco más específico o subir tu VI podria ser de mucha mayor ayuda.
Saludos,