Dear AI S,
I would like to use your explaination 'about labVEIW running on window OS' in my project report discussion part. I try to find private message function in this forum and could not find so I post it here.
Thanks and with best regds,
maymaythar
AI S written:
There are a couple of things going on that affect your results.
1. Windows is not a real-time operating system. As it multi-tasks, you have little control over when it gives time to your application. Loop times may vary depending on what else Windows decides during that iteration. Especially when doing file I/O: if your disk is busy, a loop interation may take longer. Windows may also be doing some disk buffering, so occasionally a loop interation may take much longer than usual as the buffered data from multiple loop interations gets written to disk.
2. Wait Until Next ms Multiple doesn't garuntee equal loop times. With the millisecond multiple input set to 1000, if one iteration starts with the PC's clock at xx:xx:xx.001, Wait Until Next ms Multiple will wa
it 0.999 seconds. If an iteration starts with the PC's clock at xx:xx:xx.999, Wait Until Next ms Multiple will wait 0.001 seconds.
3. In your main loop, you check to see if the millisecond timer value * 60 equals the desired Length of Data Collection. If your loop doesn't execute every millisecond, you may miss the equals case and then your loop won't stop. You should check >= rather than just =.
------------------------------------------------------------------
When you feel sad, laugh