LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chart history explanation?

Greetings,

Perhaps I am thinking too much on this, or perhaps too little, but I am trying to figure out what chart history length is actually doing.

For example.  I'm developing an app right now where I am monitoring 32 channels on a system at 10 Hz.  I'm charting up to 10 of any of these channels (user selectable) at any time.  This system can expect to be run for several hours for a test and I have been doing long runs to test stability.  I've tweaked the time axis on the chart to be hours wide, 10 minutes wide, etc.

So, when I have my chart displaying 2 hours worth of 7 channel data on the screen, I'm getting lost as to what factor a chart history length of 1024 means to me?  I'm able to have several hours of data plotted though a history length of 1024 implies I should only be able to see only 1.71 minutes.  Can I only recall the last 1.71 minutes of data out of the chart?

Someone shine the light in the darkness for me eh?

Cheers,
Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
Message 1 of 19
(3,809 Views)
Are you sure that you are updating the chart 10 times a second? The number of points displayed on a chart cannot exceed the chart history so if you are able to display a couple of hours worth of data, either the history length is greater than 1024 or your update rate is much slower. After acquisition, are you doing a lot of post processing or file writes. If you have a while loop with some msec wait, that doesn't mean that each loop iteration will take that amount of time. What it means is that the loop will wait that amount of time before running again. If the acquisition and processing is actually taking a few seconds, then you could have a couple of hours worth of data. It sounds like you have the x axis configured for absolute time. When you have a couple of hours worth of data, go and change it to floating point and see what the total number of samples displayed is.
0 Kudos
Message 2 of 19
(3,785 Views)
I'm trying to understand this behavior. So you say that you have the chart history length set to 1024 and you can view 2 hours worth of data at 10 Hz? That would imply viewing 72000 data points in the chart!
 
If the above statement is correct, I don't quite understand the behavior that you are observing, and we can work on solving the problem together. I haven't been able to reproduce that behavior myself. I have created a very simple array of 10,000 data points. When graphing this data in a waveform chart, I am only able to view the last 1024 samples on the chart!
 
To summarize, a waveform chart with a buffer size of 1024 will plot the last 1024 samples given to it. So if you passed in 10,000 data points only samples 8976-9999 will be visible after running the VI.
 
Please let me know if I correctly interpreted your earlier post. I am interested in working with you to find out what exactly is going on here.
 
Casey Weltzin
National Instruments
0 Kudos
Message 3 of 19
(3,782 Views)

I suspect a waveform data type is involved.

If a chart is setup to accept updates as waveform data types, then the "1024" limits how many WF can be presented to the chart.

If each WF has 1000 elements in its "Y" array, the chart will display 1,024,000 data points.

Ben

 

PS If you posted an example or an image, we would not have to guess. Smiley Wink

Message Edited by Ben on 06-09-2006 11:27 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 19
(3,780 Views)

Hola,

You are correct, I am using waveform data.  I'm attaching a screenshot.  Apologies for the undocumented VI's.  One sets up the daq task, the 2nd adds a channel to the front which is the sum of three other channels, and the last extracts the channels the user has selected to plot.  I have about 2 1/2 hrs up on the chart right now. (started a log after my first post)

um... crap.  I must make a correction.  My history length is actually 180000 (I forgot I had been experimenting on it yesterday).  Man, I'm glad it's Friday.  However, I still do not understand the math.

180000 / (5 waveforms @ 10 Hz) = 180000/50 pts. = 3600 second chart length, = 1 hr.   Yet I'm at 2.5 hrs.

Apologies for the bad data on the first post.

Cheers,

Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 5 of 19
(3,761 Views)
The history is per channel. You should be able to view 5 hours.
Message 6 of 19
(3,746 Views)
Ok, coming up on the 5hr mark in about another 40 minutes.

Riddle me this.  What happens after the 5 hour mark?  Does the over 5 hr old data get dropped out?  I'm hoping I don't get a VI-ending error message and that the chart will keep the most recent 5 hours worth of data and keep plugging along.

Cheers,
Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
Message 7 of 19
(3,734 Views)
Once you reach the limit of the history buffer, the old data is dropped. There will be no messages or problems of any kind. You can test all of this without waiting five hours. Just create a while loop with a random number generator in it wired to a chart. If you have something like a 0 or 1 msec wait, you can generate a lot of samples in a fairly short time.
0 Kudos
Message 8 of 19
(3,729 Views)

"What happens after the 5 hour mark? "

Depends.

Provided EVERY WF had the same number of sample in the Y array, the data point contained in the oldeset WF will be dropped and the newest added.

Ben

And I loose by a matter of seconds!

Message Edited by Ben on 06-09-2006 01:58 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 19
(3,729 Views)
Well, the 5 hour calculation doesn't fly.  I'm over 5 hours and still charting spiff.

Reviewing what Ben posted earlier about the waveform dependency, here is the new math:

chart history length of 180000 / (5 waveforms / sec) = 36000 sec = 10 hrs.

But, if it is 180000 per waveform then I'm up to 50 hours!

After I finish the long term stability run here, I guess the best bet is to work in the realm of minutes to see how it equates out.

Cheers,
Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 10 of 19
(3,712 Views)