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.

Help with programming.

Models 2400, 2401, 2410, 2420, 2425, 2430, 2440, 6430
Post Reply
edxonlicon
Posts: 6
Joined: October 20th, 2010, 7:33 am
Country: Spain

Help with programming.

Post by edxonlicon » November 25th, 2010, 6:16 am

I've made a code for doing a custom sweep (sinusoidal) for a 2410 model on Matlab, instead of using the sentence:

fprintf(obj1,':SOUR:LIST:CURR 0., .52264e-6, .10396e-5, .15451e-5, ... etc')

I would like to use:

x=0:pi/30:2*pi;
y=5e-6*sin(x);
s=y(1:1:length(y)-1);

binblockwrite(obj1,s,'float',':SOUR:LIST:CURR ')

where:
s has the values for the sweep.
obj1 is the interface object.
and float is the type of the data.

The code don't shows any trouble using the fprint, but by the other hand with the binblockwrite sentence the equipment displays error 104, which is a data type error, I've tried all the data types allowed for Matlab and i can not fix the error.

any suggestions?

Jennifer C
Keithley Applications
Keithley Applications
Posts: 49
Joined: September 17th, 2010, 7:55 am
Country: United States

Re: Help with programming.

Post by Jennifer C » December 9th, 2010, 12:44 pm

According to the SCPI command reference section in the Model 2400 User's Manual: "Regardless of which data format for output strings is selected, the SourceMeter will only respond to input commands using the ASCII format."

Therefore, you cannot send binary data to the SourceMeter. It will only accept the custom sweep values in ASCII with commas separating the values. You can however, create a string of these values prior to calling the command and then just append that string to the command prefix ":SOUR:LIST:CURR ".

Post Reply

Return to “2400 Series SourceMeter”

Who is online

Users browsing this forum: No registered users and 1 guest