Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ card doesn't respond after the computer is restarted

Hi all,

 

My project involves using the USB 6216 with an computer running Windows XP embedded. I am using almost all the ports of the DAQ (i.e. Analog Out, Analog In, and Digital I/O). I have written a program in Visual studio 2005 C# using the DotNET2.0 examples provided by NI. This C# program has been put as a windows start-up application. Hence it starts as soon as the computer is started. 

The program runs okay when the computer is strated for the first time. But if the computer is shut down abruptly (because of power failure) and the system is started again, the DAQ card itself becomes 'not responding'. I thought that when the program is closed in an abrupt fashion, the read/write process is also stopped immidiately (as there is no power available to the card).

So I tried using a Reset() method in the beginning of the code.

 

Device dev = DaqSystem.Local.LoadDevice("dev1");

dev.Reset();

 

But the problem still persists.

At the suggestion of an NI application engineer, I have also tried applying the Microsoft hotfix for the USB controller.

 

http://support.microsoft.com/kb/969238

 

Even that didn't help!

 

 

The peculiar thing about this problem is that the 'shutdown problem' doesn't happen if the computer has been running for only few hours. It only occurs if the computer looses power after running for several days and is powered back again.

Currently, I am out of ideas and do not know how to solve the problem. I will highly appreciate any suggestions regarding this.

 

Thanks,

 

Amiya Behera,

Graduate Student,

Virginia Tech

0 Kudos
Message 1 of 2
(2,962 Views)

This C# program has been put as a windows start-up application. Hence it starts as soon as the computer is started.


 

That could require a few workarounds to make sure NI Devmon is up and running.  After an abrupt shutdown there are some clean-ups required before the USB plug n Play devices are ready to be discovered.  It sounds like you app is "Getting out of the gate" before the required services are ready.  You could try to wait on a "Is Device Present?" routine

 

If It was written in LabVIEW I would say use the system configuration API to verify start-up conditions are met.  (Of course you could build a LabVIEW Project into a DLL and call that from C#) 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 2
(2,950 Views)