Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does NIDAQ Pretend that a device is connected when its not, and how can I get it to stop it

Solved!
Go to solution
We are using Windows XP embedded and the USB 6211 (OEM) the problem is for every new daq card that gets connected to the system NIDaq enumerates it as Dev1, Dev2 and so on.  The problem comes in if you remove one daq card and replace it with another then it calls it Dev1 and if your software loads Dev1 NIDaq does not bother to tell you that the device is not actually there until you attempt to start a task.  Also on XP embedded Mesurmant and Automation Wizard does not get installed/compiled in with the image so there is no way to delete Dev1 so that "Dev2" can be Dev1.  Is there a way to tell what devices are REALLY connected to the system?
0 Kudos
Message 1 of 5
(2,631 Views)

Hello barker_matt,

 

One way you can check to see if a device is in your system would be to use a DAQmx global property to read out all of the devices connected to the system. Using a DAQmx Device property node, you can then check to see if it's simulated or not present.  It'd look something like this:

 

Real DAQmx Device.png

 

I didn't test this with a device that is no longer present in my system, but you could work with this to get a real device in your system.   Hope this helps!

 

ColeR
Field Engineer
0 Kudos
Message 2 of 5
(2,594 Views)

Cole,

 

thank you for your response

 

can you translate that into C for me or tell me what NIDaq functions that you are using there? 

0 Kudos
Message 3 of 5
(2,590 Views)
Solution
Accepted by topic author baker_matt
Sorry about the wrong assumption on your language of choice. 😉 The two functions are DAQmxGetSysDevNames and DAQmxGetDevIsSimulated.  DAQmxGetSysDevNames will return an array fo devices in your system.  I ran this into a For Loop and stepped through each device.  If I call the DAQmxGetDevIsSimulated on a device that doesn't exist, an error will be thrown. If it is simulated a true will be returned.  All my code does is waits for the first device that is not simulated and is present in the system.  
ColeR
Field Engineer
0 Kudos
Message 4 of 5
(2,575 Views)

No problem on the language assumption, I guess I can understand why you would assume LabView Smiley Wink

 

thank you, i believe that will resolve my problem!

0 Kudos
Message 5 of 5
(2,567 Views)