From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Discusiones sobre Productos NI

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

suma de array

hola tengo un problema con un array, la cosa es que el array indicador esta en un while loop y lo que quiero es que conforme vallan las iteraciones sume el siguiente dato. ejemplo 1° iteracion = 1° dato,  2° iteracion = 1° dato + 2° dato,  3° iteracion = 1° dato + 2° dato + 3° dato ..... hasta llegar a un limite, todo esto para ponerlo en un wave form chart por favor ayudaaaa

0 kudos
Mensaje 1 de 4
3.470 Vistas

hola tengo un problema con un array, la cosa es que el array indicador esta en un while loop y lo que quiero es que conforme vallan las iteraciones sume el siguiente dato. ejemplo 1° iteracion = 1° dato,  2° iteracion = 1° dato + 2° dato,  3° iteracion = 1° dato + 2° dato + 3° dato .....   hasta llegar a un limitey cada vez que haga una suma me mande el resultado , todo esto para ponerlo en un wave form chart para sacar el promedio graficamente por favor ayudaaaa

0 kudos
Mensaje 2 de 4
3.465 Vistas

From Google Translate:

Hi I have a problem with an array, the thing is that the indicator array is in a while loop and what I want is that as they go through the iterations add the following data. Example 1st iteration = 1st data, 2nd iteration = 1st data + 2nd data, 3rd iteration = 1st data + 2nd data + 3rd data ..... until reaching a limit, all this for Put it on a wave form chart please help

 

 

Ok, now to the problem.  The simple solution would be to use a chart, which keeps a history.  Alternatively, you could use a shift register and Build Array to add your data and then use a Graph.  This would be slower and a lot more memory intensive.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 kudos
Mensaje 3 de 4
3.457 Vistas

Saludos roger798,

 

Hay muchas maneras de hacer lo que buscas. Te recomiendo que jueges con los registros y utilizando puntas de prueba (Probes) y corriendo tu VI en Ejecución pausada (Highligh execution) verifiques los datos.

 

Revisa los ejemplos de LabVIEW si quieres aprender más de la funcionalidad.

Diego H

National Instruments

0 kudos
Mensaje 4 de 4
3.388 Vistas