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: 

Plot multiple days of realtime data on a wavechart

I have real time data from a weather station that I need to plot. I have made wavewcharts of the the data and it plots on 2 min interval (the sampling interval of the incoming port) then I would like to have plots with 7 days of data on them. past 7 days basically.  I have manged to set the realtime date and time on the x-scale but I can not get it to display more than 2 hours at a time. If I set the x scale max and min, it seems not to update the graph correctly.
 
All tips and help would be greatly appreciated 🙂
 
Thanks!! 
0 Kudos
Message 1 of 7
(2,594 Views)
Right click on the chart and select chart history length. Default is 1024
0 Kudos
Message 2 of 7
(2,586 Views)

I have tried to set that to 604800 (number of seconds in a week) but it still seems to only do 2 hours, but I have not let it run for that long to really see what it does so I will try to set it like that and see what happens.

 

Thanks

0 Kudos
Message 3 of 7
(2,583 Views)
Right click the chart, go to X scale, then Autoscale X.
0 Kudos
Message 4 of 7
(2,577 Views)
Unless you're useing the waveform data type, the reason why you're probably running into some issues is because waveform charts are not time based, they are sample based.

As in, unless you're explicitly including timing information (either through an x-scale multiplier, and an equal time delay in your data gathering loop, or via the waveform data type), it will simply plot the number of datapoints it receives as the x-axis.

If you were already accounting for this, I apologize
0 Kudos
Message 5 of 7
(2,573 Views)

There are a few things you need to set.

You said you're plotting once every 2 minutes. I assume this means that you're wiring a value into the chart only once every 2 minutes. This is important because charts calculate the time based on the starting time (offset) and the difference between each 2 points (multiplier).

So:

  1. Make sure you're only wiring a value into the chart once every 2 minutes (has to be constant).
  2. Set the offset property to the current time when you start (use Get Date\Time in Seconds and then To DBL to convert to a numeric).
  3. Set the multiplier property to 120.
  4. Set the history length to 5040 (30*24*7).

___________________
Try to take over the world!
0 Kudos
Message 6 of 7
(2,561 Views)
Thanks so much for the hints , it works now 🙂



0 Kudos
Message 7 of 7
(2,556 Views)