LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform chart from array

So i've looked through the help, tried a bunch of things and none have gotten this quite right. So I'm hear as a last resort cuz I'm frustrated Smiley Mad. I have an array that is 51,200 elements long. This represents 1 second of data (acquiring at 51.2 kHz..duh).

 

So, what I would like to do is plot this data to a chart. So, I wire it into the Y of set waveform components yada yada. What I want it to do is, display 10 seconds worth of data, so 512,000 points, then start throwing away old data 1 second at a time so the chart "moves". I have messed with the chart history length, append waveforms (which works but doesn't "move" and throw away old data...I'm guessing because the chart sees it as only 1 waveform) but to no avail. Can someone just draw up a quick sample of getting this to work?

 

I want it to shift like the "Real-Time Chart" example that ships with LabVIEW, but not be plotting for single points, instead be plotting the arrays.

 

To summarize...Plot 51,200 points 10 times so there are 512,000 points on the plot (this may be overkill and I may look to plot only ever 10th point in teh future), then on the 11th time throw away the first 51,200 points (or 1 second worth of data) and show seconds 2-11, then 3-12 etc etc.

 

They didn't have this on the CLD exam...so I don't know how to do it apparently haha. Smiley Tongue

0 Kudos
Message 1 of 4
(5,140 Views)

Don't convert to waveform data, just autoindex at a FOR loop boundary and place a chart indicator inside the loop. Set the chart history accordingly and place a suitable wait inside the loop.

 

To get the correct x axis values, set the xo and dx of the x axis so the point spacing agrees with the data.

 

Of course you can also take larger running chunks (based in [i]) using array subset and display then in a plain waveform graph (not chart!) inside the for loop. In this case you would not autoindex the array.

 

See how far you get....

 

 

0 Kudos
Message 2 of 4
(5,126 Views)
Thanks for the response. My coworker actually said he got it working but I haven't seen the code yet. I will follow up with his solution tomorrow but may optimize if yours seems more suitable or efficient
Message 3 of 4
(5,111 Views)

Is the 1 second of data going to be changing or is it just the 10 times worth of the same second?

 

Rgs,

 

Lucither.

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
0 Kudos
Message 4 of 4
(5,100 Views)