function result =  NiDeviceName(numName)

%	NiDeviceName maps between National Instruments device numbers returned by the Board_ID
%	function and names of National Instruments boards.  If NiDeviceName is passed a board ID 
%	number it returns the corresponding board name.  If NiDeviceName is passed a board name 
%	it returns the corresponding board ID number. (NiDeviceName is not case sensitive.)  If no
%	argument is passed then NiDeviceName returns a cell array of board names.
%
%	See Also:
%
%	8/27/99	Allen Ingling wrote help file.

bNames = {
	49,	'DAQCard-500'; 
	31,	'DAQCard-700'; 
	48,	'DAQCard-1200'; 
	35,	'DAQCard-DIO-24';
	47,	'DAQCard-AO-2DC'; 
	110,	'Lab-LC';
	111,	'Lab-NB';
	112, 'NB-A2000';
	118, 'NB-A2100';
	115,	'NB-A2150C';
	116,	'NB-A2150F';
	117,	'NB-A2150S';
	114,	'NB-AO-6';
	107,	'NB-DIO-24';
	108,	'NB-DIO-32F';
	109,	'NB-DIO-96';
	266,	'NB-DMA-8-G';
	458,	'NB-DMA2800';
	125,	'NB-DSP2300';
	126,	'NB-DSP2301';
	127,	'NB-DSP2305';
	104,	'NB-MIO-16H-9';
	105,	'NB-MIO-16H-15';
	106,	'NB-MIO-16H-25';
	100,	'NB-MIO-16L-9';
	101,	'NB-MIO-16L-15';
	102,	'NB-MIO-16L-25';
	121,	'NB-MIO-16XH-18';
	122,	'NB-MIO-16XH-42';
	119,	'NB-MIO-16XL-18';
	120,	'NB-MIO-16XL-42';
	107,	'NB-PRL';
	113,	'NB-TIO-10';
	353,	'PCI-1200';
	352,	'PCI-DIO-96';
	354,	'PCI-MIO-16XE-50';
	};

if (nargin == 0)
	result = {bNames{:,2}}';	
elseif ischar(numName)
	if ismember(upper(numName),upper({ bNames{:,2}}));
		result = bNames{find(strcmp(upper({bNames{:,2}}), upper(numName))),1};
	else
		error(['board name "'  numName '" is unknown to function NiDeviceName']);
	end %if..else.  
else
	if ismember(numName, [bNames{:,1}])	
		result = bNames{find([bNames{:,1}] == numName),2};
	else
		error(['board number ' int2str(numName) ' is unknown to function NiDeviceName']);
	end %if..else
end






	
