LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fixing Waveform Chart Axis

Hi guys,

 

I'm having trouble with a waveform chart axis. In my program the data comes in at about 100ms, but there is some delay sometimes. So over the course of a day, the time axis might be off by a couple minutes. It isn't a huge deal, but I'd like to fix it.

 

In my example, the data is expected at 10ms (XScale.Multiplier) but actually comes in at 12ms. The chart holds 1000 points, to show 10 seconds worth of data. In the "Fix" event, I reset the XScale.Offset to be 10 seconds before the current time, and make XScale.Maximum equal the current time. This assumes the chart history is full.

 

I thought this would do the trick, but the scale does not come out as I want, with the right side of the scale being current with the time.

 

Can anyone spot where I've gone wrong?

0 Kudos
Message 1 of 4
(2,945 Views)

could some thing like this I done in your vi

fix your problem?

 

0 Kudos
Message 2 of 4
(2,934 Views)
also I think we can read max an min from graph by property node and then add this delay and write into graph by property node too
0 Kudos
Message 3 of 4
(2,932 Views)

 

@Hatef.fouladi wrote:

could some thing like this I done in your vi

fix your problem?

 


Nope, the Elapsed Timer express VI doesn't help here, but I found my error. I thought the XScale.Offset property would be the time of the first datapoint in the chart history, but I saw that even as the chart history got overwritten by new values, the Offset doesn't change! 

 

So my solution: Find how much the current time differs from the right side of the graph and add that to the Offset!

0 Kudos
Message 4 of 4
(2,931 Views)