LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ProcessSystemEvents() and CPU time Need for speed.

I am runing CVI 7.1 on a XP computer.  I want to know how I can speed up my application using the minimal number of ProcessSystemsEvents(). 

I have an application that I wrote and needs to be run as fast as it can.   I noticed if the mouse isn't moving inside the GUI, the application runs at a steady rate (200 iterations per minute).   However, when the mouse moves continuously inside the GUI, the applications runs almost twice that speed (~ 400 iterations per minute).  Why is that and how do I make my application run faster without having to move the mouse cursor continuously inside the GUI?  I have tried removing as many of the ProcessSystemEvents() from my code, and that did improve on the speed.  However, there are certain parts of my application where I do need the ProcessSystemEvent() function to make my RS485 card function properly.  Is there a way for me to achieve this?



What is the functional difference between ProcessSystemEvents() and ProcessDrawEvents()? 


0 Kudos
Message 1 of 2
(3,556 Views)
ProcessDrawEvents processes all events that are related to the GUI: indicators update, graph drawing and so on. I does not process any mouse or keyboard or timer events nor any other event not related to GUI update. ProcessSystemEvents processes all pending events, either graphical or not. You can use the first to update your GUI when you have updates some controls / draw some graph and so on and do want to have the GUI reflects these changes before it will do naturally (at a callback completion for example).
 
ProcessSystemEvents can be used to process events that would be ignored if your program is tied in a loop that does not permit it to process them.
 
I suppose your question is related to this other thread that is probably the most critical problem you are having at the moment: I cannot help you since I never used such aRS485 configuration: in normal RS232 or 4-wire RS485 communication you do not need any ProcessSystemEvents to receive responses from the attached hardware.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,548 Views)