ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform chart real time plotting

Hello everyone, 

 

I am a new LabVIEW user and learning the software by following some books and other online stuffs. My doubt is regarding waveform chart, i made a simple program using random number and plotting it on waveform chart. As plot is being generated over a period of time the values on X-axis keep changing. Is there a way such that i can make a program such that my X-axis is always starting at t = 0 and even if run the program for 2 hours the chart should be showing the values from 0 seconds to 7200 seconds. 

I know that a waveform graph can show this. But i want plotting in real time 

 

Thank you

0 Kudos
Message 1 of 4
(3,549 Views)

Hi asai,

 

I know that a waveform graph can show this.

Then why don't you use a graph?

 

But i want plotting in real time 

How is this related to use a chart or a graph? And how do you define "realtime"? (I'm sure you mean something completely different than most of us…)

 

Is there a way such that i can make a program such that my X-axis is always starting at t = 0 and even if run the program for 2 hours the chart should be showing the values from 0 seconds to 7200 seconds. 

To answer your question:

- set the x axis to autoscale

- set the chart history to a value allowing the chart to buffer enough samples…

 

Why this is bad:

- how do you want to display values from 7200s to a chart of ~500 pixels width?

- allowing large history buffers will make your VI slower

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(3,538 Views)

Hello sir,

Thank you for the reply. 

Okay let me give more clarity about my problem. Suppose i am measuring temperature and plotting it on a waveform chart, after 3-4 hours of running VI continuously if i want to see what is the temperature at 15th minute on a waveform chart how can i manage to do that? 

Since i am going to work on real time monitoring of bio-process reactions which take place for 36-48 hours. And i want to know what happened to particular parameter at 3rd hour for example how can i visualize that on waveform chart? 

As you have mentioned if i increase buffer VI is becoming slow. 

0 Kudos
Message 3 of 4
(3,530 Views)

Hi asai,

 

Since i am going to work on real time monitoring of bio-process reactions which take place for 36-48 hours.

48h at sample rate of 1S/s gives you 172800 samples/channel: set your chart history at least this size…

But: the data of one channel will need 1.4MB of memory. How many channels do you use?

 

As you have mentioned if i increase buffer VI is becoming slow. 

Separate data display from your DAQ loop using a producer-consumer scheme.

Store your data also in a file (this should be done even before displaying the data in a chart).

 

how can i manage to do that? 

As said before: set x axis to autoscaling and increase chart history size…

 

General comments:

- Usually you don't display that large amount of data on tiny charts or graphs.

- Usually data is decimated before display (to minimze memory footprint and use a reasonable amount of pixels as mentioned above).

- You could keep your data in memory (1.4MB per channel, with 100 channels still less than 150MB) and only display the relevant data in a graph: let the user choose time range and filter your data as needed…

- keep a log file with relevant notes (like "channel AB has changed significantly at HH:MM")…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(3,517 Views)