Identify Lab instruments
Contents
Query for hardware information
gh = instrhwinfo('visa','agilent');
Query individual instruments
n = length(gh.ObjectConstructorName); for k=1:n str = char(gh.ObjectConstructorName(k)); obj = eval(str); fopen(obj); fprintf(obj,'*IDN?'); idn = fscanf(obj); fprintf('identification: %s',idn); if regexp(idn,'33120A')>0 fg = obj; elseif regexp(idn,'MSO7012B')>0 os = obj; else fclose(obj); delete(obj); end end clear idn obj str;