LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Plot Chart with TIME in the X-axis

Solved!
Go to solution

I thought I had it figured out as I had my chart buffer set to 360 instead of 3600 but that was not it at all.

 

xaxis3.png

How do I get the X axis to line up with the data? The start time is correct (9:59) but as you can see it was 10:13 when I took this screen shot.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 11 of 20
(2,266 Views)

Hi RTSLVU (is that Real Time System LabVIEW User?),

 

Here is an example where I set the offset to the current time. I am gathering data every 100ms, so I set the multiplier to 100ms (in seconds). I want to show 10 seconds worth of data, so I make the chart history be 1000 points.

 

Time Chart.png

0 Kudos
Message 12 of 20
(2,261 Views)

You want 3600 datapoints in 1 hour, so just leave your multiplier at 1 (second). Only modify the XScale.Offset (nothing else).

0 Kudos
Message 13 of 20
(2,253 Views)

@Gregory wrote:

Hi RTSLVU (is that Real Time System LabVIEW User?),

 

Here is an example where I set the offset to the current time. I am gathering data every 100ms, so I set the multiplier to 100ms (in seconds). I want to show 10 seconds worth of data, so I make the chart history be 1000 points.

 

Time Chart.png


So you are saying I need to update the Xscale offest with the current time everytime I updae the graph, not just once at the start of my program?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 14 of 20
(2,241 Views)

No, just once at the start of data acquisition should be good. I have not set autoscaling on, nor have I touched the X Scale min or max. I just set the offset and multiplier once, choose an appropriate history length, and let the chart do the rest.

0 Kudos
Message 15 of 20
(2,235 Views)

Okay I am taking meaurments every 10 seconds and want to disply the last hour on the graph so that would be a history length of 360 and a multiplier of 10?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 16 of 20
(2,223 Views)

Yes, that sounds right!

0 Kudos
Message 17 of 20
(2,215 Views)

Nope, that's not really what I want either. 

 

xaxis22.png

 

I need a chart that will start out with the current time on the left end of the X-axis and current time plus one hour on the right.

 

Then once the data reaches the right end the chart should scroll to the left  always showing the last hour of data on the chart.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 18 of 20
(2,208 Views)
Solution
Accepted by topic author RTSLVU

Sorry about that, I guess I just got lucky that the max was already set very close to what I wanted. In your case, I think you should set the max to the current time plus 3600 seconds so that it is 1 hour out. I just ran an accelerated hour (changed the wait to 100ms instead of 10000ms) and it seemed to scroll just like you wanted.

 

Time Chart.png

Message 19 of 20
(2,200 Views)

So far so good! We will see in about an hour if it scrolls like I want.

 

xaxis33.png

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 20 of 20
(2,184 Views)