Joshna Posted September 3, 2009 Report Share Posted September 3, 2009 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 Quote Link to comment
Kurt Friday Posted September 3, 2009 Report Share Posted September 3, 2009 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 Quote Link to comment
ShaunR Posted September 3, 2009 Report Share Posted September 3, 2009 (edited) 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 September 3, 2009 by ShaunR Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.