Discusiones sobre Productos NI

cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

boton Start / Stop

hola que tal,

quisiera saber si esta es una buena manera de crear un boton start/stop en un programa, quisiera algunos consejor por favor.

No creo que un while loop dentro de otro while loop sea una buena idea..

me pueden ayudar gracias

 

 

0 kudos
Mensaje 1 de 2
3.356 Vistas

 

Hi,

 

Thank you for posting your question on the National Instruments' forums.

 

Apparently, you are using a state machine architecture with a DAQ task to perform the various operations you need, which is a good thing.

 

It usually isn’t a good idea to put a while loop inside another while loop but I think the VI you made should work.

 

Alternatively, if you don't need to modify on the loop the configuration of your DAQ board, you should consider placing the configuration DAQ VIs outside of your first while loop.

 

Here is an example showing such a thing. Of course it's not the same application as yours, but it should give you the right way of programming :

 

Writing Data to an LED array through State Machine

 

You can also find several other examples rather close to what you are doing on our Community. Here is another one :

 

State Machine for DAQ - AI and AO

 

I hope this information helped you.

 

Best regards,

Guillaume H.
National Instruments France

0 kudos
Mensaje 2 de 2
3.346 Vistas