Hi,
I am writing C code using NI-DAQmx 8.6
Can you please let me know how to programmatically check if a device is accessible or not. My device is NI USB 6221.
I found the following API but these don't tell if device is connected and accessible whereas on the device list of measurement and automation studio, we can immediately see if a device is connected from its icon.
uInt32 productNumber=0;
DAQmxGetDeviceAttribute(device,DAQmx_Dev_IsSimulated ,&productNumber);
//productNumber is set 1 if device is simulated.
DAQmxGetDeviceAttribute(device,DAQmx_Dev_SerialNum ,&productNumber);
// returns the serial number of the device
DAQmxGetDeviceAttribute(device,DAQmx_Dev_ProductNum ,&productNumber);
// for NI USB 6221 it returns 0x72dc
What is the API call to check if device is connected or not?
Thanks,
Hasan Ayaz
PhD Candidate
Biomedical Engineering