10-14-2009 09:05 AM
Dear friends,
I'm working on an application where I must scan a surface and store the distance between the sensor and the object and also the signal read by the sensor. So, in the end of the process, I have two 2D arrays, the first representing the geometry of the surface and the second containing the sensor data. For the first experiences I used ActiveX CWGraph3D to plot the susface scanned. The sensor data was shown by projections of another plot that was visible in the same plot. In this way I can join both informations in the same graphic, as shown in the picture below.
That test image was done by a 20x20 dots array. The blue wave is the surface scanned and the multicolor projections correspond to the sensor data at each surface point.
In the real aplliation I need to scan lage areas, that would generate an enormous amount of data, such as 2000x2000 dots arrays. There is where problems begin. With this houge amout of data the VI just stops responding and gets extremely lazy. Then, I removed the CWGraph3D Surface and that really speeded up the execution. Without the CW surface, the program runs at full speed, no matter if I use 2000x2000 array or the 20x20 one.
So, I would appreciate if someone could help me on this. It is mandatory that I show bow the surface dimension and the sensor data in a 3D view. Does anyone knowhow could I have a better performance on this CW 3D Graph? I'm using LabView 7.1. Is there another way I could do this that would give me better results?
Thanks so much
Leo
Solved! Go to Solution.
10-14-2009 09:17 AM
There is now way to fully illustrate 4M of data in such a small graph. evn whe you pass all of it to the graph it is still fuging things to show so much in such a small area.
So down-sample your data to a smaller data set and plot less.
The other things that speed up the CW 3d graph are;
1) Hide the graph while drawing.
2) Only update the plot that is changing.
3) Avoid transparency
4) Acceleration
Just trying to help,
Ben
10-14-2009 11:07 AM
Thank you, Ben.
Your post gave me an idea. I really need to read all the 4M points, but it is true that I don't need to plot all of them. So, I'll store de incoming data in a certain array that will be used to further analysis. Then I'll sort some points and use them to build a preview of the surface. I'll try to do so and when I get some conclusions I report back.
Thanks again
Leo
10-14-2009 11:37 AM
Thank you, Ben. Your post gave me an idea. I really need to read all the 4M points, but it is true that I don't need to plot all of them. So, I'll store de incoming data in a certain array that will be used to further analysis. Then I'll sort some points and use them to build a preview of the surface. I'll try to do so and when I get some conclusions I report back.
Thanks again
Leo
p.s.: Sorry, I forgotI have two accounts.
10-14-2009 11:41 AM
Before you work too hard on the data redcution, take alook at this KB article by Dr. Gray. In that KB he talks about plotting more data than will fit on a screen and offers ideas and CODE!
Have fun and please report back to help those who will follow in your foot-steps.
Ben
10-20-2009 11:19 AM
Dear Ben,
That post you suggested didn't helped me too much. That data reduction algorithim presented did not lead to a good performance. Otherwise I created my own reducing method,that just rejects the excess of data and stores the selected one in a plotting buffer. Doing that I could keep my whole data set and also plot a well shaped 3D surface.
The hint about only plotting and enabling the graphic when it is necessary resulted in a great machine processing reduction. Now, the application just plots when it is requested to.
So, I consider this problem solved and I thank so much for all.
Just have a nice day
Leo