keithley 236 matlab IV sweep
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am using the following code to source voltage and measure current on Keithley 236. However the sweep is very slow. What am I doing wrong?
%%----------USER INPUTS---------
clc; clear all;close all;
KeithV1=11; %<---VD
KeithV2=12; %<---VG
IlimV1=0; %+/-50mA current compliance level
IlimV2=0;
V1start=0;
V1step=1;
V1stop=5;
V2start=-2;
V2step=.1;
V2stop=2;
msMeasDelay=0;%<-- ms
filename='IVtest.txt'; %<---filename to save S parameters to
%%--------- BEGIN SCRIPT--------
%CREATE KEITHLY OBJECT
hKeith1 = instrfind('Type', 'gpib', 'BoardIndex', 0, 'PrimaryAddress', KeithV1, 'Tag', '');
if isempty(hKeith1)
hKeith1 = gpib('NI', 0, Keithleyaddr);
else
fclose(hKeith1);
hKeith1 = hKeith1(1);
end
hKeith1.InputBufferSize = 2^18;
hKeith1.OutputBufferSize = 2^18;
hKeith1.Timeout = 3;
fopen(hKeith1);
%%%%%%%%%%
fprintf(hKeith1,'F0,1X'); %source V, (measure I), DC mode
%fprintf(hKeith1,'F0,1X'); %source V, (measure I), sweep
fprintf(hKeith1,'P0'); %P0 disable averaging
fprintf(hKeith1,['L' num2str(IlimV1) ',0X']); %compliance I, auto I meas range
fprintf(hKeith1,'R1X'); %enable triggers
fprintf(hKeith1,'N1X'); %turn on output
fprintf(hKeith1,'G4,2,2X'); %output value,ASCII format,lines of sweep per data talk
fprintf(hKeith1,['Q1,-3,3,1,0,0X']);
%start,stop,step,range,delay before measurement
[Data]=query(hKeith1,'H0X');
fprintf(hKeith1,['B' num2str(0) ',0,0X']); %set the voltage back to zero
fprintf(hKeith1,'N0X'); %turn off output
fclose(hKeith1);
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre DMM en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!