01-11-2007 06:59 AM
01-12-2007 02:58 PM
07-28-2008 05:24 AM
Hello,
I just try to set up my system so that I get 1000 samples/s, always the actual aquired values, and without high CPU usage. Quite a simple task.
On the schreenshot you can see how I set up my channels. With this setup I get the values at low CPU usage. It is cool! But I just don´t understand what WaitMode=Sleep and SleepTime mean? In the helpfile stands: "Check for available samples once per the amount of time specified in SleepTime".
Does it mean, if I query a read from my task, it will pull the data only once a second? If I set SleepTime=0, I get the same (I hope the same...) data as at SleepMode=1sec, but the CPU usage is 100%.
So can anybody describe, how does WaitMode=Sleep work?
Thanks in advance
MB
07-29-2008 11:09 AM
07-30-2008 05:29 AM
Hi,
I would accept your explanation, but if I set SleepTime=0.1, then the CPU usage is low. When SlepTime=0, then 100%...
This is what I don´t understand.
regards
MB
07-31-2008 11:55 AM
MB,
By placing SleepTime as 0 this means that the process will not sleep at all. This implies that the CPU is going to handle the data as quickly as possible and the usage will appear to be 100%. By having some kind of sleep value (.i.e. .1) you will have given the CPU a chance to rest or process other tasks.