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: 

Waveform Charts

Hello,
I use the AI Read VI (waveform) to read data from a buffered data
acquisition, do some process and then display the waveform in Waveform
Chart. The problem is that although I use a property node to initially set
the x-axes scale (offset=0 and multiplier), when the acquisition begins the
x-scale start from 3418:XX:XX. ( the format of the x-scale is
Decimal::Relative Time(seconds). I would like the time axis to begin at time
0 at the beginning of the acquisition.
I do not understand the reason this offset occures.
Can anyone help me?

Thanks in advance,
M.
0 Kudos
Message 1 of 5
(2,911 Views)
....The problem is that although I use a property node to initially set
> the x-axes scale (offset=0 and multiplier), when the acquisition begins the
> x-scale start from 3418:XX:XX. ( the format of the x-scale is
> Decimal::Relative Time(seconds). I would like the time axis to begin at time
> 0 at the beginning of the acquisition.
> I do not understand the reason this offset occures.
> Can anyone help me?
>


The problem here is that the time being sent to the chart is an absolute time,
and the display is a delta, a relative time. You have two pretty easy solutions.
One is to extract the time of the first sample and subtract its t0 from each
waveform including the first one. This will send the delta between waveforms
and the first acquisition.

Another solution i
s to set the offset not to zero, but to the negative
of the
first timestamp. This will tell the chart to subtract this value from each
waveform as they are being plotted.

Greg McKaskle
0 Kudos
Message 2 of 5
(2,912 Views)
Thanks for the tip. It worked just fine.
M.

"Greg McKaskle" wrote in message
news:3B3A9016.55B1D69E@austin.rr.com...
> ...The problem is that although I use a property node to initially set
> > the x-axes scale (offset=0 and multiplier), when the acquisition begins
the
> > x-scale start from 3418:XX:XX. ( the format of the x-scale is
> > Decimal::Relative Time(seconds). I would like the time axis to begin at
time
> > 0 at the beginning of the acquisition.
> > I do not understand the reason this offset occures.
> > Can anyone help me?
> >
>
>
> The problem here is that the time being sent to the chart is an absolute
time,
> and the display is a delta, a relative time. You have two pretty easy
solutions.
> One is to extract the time of the f
irst sample and subtract its t0 from
each
> waveform including the first one. This will send the delta between
waveforms
> and the first acquisition.
>
> Another solution is to set the offset not to zero, but to the negative
> of the
> first timestamp. This will tell the chart to subtract this value from
each
> waveform as they are being plotted.
>
> Greg McKaskle
0 Kudos
Message 3 of 5
(2,911 Views)

I want to plot variable data input on waveform chart with respect to real time i.e. pc's time.To get the absolute time on the  x-axis I have connected the get time/date in seconds.vi with the x-scale offset property node of that waveform chart.Now i am seeing that it is displaying the current time on the starting point  as well as on the ending point of x-axis.Instead of this I want to keep an interval of 1 hour between the starting and ending point . As soon as the plot will reach the right most side of the waveform chart indicator, the current time should display on the left most position of x-axis and a time after 1 hour of the current time should display on the right most position of the x-axis. But at the same time one should be able to see the past data by scrolling back the x-axis.

can anybody please help me?

amrita

0 Kudos
Message 4 of 5
(2,691 Views)
Kolkata,
I think that the KB called How to Set the Absolute Time and Date on the X Axis of a Chart in LabVIEW? will help you in solving the problem. To display a full hours worth of data, you'll need to change the chart history length (right click on the graph and select chart history length). You'll also need to adjust the beginning and end time to span an hour. To do this simply left click on the left x-axis number and change its value (make sure autoscale x isn't turned on). I think that should help you out.
 
 
Chris C
 
0 Kudos
Message 5 of 5
(2,664 Views)