Discusiones sobre Productos NI

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

Store data in an array

Hello,

I have an output that is constantly varying between 0 and 3 (a square signal)
I want to represent it through a waveform, and for that I'm using a  build waveform fuction.

I want to store the data 0 3 0 3 0 3 .... in an array as they are generated to introduce it to the Y input of build array  of the array.

How can I build this array without a for loop?


Thanks
0 kudos
Mensaje 1 de 3
2.167 Vistas

Hello, Cristina.

 

i think using a for loop isn't the best option to do this. Istead, I would used a while loop and a Insert Into Array Function through a Shift Register.

 

That should work better.

 

Example Code:

 

Array 0-3.PNG

Feliz navidad.

0 kudos
Mensaje 2 de 3
2.127 Vistas

Thank you very much.

 

Another question, how i do that the grafic it moves to left in time?

 

the signal is joined to the right and it is getting smaller, I want it to move to the left to see it more expanded

 

Do you understand me?

 

Thanks really. 🙂

0 kudos
Mensaje 3 de 3
2.113 Vistas