LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programacion basica labview

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

0 Kudos
Message 1 of 7
(3,185 Views)

Hi Vanfer,

 

I think you may get more replies when you try to explain in English.  Is this possible for you?

 

Kind regards,

 

Bjorn

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 2 of 7
(3,161 Views)

"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"

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 3 of 7
(3,160 Views)

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

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 4 of 7
(3,158 Views)

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

0 Kudos
Message 5 of 7
(3,115 Views)

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

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 6 of 7
(3,111 Views)

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,

Luis Elias
NI VeriStand and HIL Product Manager
0 Kudos
Message 7 of 7
(3,088 Views)