I am using 2011b, and daq toolbox. I would like to get the information from the DAQ I'm using such as serial number. Something like the SCPI command "idn?" provides.
I did see someone wrote a C utility, but seems like m-code should be able to do it too.
No products are associated with this question.
You can directly access the NIDAQmx driver functions from DAQ toolbox.
[status, serial] = daq.ni.NIDAQmx.DAQmxGetDevSerialNum('Dev3', uint32(0))
Hope this helps,
You probably will not be able to do this with pure m code. The MATLAB DAQ Toolbox does not expose the serial number information, so you need to call in to the NI shared libraries. Calling in to the NI shared libraries from MATLAB requires a C header file that defines the arguments of all of the calls supported by the NI shared library. (The MATLAB routine used would be loadlibrary())
On the other hand, at the moment I would not rule out the possibility that there might be an ActiveX / DCOM interface to NI's Measurement & Automation Explorer that you might be able to use to "remote control" the Explorer to get down to the serial number. (I haven't checked out this possibility.)