LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to output the elements of an array at a specified frequency?

Solved!
Go to solution

Hi all,

 

I was wondering if someone could help me figure out how to output the elements of an array at a specified frequency.

As seen below, I arranged for a 1D array of dbl values to be auto-indexed into a For loop with a wait delay, in order to view the sequential outputting of the array elements over a period of time with the waveform chart. 

I thought that the auto-indexing function, coupled with the wait timer tool within the loop, would also allow me to output an array where the elements of the original 1D array would be stored into the new one at the same 20ms delay. However, this doesn't seem to be the case, and the new array is simply greyed out when i run the VI.


I am confused on how i can accomplish what i want to do, and would be grateful if anyone could point me in the right direction. I apologize in advance if my explanations are not clear enough

 

Thanks!!!

outputarray.PNG

0 Kudos
Message 1 of 4
(3,402 Views)
Solution
Accepted by topic author bkcw95

That's because the data for the array doesn't arrive at the array indicator until the loop is completely done.

 

If you want the data to show in the array indicator one at a time,the indicator needs to be in the loop.  Build the array in the loop and use a shift register to maintain the built array from one iteration to the next.

Message 2 of 4
(3,384 Views)

To see RavensFan's well-made point, turn on Execution Highlighting. Click the light bulb icon, and see for yourself what is happening.

0 Kudos
Message 3 of 4
(3,333 Views)

Sorry for the delay in responding, but thank you!!

0 Kudos
Message 4 of 4
(3,311 Views)