Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

read data from buffer into MATLAB

Models 2400, 2401, 2410, 2420, 2425, 2430, 2440, 6430
Post Reply
Posts: 4
Joined: March 10th, 2016, 4:00 pm
Country: United States

read data from buffer into MATLAB

Post by kyungml » March 11th, 2016, 3:51 pm

Hi all,

I'm using Keithley 2400 with MATLAB over GPIB to do a current sweep and read back voltages. When I run the code, it does the sweep and displays the voltages on the front panel (and no errors) but I'm having trouble reading back the data from the front panel to MATLAB. Here is the part of the code I do the buffer reading:

fprintf(K2400,'TRACE:POINTS 10'); %10 point sweep/read
fprintf(K2400,'TRIGGER:COUNT 10');
V = fscanf(K2400)

What I get for V is

which is more than 10 values and not what is displayed on the front panel.

Joseph V
Keithley Applications
Keithley Applications
Posts: 107
Joined: July 1st, 2014, 10:31 am
Country: United States

Re: read data from buffer into MATLAB

Post by Joseph V » March 14th, 2016, 6:56 am

By default the instrument's buffer will contain the following parameters: voltage, current, resistance, time, and status.
If you only want to record the voltage then you would want to use the :FORM:ELEM command to select the type of data to collect.
For example :FORM:ELEM VOLT would only collect voltage for each triggered reading.

Post Reply

Return to “2400 Series SourceMeter”

Who is online

Users browsing this forum: No registered users and 4 guests