From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Chart history not recording more than 5 seconds

Solved!
Go to solution

I'm trying to export a Waveform chart I have to an Excel table using the built in property node. The graph records at rates requested by the user anywhere between 10Hz and 10kHz. I've increased the size of my chart's history a great deal to make sure that that is not an issue, but no matter how massive I make it (up to 1,000,000 waveforms at the moment) both the 10Hz and 10kHz settings both only give the last 5 seconds of my ~10 second recording time. It doesn't seem like a space issue, is there some setting I've missed that I need to change? I can't post any pictures or VIs unfortunately, so if I've left anything unclear I'll try my best to describe it.

0 Kudos
Message 1 of 10
(2,762 Views)

Hi Baphelon,

 

why do you use the chart history at all when you want to save DAQ data to a file?

Why not just write the data to a (CSV) file?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(2,718 Views)
Solution
Accepted by topic author Baphelon

Are you setting the X Axis to autoscale? If not, then if you're using the node I think you're describing (equivalent to right clicking the chart and choosing Export > To Excel) then only the visible data is exported, not all stored/held data.


GCentral
Message 3 of 10
(2,691 Views)

If I recall correctly (I might be wrong) there was a limit to how much you can increase the waveform chart history with the property node, and there was no way to get around it. So you might have reached that limit (I thought the default was something like 1028, and you could only increase it to double that amount?)

0 Kudos
Message 4 of 10
(2,677 Views)

Hi pi³,

 

there is no such limit.

You can enforce a very large chart history - so large LabVIEW will fail with "out of memory" (or similar errors) when you try to load a VI with such a chart…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(2,666 Views)

@Baphelon wrote:

...(up to 1,000,000 waveforms at the moment) ...


The chart history defines the number of all history points per plot and to estimate the total memory use, you need to multiply with the number of plots and the bytes for the datatype. This has nothing to do with the number of "waveforms", whatever you mean by that. Can you show us a simplified example program so we can see what you are actually feeding to the chart (there are many datatypes allowed, scalar, array, numeric cluster, waveform, dynamic, etc. and we cannot tell from your description).

 

A chart history is a buffer for cosmetic purpose and I don't think you should abuse it for general data storage or accumulation. Front panel elements are for the user, not for the code!

 

Please modify your program to use simulated data and attach it so we can see what is happening.

0 Kudos
Message 6 of 10
(2,661 Views)

@pipipi0405 wrote:

If I recall correctly (I might be wrong) there was a limit to how much you can increase the waveform chart history with the property node, and there was no way to get around it. So you might have reached that limit (I thought the default was something like 1028, and you could only increase it to double that amount?)


First of all, there is no property node to change the chart history length at run time, so yes, you are probably wrong. 😄

 

And no, there is no hard upper limit for the history length. Most likely you run into memory and performance problems way before that. It pays to be reasonable here.

0 Kudos
Message 7 of 10
(2,657 Views)

My apologies for providing the wrong info.

But I agree with altenbach that chart history is not meant to be used this way.

0 Kudos
Message 8 of 10
(2,656 Views)

Here's an example that demonstrates what a) I think you're doing and b) the 'problem' I described earlier. (Saved for 2016).

chart.png

Here I'm just using the Error Constant to sequence (because I didn't want to drag a sequence structure...)

Changing the difference between the first and last values of the X array (before running) will produce a different number of samples in the Excel sheet that opens.


GCentral
0 Kudos
Message 9 of 10
(2,643 Views)

Well, I feel like a fool now haha. Thanks everyone for the replies!

0 Kudos
Message 10 of 10
(2,626 Views)