LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why are these two charts different?

As always making a simple chart in LabVIEW is a huge pain in the you know what.

 

I have two charts with the same properties for the X-Axis. Why is the X-Axis different in the top chart?

 

charts.tif

Charts1.PNG

Charts2.PNG

Charts3.PNG

Charts5.PNG

Charts4.PNG

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 11
(3,267 Views)

I'm going to channel my inner Bob Schor for a second....

 

You really need to post your VI or an example VI that shows this behavior to get anything besides guesses on whats going on

0 Kudos
Message 2 of 11
(3,248 Views)

I second the motion.  I was going to guess that the second set of data was taken 6 and a half hours after the first, but from the tiny fragment you have shown us, that doesn't seem likely.

 

Bob Anonymous

0 Kudos
Message 3 of 11
(3,232 Views)

@RTSLVU wrote:

I have two charts with the same properties for the X-Axis. Why is the X-Axis different in the top chart?


Yes, we need to see the VI. How's the chart history size? What's the update mode?

I also think that the chart is different in both charts, not just the top one. 😄

 

I don't understand your 0..2 scale max/min x-range. In absolute time, that would be very long ago over a very short interval. 😉

0 Kudos
Message 4 of 11
(3,226 Views)

Okay so I copied that little bit of code and made a VI to upload.

 

Now both charts on the new Vi are four and a half hours off on their X-axis time stamp.

 

They are both wrong but at least they are the same now. 

 

Why is this so difficult?

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 11
(3,218 Views)

Turn on the date display.  I'll wager it shows that the dates are in 1903 or 1904.

 

Basically, the date readout on a chart is just an index converted to a time using the standard LabVIEW time stamp format, i.e. 12 midnight on January 1st 1904 GMT, then adjusted for your time zone.  

 

If you add a lot more values to one chart than to the other, maybe it increments more, hence the offset?

 

Pretty sure you'll need to switch to XY charts with time stamps wired into the X values.

0 Kudos
Message 6 of 11
(3,212 Views)

If you also show the date, you'll see that you are around newyear 1904 and the start time depends on your time zone. (it would be midnight at UTC).

If you want the correct absolute time, you need to set t0 at the start of the program.

 

Try something like this....

 

 

0 Kudos
Message 7 of 11
(3,205 Views)

Altenbach,

 

Even if he does that, it increments the chart 1 second for every point written to it.  Unless the data comes in at precisely 1-second intervals, the time readout will still be off.

 

Basically, using a chart that only takes Y values as an input is insufficient.  He needs to move to either an XY graph or a waveform graph.

0 Kudos
Message 8 of 11
(3,189 Views)

@altenbach wrote:

If you also show the date, you'll see that you are around newyear 1904 and the start time depends on your time zone. (it would be midnight at UTC).

If you want the correct time, you need to set t0 at the start of the program.


Hmmm you are right, but why did it work right to begin with?

 

The same program but with only the V-I chart and has been in use for a couple months.

 

I actually copied the V-I chart and made the Temperature chart out of it so they would be the same, that's when the trouble started.

 

Set t0? How do I do that?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 9 of 11
(3,187 Views)

I figured it out. Turns out I was setting some properties for the V-I chart in my init state that I forgot to add when I added the Temperature chart.

 

Doh.PNG

 

Doh, sorry.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 10 of 11
(3,178 Views)