LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling ProcessSystemEvents() in a loop versus calling RunUserInterface()

My CVI code would be cleaner if I did it this way.
 
Are there any downsides to calling ProcessSystemEvents() in a loop versus calling RunUserInterface()?
0 Kudos
Message 1 of 4
(3,305 Views)

Why would you want to do it that way?

How is your program structured?

What makes it "cleaner" to do it with ProcessSystemEvents() as opposed to RunUserInterface() ?

(I believe the effect of the RunUserInterface() call is essentially the same as looping on ProcessSystemEvents() but there may be other stuff it handles in the background I do not know about).

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 2 of 4
(3,301 Views)

My program is structured so that it is always running in a loop.

However, now that you mention it, I could restructure it like a typical CVI program.

0 Kudos
Message 3 of 4
(3,274 Views)
I find the event-driven RunUserInterface() way of doing things to be a lot more intuitive for me at least. Which is why I was wondering why you were doing it a different way. Neither approach is necessarily more correct than the other, it's just a matter of what you are used to I guess.
Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 4 of 4
(3,271 Views)