LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a fixed time scale in a waveform chart in sweep mode?

Hi,
in a sweep chart, I need a fixed time scale (x axis) from 0 to 5 seconds.
But usually the x-axis is incremented (i.e. 0-5, 5-10, 10-15, ...)
I have to use a waveform chart in sweep mode or something that updates the waveform like in sweep mode.

I have now spend some hours with modifying the x-axis property nodes without finding a solution.

Does somebody have an idea?

Thanks in advance!
0 Kudos
Message 1 of 9
(6,354 Views)
> in a sweep chart, I need a fixed time scale (x axis) from 0 to 5
> seconds.
> But usually the x-axis is incremented (i.e. 0-5, 5-10, 10-15, ...)

I'm not sure I understand what you are looking to do, but if you do not
like the X scale to indicate the point index or the timestamp of the
data, hide the entire scale and label the chart using strings, labels,
or whatever you like. If you want the labeling to look like a scale,
you might look to use a slide with some parts made transparent.

Greg McKaskle
0 Kudos
Message 2 of 9
(6,354 Views)
I agree with Greg. Also, a chart is there to increment in time. It is there to be like a paper chart. You could use a graph instead (probably an XY Graph) to keep you axis at a stable value and just update your values. This will require a little bit of background programming work on your end however.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 3 of 9
(6,354 Views)
Is this sort of the effect you are trying for?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 9
(6,354 Views)
hi Greg, hi Randy,

thanks for your comments! I've changed my interface from chart to XY graph with stable x axis and point-by-point update for y axis - just a you told. It's right, it took me some time for coding, but know it works.
0 Kudos
Message 5 of 9
(6,354 Views)
hi Mike,

thank you for the example! Exactly this was one of my first tries - unfortunatly the program specification requires a sweep chart (when the chart reaches the end of the time scale, it starts again a zero and overwrites the old chart). I've replaced now my chart with a xy graph, created an array of fixed size for time values (in dependence of sample rate) and an corresponding array for data, and do now update every single value in the data array in a loop. It was a little bit work, but now it works fine.

Andi
0 Kudos
Message 6 of 9
(6,354 Views)
I sort of wondered if that was what you needed, a simplier approach might be to overlay two strip charts. The top one contains the new data, the bottom one contains the data from the last sweep.

If I have time I'll play with it a bit and post what I get...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 9
(6,354 Views)
> I sort of wondered if that was what you needed, a simplier approach
> might be to overlay two strip charts. The top one contains the new
> data, the bottom one contains the data from the last sweep.
>

There is an example in the graphs.llb called Scanning Chart that has a
transparent chart overlaying a graph containing all of the complete
sweeps. You might look at it for ideas.

Greg McKaskle
0 Kudos
Message 8 of 9
(6,354 Views)
... yes, good source, thank you for the hint.

Andreas
0 Kudos
Message 9 of 9
(6,354 Views)