07-14-2011 08:42 AM
dear all,
sorry for not attaching a vi for this one !
i am making a measurement every 50ms with a 4-channel spectroscope and plotting the resulting 4 arrays (length 256) on 4 3d plots. each time a new measurement is carried out the new curve is added to the 3d plot. the maximum measurement count is about 20-30.
the problem i am facing is that if i run the vi and monitor the 3d plots at the same time, the application takes much more time than when i do not monitor the plots while the vi is running. i know that 3d plots can be processor intesive but is there a way to overcome this phenomenon? I am not expert, but can such a problem maybe only be solved using labview realtime?
the application is developed with labview 2009 running on a pc system with 2,4GHz CPU and 3,4 GB RAM.
i appreciate your feedback
07-14-2011 08:49 AM
I dont think by plotting 3d curve will take time. How you are reading the data from the hardware, what is the interface you are using. Please try posting your code here is LV 8.6 or 2009 then we can come to a sloution. Your system configuration is good enough to perform this simple operation.
07-14-2011 08:49 AM
If you really need to watch them update in real time...
No LV RT will not help.
If your PC is powerful enough then a client server architecture wiht the 3D updates happening in the slave may help.
Reduce the size of your data set may help.
Since updates of the 3D object dominates the UI thread you may have to pass the 3d updates off to a second machine that does nothing but the 3d rendering.
I'd be curious to hear about others that have managed to squeeze better performance out of the 3D picture and its derivatives. (Of course if I listened to my own suggestion i would not be plotting 25,000 data points myself.)
Ben
07-14-2011 10:00 AM
allright here goes:
attached you will find 2 jpegs of the main states of my application. in the first, the measurement is carried out with my spectrometer and the data plotted and saved. the second image is just a state controlling that my measurement is in a specific time frame.i have also attached the time consuming vis responisible for the plotting and ascii saving.
the vis "data acui" and "get data" seen in measurement.jpg are the driver vis for the usb-based instrument.
i remove all items of the 3d plots each time i go through a new measurement cycle.
is this enough information to have a picture of what's happening?
07-14-2011 01:30 PM
oh yeah one more thing: i had mentioned that i get a 4xchannel matrix out of the spectrometer. it is actually a 8x channel matrix but with each second array being a 0-array.
07-14-2011 02:52 PM
Ben wrote:Since updates of the 3D object dominates the UI thread you may have to pass the 3d updates off to a second machine that does nothing but the 3d rendering.
hello ben, i was thinking about what you wrote. i guess to implemenet the master slave structure i would have to use a queue for the data i want to plot. on the other hand my measurement fires about every 50ms, wouldn't this lead to a super quick filling of the queue causing again a degradation in the speed of application?