Jump to content

what is the efficient way to plot data on wavefor m graph


Joshna

Recommended Posts

Hi

I am using LabVIEW 8.6 and using cRIO 9215 and 2 NI 9215 modules to read 8 analog channels. I am streaming the data from RT to windows.

In windows, I read the data from the TCP and have to plot the data into 8 separate waveform graphs. One second data on ecah graph contains 50,000 points. ( that is , we are measuring 50 Hz voltage signal per second) . I am using 8 build array function to append every seond data. The data on the 8 graphs is fine upto 5 seonds. After that , i get less data than expected. If it is 7 secs, i get 6.5 secs data on the plots. For 20 secs, i get 14 secs data. So please can i know how to efficeintly plot the data on the waveform graphs.

I have attached the trial VI.

thanks

E2Untitled 55.vi

Link to comment

Hi

I am using LabVIEW 8.6 and using cRIO 9215 and 2 NI 9215 modules to read 8 analog channels. I am streaming the data from RT to windows.

In windows, I read the data from the TCP and have to plot the data into 8 separate waveform graphs. One second data on ecah graph contains 50,000 points. ( that is , we are measuring 50 Hz voltage signal per second) . I am using 8 build array function to append every seond data. The data on the 8 graphs is fine upto 5 seonds. After that , i get less data than expected. If it is 7 secs, i get 6.5 secs data on the plots. For 20 secs, i get 14 secs data. So please can i know how to efficeintly plot the data on the waveform graphs.

I have attached the trial VI.

thanks

Hi Joshua

From a quick look at your vi I would guess that the memory management required to build those 8 large arrays starts to interfere with performance causing it to lag behind the RIO application. I would also suggest that redraw of those 8 plots will take longer the more data you are throwing at it.

Try breaking it up using a queue driven state machine. One process just manages reading the TCP packets and poping them into a queue. Another process waits on that queue and builds your display buffer.

Also consider pre-allocating your display arrays this will reduce the memory management overhead.

You probably dont need to update your plots when each packet arrives, perhaps once every 250 msec or sec is sufficient.

Hope this helps

Link to comment

Try using a "Waveform chart" and fix the history length to 50,000. This will automagically append the latest datapoint and drop the first (fixed array size) and you don't have to use the array build functions. You might get away with this if you say its fine up to 5 seconds.

Edited by ShaunR
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.