02-19-2020 07:28 AM
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
02-19-2020 08:08 AM
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?
02-19-2020 08:29 AM
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 ?
02-19-2020 09:26 AM
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)