From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM 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.

London LabVIEW User Group

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Tip: Speeding up UI Updates in LabVIEW

Does your UI ever get laggy in LabVIEW, or maybe all of the lines in your table take a long time to update?

A common programming style is to update UI indicators by grabbing their reference when required. If you are periodically rattling through a long list of references and updating their value property node each one in turn, you may find this process a bit slow.

The problem with this approach is that each property node cell has a significant overhead (because amongst other things, the processor has to swap to the UI thread in order to update the value, and then swap it back to the current thread). If you do this many times and too often for all of your indicators, you will find that this is a big drain on your time. Tasks are pushed into a queue you’ll find that updates get backed up making your UI appear slow.

Instead, try ‘defender panel updates‘; a sneaky property node of the front panel reference itself. This has the ability to effectively buffer updates to the UI until you turn the ‘defender panel updates‘ off. Go on, try it!

NOTE: When updating just a few variables, wiring directly to the indicator itself will usually offer the best performance.

Speeding up UI Updates in LabVIEW diagram

Got a LabVIEW Tip of your own that you would like to share? Leave a message in the comments below or head over to our Facebook Page and leave us a message! If you would like to receive a new LabVIEW Tip each month directly to your inbox, follow this link to subscribe to our monthly newsletter!

The post LabVIEW Tip: Speeding up UI Updates in LabVIEW appeared first on Austin Consultants.

0 Kudos
Message 1 of 1
(4,458 Views)