from NIDAQmx Serial Number by Gus Lott
A utility (mex file) to extract the hardware serial number from a National Instruments DAQmx device

nidaq_serial.m
%NIDAQ_SERIAL
%   NIDAQ_SERIAL(DevID) is a MEX function wrapper on the
%   DAQmxGetDevSerialNum function call in the NIDAQmx API.  It returns the
%   device specific serial number for a given NIDAQmx device.
%
%   NIDAQ_SERIAL(DevID) acquires the serial number for the installed device
%   specified by the string DevID (i.e. 'Dev1' or 'Dev2')
%   
%
%   (c) 2009, Gus K Lott III, PhD 
%   Right to free and unlimited use is granted to any and all as long as
%   original author information is cited in the product utilizing this function.
%   $Revision: 1.0 $  $Date: 3/5/2009 $
%
%   Gus K Lott III, PhD
%   Neurobiological Instrumentation Engineer
%   Howard Hughes Medical Institute, Janelia Farm Research Campus
%   19700 Helix Dr., Ashburn, VA 20147
%   lottg@janelia.hhmi.org

Contact us at files@mathworks.com