LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating the front panel?

Hi,
I have a rather general question regarding the design on my VI. I need to update the front panel with many display attributes: circles, rectangle, rotating them coloring them and the updates are real-time. So what I want to know is what to use, I've been using picture conrols to this point in time but with many constant updates it gets kind of slow. Would it be better to just try to use the background of the screen itself without the picture control or would that be impossible. While I'm writing this i'm realizing that I think it is impossible because all the drawing functions require a picture input/output. Well if anyone has any ideas on this problem (approach) I'd be delighted to hear (i.e. something other than a big picture control),

Thanks.
0 Kudos
Message 1 of 4
(2,544 Views)
> I have a rather general question regarding the design on my VI. I need
> to update the front panel with many display attributes: circles,
> rectangle, rotating them coloring them and the updates are real-time.
> So what I want to know is what to use, I've been using picture conrols
> to this point in time but with many constant updates it gets kind of
> slow. Would it be better to just try to use the background of the
> screen itself without the picture control or would that be impossible.
> While I'm writing this i'm realizing that I think it is impossible
> because all the drawing functions require a picture input/output. Well
> if anyone has any ideas on this problem (approach) I'd be delighted to
> hear (i.e. something other than a big picture control
),


One thing to make sure of is that you aren't constantly adding to the
picture control data. If you never start with an empty picture, then it
just keeps getting larger and larger. Another technique if the graphics
don't change that much from update to update is to turn off the Erase
First option and do incremental erasing by drawing over the previous
symbols with the background color.

Another things that affect the performance is the Smooth Updates option.
On, it will draw everything to an offscreen bitmap first which will
make the graphics smoother, but it may slow down the screen updates.
Off, it may flicker more, but will draw more quickly.

Greg McKaskle
Message 2 of 4
(2,544 Views)
Can't thank you enough, this is probably one of the best replies to my post I have ever had. You cover all the points I really have stumbled upon but did not know much about especialy the turning off of Erase First. Now if I did that then can you expand more on a technique I could use to do incremental erasing? Let's say I have a circle that moves at a 45 degree angle starting at x,y = 0,0 all the way to the corner of my picture 100,100 (so it would move 99 times) so instead of having erase first turned on, if I were to use your suggestion can you give me some idea as to what I should do to my subVI besides having it just draw a circle?
Thanks in advance
0 Kudos
Message 3 of 4
(2,544 Views)
....

> First. Now if I did that then can you expand more on a technique I
> could use to do incremental erasing? Let's say I have a circle that
> moves at a 45 degree angle starting at x,y = 0,0 all the way to the
> corner of my picture 100,100 (so it would move 99 times) so instead of
> having erase first turned on, if I were to use your suggestion can
> you give me some idea as to what I should do to my subVI besides
> having it just draw a circle?


Let's assume the circle is colored red and the background is black. To
erase the red circle, you just need to draw a black circle on top of it.
Remember that you are drawing from back to front, so you need to draw
the black circle first in the old position, and append the red circle in

the new position. Then wire the data to the picture control. The next
loop iteration does the same.

One way to remember the old position is to pass the parameters through a
shift register, but you can always compute this from i or another parameter.

A slight change is to simplify the circle that erases to use a
rectangle. It is a simpler shape and should draw slightly faster. The
more complex the shape being erased, the better this becomes.

Greg McKaskle
0 Kudos
Message 4 of 4
(2,544 Views)