LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

mouse movement and real time processing

Hi,
I have a CVI/Labwindows 6.0 program, which is doing real time data acquition and some other operations.
Whenever I move mouse or pass it over panel, it causes some disturbance is my acquition and other real time operations (computations). These are not desirable effects. I used CVI function SetSleepPolicy to set the sleep policy to Sleep More. It is better now, still I get similar problems. How can I make my program more efficient for real time processing? I am already using multi threading.
Is there any resource for real time data acquition using CVI?
Cheers
Niranjan
0 Kudos
Message 1 of 3
(2,942 Views)
It sounds like your data acquisition thread is pretty CPU intensive. You can set that thread to a higher priority. If you are using CVI's thread functions this can be done by:

CmtSetThreadPoolAttribute (threadPool, ATTR_TP_THREAD_PRIORITY,THREAD_PRIORITY_ABOVE_NORMAL);

Other than boosting the data acquisition thread priority there isn't much more you can do you haven't already done.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 3
(2,942 Views)
The big problem is that Microsoft gives the mouse the highest priority.
Short of getting a real-time kernel (such as Venturcom's RTX), you are at
the mercy of Bill Gates. (I have been told that microsoft was concerned
about users panicing if the mouse froze.)

Bill
"Chris Matthews" wrote in message
news:50650000000500000008B50000-1031838699000@exchange.ni.com...
> It sounds like your data acquisition thread is pretty CPU intensive.
> You can set that thread to a higher priority. If you are using CVI's
> thread functions this can be done by:
>
> CmtSetThreadPoolAttribute (threadPool,
> ATTR_TP_THREAD_PRIORITY,THREAD_PRIORITY_ABOVE_NORMAL);
>
> Other than boosting the data acquisition thread priority there isn't
> much more you can do you haven't alrea
dy done.
>
> Best Regards,
>
> Chris Matthews
> National Instruments
0 Kudos
Message 3 of 3
(2,942 Views)