LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to keep data histories with 1 hour

Hello,

I would like to know if it's possible to keep data in Graph for about 1 hour (preferably 3 days if it's possible). I just need to see the old data before. I begin with this VI but it's not work correctely. When I valid the button Totaly P in the case structure I have the correct scale but after i'll fit in the actual time (but I have the correct gap 1 hour). Do you have an idea about ? Thanks for your helps.

 

PS  : The picture for the VI      

0 Kudos
Message 1 of 4
(1,858 Views)

Hi GSXR,

 

As you're already showing, you'll need to use a Shift Register to store previous data since a graph doesn't record history (charts do, but depending on your data rate you might not want it to hold 3 days of data - and whilst you could program custom handling for decimation with a graph, you have no such option with a chart).

 

For one hour, depending on the data rate, you might just keep everything in memory using a shift register.

 

For 3 days, there's a good chance that any moderate rate will overload your memory - in which case, you can consider storing to disk and plotting decimated values.

 

As a side note, this appears to be a Consumer in the Producer/Consumer style - but you're using a Wait and a Notifier. Is there a reason you're not using a Queue?


GCentral
0 Kudos
Message 2 of 4
(1,842 Views)

Hi cbutcher,

Thanks for your answer.  You say :  

'For one hour, depending on the data rate, you might just keep everything in memory using a shift register.' Yes I do that. But I've just increase the buffer size of the Chart (4096). I need to test it before but it seems to work. I don't know the size max for the Chart that I can fix ?      

0 Kudos
Message 3 of 4
(1,827 Views)

Hi cbutcher,

After about 1 hour, when I valid a button Totaly P, I can see the beginning Time is advanced about 30 minutes. 

 

PS : see in this 2 pictures (the beginning and when I valid the button)

 

Download All
0 Kudos
Message 4 of 4
(1,817 Views)