LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform graph is not continuous

Hello,

 

I'm facing a problem with waveform graph where data is showing till certain time. In my project work I'm doing a measurement with multiple function generator and oscilloscope. Measurement data is plotting in waveform graph for certain time e.g till 10ms. If I want to see same results in 100ms no data is showing.  

 

REDUANUL_0-1617786309536.png

 

I'm not getting where I'm making mistake ! I want to see same plot in different time range. I've uploaded a demo code.

 

NOTE: In the demo code I've used simulator but I've tried with basic function generator vi and array as well but same problem I'm dealing with. In waveform graph time scale also set as auto scale but same problem lies in the end.  

 

Any help and suggestion will be appreciable.

 

Thanks 🙂

0 Kudos
Message 1 of 6
(1,311 Views)

Simple answer - use a Chart (not a Graph).

 

Longer answer: A graph shows the points that you plot to it, regardless of how many points those are (sort of - see below), whereas a Chart maintains internal history according to a "Chart History Length..." property.

 

You can configure the length via the right click menu of the chart.

 

Detail re graph - a graph has a finite resolution (number of pixels), so if you write millions of points to it, you'll get some clever under-the-hood manipulations to produce a reasonable display. However, a more sensible solution if you're looking to display high-speed data on a graph for a longer time is to decimate the data before you plot it (saving memory at the same time). You can write the full, high-speed data to disk and just display a subset.


GCentral
0 Kudos
Message 2 of 6
(1,284 Views)

Thanks cbutcher,

 

But unfortunately, I can not go with waveform chart instead I'm using XY graph in my main program (but same problem remains).

 

So any feasible way with waveform graph ?

0 Kudos
Message 3 of 6
(1,270 Views)

If you want to use a graph, you need to collate the history yourself.

 

The quickest solution is to use Build Array with Concatenate Elements set true (right click on BA).

 

This works but will eventually cause you to run out of memory because the size of your array is in principle unlimited.

 

If that becomes a concern (for example, if your program runs for a long time or with very high sample rates) you can use a circular buffer and the Replace Array Subset node to maintain a constant size buffer and discard older elements.


GCentral
0 Kudos
Message 4 of 6
(1,265 Views)

You seem to use all express VIs, where some parameters (duration, number of samples, etc.) cannot be wired inputs and thus are not configurable at runtime.

 

Nothing is stopping you from using lower level functions where you have full control over all aspects of the generated signal.

0 Kudos
Message 5 of 6
(1,231 Views)

Thanks @ altenbach for your advice,

 

If I got you correctly then as I'm using all functionalities of express VI which is making runtime problem.

 

So if this is the case then without using all controls (e.g amplitude, frequency) what can be the possible alternative (as without using all functionalities of express VI I can not get the waveform graph)?

 

 

 

0 Kudos
Message 6 of 6
(1,217 Views)