05-13-2013 07:07 AM
Hi all!
I have a VI with a 3D picture control. This control is updated and set to redraw 10 times per second. The redraw method is called by:
The reference to the control is stored as a generic control reference, then casted to 3D picture control and lastly Redraw is called.
It seems that manual redraw calls are a bit expensive. With the redraw call, CPU usage hovers around 6 %. However, if I disable redraw and instead update the display by rotating the scene, then CPU usage drops to one percent.
Before I delve further, does anybody have any experience with this?
Regards
Solved! Go to Solution.
05-13-2013 07:45 AM
Any reason why you're calling a manual redraw at all?
05-13-2013 08:00 AM
At the moment, the scene contains a football field, with a ball bouncing around. The ball position is updated 10 times per second. If I don't call redraw, nothing happens.
05-13-2013 08:47 AM
Try changing it from a control to an indicator.
I've done 3D animations like this before and to be hionest, I haven'0t had your problem at all.
05-13-2013 09:42 AM
Ah, I just double checked my code and saw that I also had a redraw node in there, but I wasn't using a control refnum. My invoke node was tied ditrectly to the 3D graph and I have no refresh rate problems.
Also check that your graphics drivers are up to date.
Which version of LV are you using?
05-13-2013 10:44 AM
I'm using LV 2012. But now that you mention it, the invoke node is strict, so it should be faster. I will make a test.
05-13-2013 11:13 AM
Yep, the strict call is better.
05-13-2013 11:41 AM
Well then that's an interesting thing to know.
I was previously unaware of that.