LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

set up history length programmatically

Hi,

I have a waveform chart and I would like if it is possible to change the history length programmatically. Is it possible?

Thanks,

ToNi.
0 Kudos
Message 1 of 4
(3,066 Views)
I don't think you can do that.
What kind of problem are you trying to solve ? There is probably another solution...
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 4
(3,057 Views)
Hi,

I have a waveform chart with a history length of 28800 points visible and I take a sample with a frequency of 1 second and I plot it. (I acquire data with and acquisition card). Then, I would like the user can choose the number of hours (1 to 24 hours) to visualize in the waveform chart from a configuration window and also he can modify the frequency to take the sample (1 to 60 seconds). Then each time he modify these parameters, the number of houres (1 to 24) and the frequency to take samples (1 to 60 seconds), I set up the history length from them doing the following operation:

(60 seconds/frequency to take sample) * 60 minutes * number of hours = history length. (number of points taken during the hours you set up)

where:

(60 seconds/frequency to take sample)  : is the number of samples took during a minute
(60 seconds/frequency to take sample) * 60 : is the number of samples took during an hour
(60 seconds/frequency to take sample) * 60 minutes * number of hours: is the number of samples taken during the number of hours you set up

So I only have the number of points in the history length necessary and not more.

Thanks,

ToNi.
0 Kudos
Message 3 of 4
(3,042 Views)
You will not be able to change the history buffer length. One thing you could do is to create a buffer using a LV2 style global or a queue, managing yourself the warparound when the buffer is full, and then to use a waveform graph to display your data. However, LV will spend a lot of time redrawing the graph for each new entry.
May be you should stick to the simplest solution : use a chart with a preset history length, and propose a limited number of choices to the user : for instance 3 hours at 1  Hz, 6 hours at 0.5 Hz, and so on.
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 4
(3,034 Views)