08-16-2011 12:39 AM
A parallel event structure with a mouse move event in it executes every time the mouse moves... And that can be quite often if the user doesn't let go of the mouse or the mouse moves autonomously due to vibrations or something...
08-16-2011 03:42 AM
Hello,
If your mouse events only changes the text in the indicator, the event that you make with mouse moving does not cost CPU as much as you think - unless you have many operations that are executing in the program you could notice some delays. The code that have event structure running in parallel it is considered nice code.
Best Regards,
Gregor Cerne
National Instruments
08-16-2011 07:00 AM
I just checked it out with the ressource monitor. Moving the mouse permanently while in setup mode I produced 50% core usage on one core. That doesn't sound too much (1/8), but considering that it eats up 1,4 GHz of CPU Power just like that, I think it's != 0.
I found a way to exit the Event structure smoothly: I use the start and stop control to exit the loop. (The real things, not variables)
Why this works and with variables not is beyond me, but it solved my problem.
Thanks for all the support.