将SMU 2400转换为2450 SCPI命令

时间:2015-07-20 16:16:14

标签: matlab plot command

我最近从吉时利仪器公司购买了一台SMU 2450,但我试图将MATLAB SCPI代码从2400转换为2450,当我试图做一个简单的循环触发时出现错误,任何人都可以告诉我出了什么问题在我的代码中

% Model 2400 Specific Functions
% Sweep current and measure back voltage
fopen(obj1)
fprintf(obj1,':*RST')
% setup the 2400 to generate an SRQ on buffer full 
fprintf(obj1,':*ESE 0')
fprintf(obj1,':*CLS')
fprintf(obj1,':STAT:MEAS:ENAB 512')
fprintf(obj1,':*SRE 1')
% buffer set up
fprintf(obj1,':TRAC:CLE')
fprintf(obj1,':TRAC:POIN 10')    % buffer size
% Set up the Sweep
fprintf(obj1,':SOUR:FUNC:MODE CURR')
fprintf(obj1,':SOUR:CURR:STAR 0.0001')
fprintf(obj1,':SOUR:CURR:STOP 0.001')
fprintf(obj1,':SOUR:CURR:STEP 0.0001')
fprintf(obj1,':SOUR:CLE:AUTO ON')
fprintf(obj1,':SOUR:CURR:MODE SWE')
fprintf(obj1,':SOUR:SWE:SPAC LIN')
fprintf(obj1,':SOUR:DEL:AUTO OFF')
fprintf(obj1,':SOUR:DEL 0') %delay 0 second

fprintf(obj1,':SENS:FUNC "VOLT"')
fprintf(obj1,':SENS:FUNC:CONC ON')
fprintf(obj1,':SENS:VOLT:RANG:AUTO OFF')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% IMPORTANT: if the unit goes into compliance, 
% adjust the compliance or the range value
fprintf(obj1,':SENS:VOLT:PROT:LEV 20') % voltage compliance
fprintf(obj1,':SENS:VOLT:RANG 20')   % volt measurement range
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fprintf(obj1,':SENS:VOLT:NPLC 1')
fprintf(obj1,':FORM:ELEM:SENS VOLT,CURR')
fprintf(obj1,':TRIG:COUN 10')
fprintf(obj1,':TRIG:DEL 0')
fprintf(obj1,':SYST:AZER:STAT OFF')
fprintf(obj1,':SYST:TIME:RES:AUTO ON')
fprintf(obj1,':TRAC:TST:FORM ABS')
fprintf(obj1,':TRAC:FEED:CONT NEXT')
fprintf(obj1,':OUTP ON')
fprintf(obj1,':INIT')

% Used the serail poll function to wait for SRQ
val = [1];          % 1st instrument in the gpib object, not the gpib add
spoll(obj1,val);    % keep control until SRQ
fprintf(obj1,':TRAC:DATA?')

A = scanstr(obj1,',','%f');

This is the 2450 code
    % Model 2450 Specific Functions
% Sweep current and measure back voltage
fopen(obj1)
fprintf(obj1,':*RST')
% setup the 2450 to generate an SRQ on buffer full 
fprintf(obj1,':*ESE 0')
fprintf(obj1,':*CLS')
fprintf(obj1,':STAT:QUES:ENAB 512')
fprintf(obj1,':*SRE 1')
% buffer set up
fprintf(obj1,':TRAC:CLE')
fprintf(obj1,':TRAC:POIN 10')    % buffer size
% Set up the Sweep
fprintf(obj1,':SOUR:FUNC:MODE CURR')

fprintf(obj1,':SOUR:SWE:CURR:LIN:STEP 0.0001,0.001,0.0001')

fprintf(obj1,':TRIG:BLOC:BUFF:CLE 1')
fprintf(obj1,':SOUR:DEL:AUTO OFF')
fprintf(obj1,':SOUR:DEL 0')

fprintf(obj1,':SENS:FUNC "VOLT"')
fprintf(obj1,':SOUR:VOLT:READ:BACK ON')
fprintf(obj1,':SENS:VOLT:RANG:AUTO OFF')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% IMPORTANT: if the unit goes into compliance, 
% adjust the compliance or the range value
fprintf(obj1,':SOUR:VOLT:PROT PROT20') % voltage compliance

fprintf(obj1,':SOUR:VOLT:RANG 20')   % volt measurement range
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fprintf(obj1,':SENS:VOLT:NPLC 1') % set the amount of time the input signal is processed.

fprintf(obj1,':TRAC:MAKE "buf10", 10')

fprintf(obj1,':TRIG:LOAD "SimpleLoop",10,0,"buf10"')

fprintf(obj1,':SENS:AZER OFF')

fprintf(obj1,':INIT')

fprintf(obj1,':*WAI')

% Used the serail poll function to wait for SRQ
val = [1];          % 1st instrument in the gpib object, not the gpib add
spoll(obj1,val);    % keep control until SRQ
fprintf(obj1,':TRAC:DATA? 1,5,"buf10"')

A = scanstr(obj1,',','%f');

非常感谢任何帮助

0 个答案:

没有答案