LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the Acquisition Devices fail when computer goes to sleep, and how to bring it back

For years and years we have had the problem with the acquisition devices where if the computer goes to sleep, it sends the device off to the weeds.

 

An example I have now, I have a 6211 (OEM) connected to my computer and left it sitting, and it went to sleep. The code that worked perfectly before now returns:

The specified resource is not available. The operation could not be completed as specified.
Task Name: _unnamedTask<0>

Status Code: -88708

 

As soon as I pull the USB cable and put it back its going to work fine, but this is a real issue for computers that have been left unattended....

 

0 Kudos
Message 1 of 5
(3,181 Views)

May be it's a stupid question, but why can't you prevent the computer going to sleep?

0 Kudos
Message 2 of 5
(3,174 Views)

Hi baker_matt,

 

Wolfgang has a good idea about preventing the computer to go to sleep. I found this forum on Microsoft's discussion forums that has a good explaination of how to accomplish this.It does assume you're using Vista or Windows 7. However, if this isn't the case and you'd like me to find some documentation for a different operating system, please let me know.

 

It looks like power comes to this device through the USB. I'm wondering if your program boots back up before the device is powered up. When the error pops up, you have to rerun the program as well. Maybe this time delay is causing it to work? 

 

Is the computer in Hibernation, sleep, or hybrid sleep mode? When you power it back up, does the device still show up in Measurment and Automation Explorer and/or Windows Device manager?

 

Hope this helps!

 

  

Lea D.
Applications Engineering
National Instruments
0 Kudos
Message 3 of 5
(3,159 Views)

The computer has more to do in the world than just this nidaq card and there are other anomalies I have noticed to for instance from time to time when I am using the NIDAq card and plug in a jump drive and then remove it this will also send the DAQ card off into the weeds. It is embarrasing for me to tell my customers to pull the USB cable and plug it back in, I would much rather the software handle this.

0 Kudos
Message 4 of 5
(3,140 Views)

Hey baker_matt,

 

I can definitely understand your frusteration with having to unplug and replug in the device. To fully help diagnose the problem, we'd need to check a couple of things. First of all, what is running on the device/in the program when the computer goes to sleep? If it's running at the time, the computer might be aborting the task and it's never fully reinitialized (see about reseting the device below).

 

Is this happening on multiple computers. If so, are they all the same make/model?  If it's happening on all computers that are not the same make/model, we can narrow this down to an issue with the hardware.

 

When the computer powers up, are you able to see it in Measurement & Automation Explorer (MAX)? If so, then we should be able to communicate with the device just fine. If not, the device is probably not being initiated with the computer. At this point we'd be able to check in the Windows Device manager to see if the device is present in there.

 

You mentioned that you were having issues when a flashdrive was plugged in and then removed. Is plugged into a port next to the flash drive? I'm wondering if something internally in the computer is being picked up on the USB port that shouldn't be.

 

One thing we could try is adding the Daqmx Reset Device VI into your program. This will abort all active tasks, disconnect routes, and return the device to an initialized state. From here, you can use the DAQmx Start vi to restart the task or use the DAQmx Stop to reset the task without starting it.

Lea D.
Applications Engineering
National Instruments
0 Kudos
Message 5 of 5
(3,125 Views)