LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problema con while loop y grafica chart

Solved!
Go to solution

Hola

 

estoy realizando un programa que incrementa un contador cada vez que recibe un 1, el contador se resetea con un boton reset o autoamticamente cada cierto tiempo (el reset por tiempo es para cuando hace mucho tiempo no se recibe una señal de 1 se resetea el contador)

 

hice un programa que hace eso, pero cuando entra el reset del contador de tiempo se queda ahi, nunca sale asi la señal cambie a 1.

 

y mi otra duda es con la grafica chart, resulta que quisiera mostrar los datos del contador con la fecha actual, intente utilizar las propiedades del chart pero no funciona..no se si alguien me pueda ayudar con mis problemas

 

Gracias

Herica M 

PD: estoy utilizando LBV9.0 

0 Kudos
Message 1 of 5
(3,602 Views)

 In case it helps the LabVIEW gurus, here's a (rough?) translation of Herica's post:

 


Hello

 

I'm making a program that increments a meter/counter each time that it receives a 1, the meter resets itself with a reset button or automatically once in a while (the timed reset is in case a long time passes where it doesn't receive a "1" signal to reset itself).

 

I made a program that does that, but when it enters the timed reset it stays there, it never leaves there even if the signal changes to 1.

 

My other doubt is with the graphical chart, I wanted to show the information of the meter/counter with the actual date, I intended to use the properties of the chart but it doesn't work... I don't know if anyone can help me with my problems.

 

Thanks

Hercia M

P.S.: I'm using [LabVIEW 9.0]

 

[Attachment is named: Rain gauge Program.vi] 

Message Edited by Brad G on 04-29-2010 04:53 PM
0 Kudos
Message 2 of 5
(3,593 Views)

How are you running this program?  Please don't tell me you are using the Run Continuously button.  That is only intended for some basic debugging.

 

Most of it will only run once because it isn't in a while loop.  If Activation happens to not equal 1 when you start your program, then your False case will execute.  The while loop inside of that will run and it will never stop because the boolean value that stops the loop is False and always will be false because you determined its value before the loop.

 

Your architecture seems to be completely inside out.  You demonstrated you do not know how data flows in a LabVIEW program.  And once you solve those problems, the local variables will wind up biting you.

 

You really need to take some tutorials on LabVIEW.  I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 3 of 5
(3,580 Views)

Traducción de Ravens (mas o menos):

Ravens translation (more or less):

Como estas corriendo el programa? No me digas que con el boton de Run Continuously, ese botón es solo para debuguear.

 

La mayoria de tu código solo va a correr una vez porque no esta dentro de un ciclo while. Si Activation no es igual a 1, cuando empiezas tu programa, se va a ejecutar el case Falso, el ciclo dentro del case va a correr y nunca se va a parar porque la condición de stop se falsa y siempre va a ser falsa porque su valor se tomo antes de entrar al ciclo.

Tu arquitectura parece ser completamente de adentro hacia fuera. Se ve que no sabes como fluyen los datos en Labview. Lo de las variables locales no lo entendi Smiley Very Happy

 

Te recomienda tomar tutoriales y ahi te puso el link de dos de ellos.

Rodrigo Cuenca
www.cidesi.com

0 Kudos
Message 4 of 5
(3,569 Views)
Solution
Accepted by topic author herica

Como dice Ravens, necesitas leer los tutoriales para que tu mismo te des cuenta de que es lo que estas haciendo mal.

Aqui te anexo el VI con unos cambios para que haga lo que creo que quieres hacer, le puse comentarios pero si tienes dudas me preguntas.

 

Para lo de la grafica en las propiedades del eje X, seleccionas que el dato sea de tiempo absoluto, y luego con un nodo de propiedad de la grafica le puedes hacer un offset al eje X para que sea la fecha actual.

 

P.D. Te recomiendo utilizar el foro en español, o si lo vas poner aqui, hacerlo en ingles.

 

http://forums.ni.com/ni/board?board.id=6170

 

Rodrigo Cuenca
www.cidesi.com

Message 5 of 5
(3,564 Views)