04-20-2022 11:00 AM
I work on a work machine that runs Windows 10, and I have been experimenting with a VI that is sampling data from some cDAQ modules and a couple of serial devices. I have been able to solve quite a few issues so far, but now I am running into problems that seem to stem from my computer diverting resources from transferring data from the cDAQ modules to things like locking the screen.
Unfortunately, my work requires that our computers lock after a small amount of user inactivity, and they will eventually sleep. While sometimes this doesn't seem to be a problem and the VI can run for days, more often than not, I receive a 200361 Buffer Overflow error when my account locks itself. A little reading and googling, gives me the impression that this is being caused because the computer is diverting resources away from transferring data from the hardware (apparently Windows is especially bad). I have done some testing and it does seem to happen whenever my computer locks my profile. When I significantly reduce my sampling rate (from 2 MHz to about 500 kHz), the problem seems to happen less often.
Does anyone have any work arounds or any advice how I might be able to run my VI on my work machine for long periods of time, during which time it will eventually lock and go to sleep? I've attached my VI to this post for review.
Thanks in advance!
Solved! Go to Solution.
04-20-2022 11:41 AM
Looks like Windows just slows down the applications running in your account once locked out or maybe even pause it all at once and this causes the DAQmx driver buffer to overflow as the cDAQ will continue to transfer data over DMA but the driver or application couldn't empty the buffer on-time.
The easiest option would be to convince your IT that you need special permission to not lock out the account (probably create an engineering account or put the computer off-internet).
04-20-2022 12:10 PM
Can't look at your code due to it being too new.
Locking the computing doesn't affect my DAQ acquisition, obviously putting the computer to sleep would. A few options:
I use those tricks and the Power Request for my applications. You can use the Power Request to tell the computer that your are presenting a slideshow, watching a movie, etc. This prevents the computer from going to sleep. When your program is finished, turn off the power request and the normal settings are returned.