08-25-2010 12:38 PM
I have a VI that I dressed up a bit. When I run it, the loop is about 10 times slower than without the images. Any idea on what is going on?
08-25-2010 12:46 PM
Your background image means that UI nodes in front of it need to be completely redrawn when their data is updated. Plus having the graph partially transparent is going to slow that down a lot too. You could limit the image/UI control overlapping, and also maybe look at the "Defer Front Panel Updates" method, so your UI only updates when you need it to (eg: only once a second, rather than every time a data point is acquired).
08-26-2010 06:42 AM
So basically it is a bad idea to use images if you want a fast running VI that is constantly updating? I guess I'll run my VI without the images. Thanks for the reply.
08-26-2010 07:12 AM
you can use the Front Panel Properties to insert your image in the background:
This should solve your problem.
If you place a Front Panel object on a drag&drop placed image, the image has to be reloaded every time the FP-object is updated. And thats why your VI is running slow with the images.
08-26-2010 08:01 AM
Simon posted a really good set of videos about creating UIs and even posted something about background images here:
There's also a "Campus Weather Monitor.vi" on the same post, look in the following file:
08-26-2010 08:30 AM
cheggers wrote:
you can use the Front Panel Properties to insert your image in the background:
This should solve your problem.
If you place a Front Panel object on a drag&drop placed image, the image has to be reloaded every time the FP-object is updated. And thats why your VI is running slow with the images.
The background was done that way. I also have opaque images used behind the plot indicator and the RPM indicator. I can only insert one image using the properties. Even the image added through the properties menu slows down the VI. The others I have to import to clipboard and place them on the front panel by dropping. This is the way Simon constructed his campus weather demo. I am guessing that it didn't matter since the refresh rate wasn't too fast.
08-26-2010 08:31 AM
I use the method quite often as well, I create an image in gimp or paint.net that will over the entire background including logos, headers, etc. I then place all my controls over that and it works beautifully with no noticeable slowdown.
08-26-2010 08:40 AM
…or right-click on the panel’s horizontal scroll bar for more static options.