Possible to retrieve serial number of the DAQ being used?

조회 수: 5 (최근 30일)
Mike
Mike 2012년 2월 29일
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.
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 2월 29일
You are possibly referring to the following contribution: http://www.mathworks.com/matlabcentral/fileexchange/23224-nidaqmx-serial-number

댓글을 달려면 로그인하십시오.

채택된 답변

Manisha
Manisha 2012년 3월 2일
Hi Mike,
You can directly access the NIDAQmx driver functions from DAQ toolbox.
[status, serial] = daq.ni.NIDAQmx.DAQmxGetDevSerialNum('Dev3', uint32(0))
Hope this helps,
Manisha
  댓글 수: 1
Mike
Mike 2012년 3월 2일
Hi Manisha, thank you. That does give a number out, but the reported number is 23363818, where as the case and MAX say 16480EA. Hence, they list them in HEX in MAX and on the back, so dec2hex makes them the same. Awesome.
I am looking for all the related commands to what you provided. Do you have a link? Thanks
Most exellent help again.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Mike
Mike 2012년 3월 1일
Yep. Thanks. Just hoping for M-code only.

Walter Roberson
Walter Roberson 2012년 3월 1일
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.)

카테고리

Help CenterFile Exchange에서 Data Acquisition Toolbox Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by