LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I manipulate this array

I have a vi, where I am acquiring data from n amount of channels. I then take certain channels and index out the first reading of each channel to use to update numerical displays. What I want to do is take the final array and create 5 arrays (1 for each channel that I am working on) containing so many points of data that I specifiy, for instance 600 points of data. The final array updates as fast as the while loop runs, but data is acquire by my selected scan rate and number of scans to acquire. So I am scanning at a rate of 1000 times a second and only taking 5 scans at a time. Then I am indexing out the first scan out of that five and putting it in the array. The array is then used further on in my vi to update 5 different nu
merical indicators. This update is dynamic and works as fast as the loop allows. What I want to do is make 5 arrays of 600 data points (which would be 3 seconds of data) and plot it to 5 different charts or graphs. So I would end up with some dynamically changing indicators and graphs or charts that display 3 seconds of the same data at once.
0 Kudos
Message 1 of 2
(2,409 Views)
Hello,

I'm having some trouble understanding your question, and the VI which you have attached doesn't seem to do anything like what you are describing (at least as I understand it). I'll offer a general suggestion, and if it doesn't answer your question, please respond with a more clear description of your problem (something step by step, describing the data you have and want at each step might be more useful, or, if you could break your overall problem down into a series of "how do I do this?" type questions, it would probably make it easier to pick apart).

If you want a dynamically updating graphical data indicator, your best bet is to use a chart, this will be both more efficient and easier to implement than a graph. A chart will retain a history of points
for you, and you can write more than one point into it at a time if you desire. Thus, I would suggest taking your waveform array, indexing out the channels you are interested in, and then just wiring those channels directly to waveform charts. At each iteration of the while loop the chart will add the points in the waveform to the points which are already in it and you can then adjust the scales on the chart to show how ever many seconds of data you want to see at a time.

Hope that helps,
Ryan K.
0 Kudos
Message 2 of 2
(2,409 Views)