LabWindows/CVI

取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 4 条)
3,618 次查看

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 项奖励
2 条消息(共 4 条)
3,614 次查看

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 项奖励
3 条消息(共 4 条)
3,587 次查看
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 项奖励
4 条消息(共 4 条)
3,584 次查看