From Thursday, May 23rd (05:00 PM CDT) through Friday, April 24th (1:30 AM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3d picture control redraw expensive?

Solved!
Go to solution

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:

 

redraw.png

 

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

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 1 of 8
(2,980 Views)

Any reason why you're calling a manual redraw at all?

0 Kudos
Message 2 of 8
(2,967 Views)

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.

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 3 of 8
(2,962 Views)

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.

0 Kudos
Message 4 of 8
(2,950 Views)
Solution
Accepted by LarsM

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?

Message 5 of 8
(2,943 Views)

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.

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 6 of 8
(2,933 Views)

Yep, the strict call is better.

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 7 of 8
(2,930 Views)

Well then that's an interesting thing to know.

 

I was previously unaware of that.

0 Kudos
Message 8 of 8
(2,920 Views)