LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to improve performance of Property Nodes for GUI Elements?

I'm running a timed loop on a cRIO 9047. Everything (GUI and automation) is in the same VI. The code contains many Control Property Nodes "Disabled" to programmatically "disable&grey out" or "enable" GUI-Buttons when something happens.
For example, the GUI contains a button "start measurement". This button is greyed out as soon as the user clicks it and then later enabled after a certain amount of time has passed.

 

However, those property nodes slow down my loop a lot. Without the nodes, the loop takes around 2ms, with the nodes included around 50ms, making my measuring system useless.

What options do I have to reduce this slow-down? Maybe I should put the GUI into a seperate timed loop which is running on another core of my cRIO? But how do I then access those property nodes?

0 Kudos
Message 1 of 7
(1,454 Views)

Hi faul,

 


@UL-00 wrote:

However, those property nodes slow down my loop a lot. Without the nodes, the loop takes around 2ms, with the nodes included around 50ms, making my measuring system useless.

What options do I have to reduce this slow-down? Maybe I should put the GUI into a seperate timed loop which is running on another core of my cRIO? But how do I then access those property nodes?


Questions:

  • Why do you need to access control property nodes in timed loops? (Are you really using TimedWhileLoops?)
  • Why do you need to set those property nodes in each iteration of your loop? What makes you think you need to update a GUI at 500Hz?
  • Why do you think you don't "have access" to those property nodes when you place them in a separate loop?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(1,448 Views)

Thank you for your questions. 

 

  • Why do you need to access control property nodes in timed loops? (Are you really using TimedWhileLoops?)
    • Yes, I am using a timed while loop because I want to guarantee that my loop finishes in a certain amount of ms.
    • I access the control property nodes in my timed loop because this is the only loop I have!
  • Why do you need to set those property nodes in each iteration of your loop? What makes you think you need to update a GUI at 500Hz?
    • I actually don't need to. That's a good point, I could update the property nodes less often. I would use the loop counter and a remainder function to update them..let's say only every 10th iteration.
  • Why do you think you don't "have access" to those property nodes when you place them in a separate loop?
    • In my main loop I somehow have to tell the program to write to a property node which is located in another loop. I don't know how.
0 Kudos
Message 3 of 7
(1,387 Views)

Hi faul,

 


@UL-00 wrote:
  • Why do you think you don't "have access" to those property nodes when you place them in a separate loop?
    • In my main loop I somehow have to tell the program to write to a property node which is located in another loop. I don't know how.

Just move the property node to the other loop…

What's the problem in doing so?

 

(As long as you don't post any code we cannot give specific recommendations…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(1,379 Views)

@UL-00 wrote:
  • Why do you think you don't "have access" to those property nodes when you place them in a separate loop?
    • In my main loop I somehow have to tell the program to write to a property node which is located in another loop. I don't know how.

Queue or user event

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 7
(1,360 Views)

@UL-00 wrote:

Thank you for your questions. 

 

  • Why do you need to access control property nodes in timed loops? (Are you really using TimedWhileLoops?)
    • Yes, I am using a timed while loop because I want to guarantee that my loop finishes in a certain amount of ms.
    • I access the control property nodes in my timed loop because this is the only loop I have!
  • Why do you need to set those property nodes in each iteration of your loop? What makes you think you need to update a GUI at 500Hz?
    • I actually don't need to. That's a good point, I could update the property nodes less often. I would use the loop counter and a remainder function to update them..let's say only every 10th iteration.
  • Why do you think you don't "have access" to those property nodes when you place them in a separate loop?
    • In my main loop I somehow have to tell the program to write to a property node which is located in another loop. I don't know how.

Investigate the Producer/Consumer approach to get the data from one loop to the other. Only update the UI element status when changed, and do it in the other loop. If you really need to be time critical you should consider going to a real-time system - you can never "guarantee" loop time in Windows.

0 Kudos
Message 6 of 7
(1,351 Views)

Also, while it's not the root of your problem (other people have addressed that pretty well...) if you have 2 or more property nodes in a row that you're setting that are slowing you down, look into the Defer Panel Updates property for the VI's panel in question.  I have applications where I want to disable dozens of buttons while a test is in progress and using that property is how I make it happen in a timely manner.

Message 7 of 7
(1,346 Views)