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.

Input Buffer Errors

Models 2400, 2401, 2410, 2420, 2425, 2430, 2440, 6430
Post Reply
Ahegedus
Posts: 3
Joined: May 24th, 2018, 5:21 pm
Country: United States

Input Buffer Errors

Post by Ahegedus » May 24th, 2018, 5:33 pm

Hi,

I am attempting to take several measurements a a fixed current level and do the limitations of the SDM model it was advised to use the list function to set the levels. I am using a 2400 via serial communications using Igor Pro as the host application.

I have the basic system working with communications and retrieving data. I seem to be running into a limit with the number of data points allowed in the list. I have script that allows me to adjust the number of cycles (start positive for X points, go negative for 2X points, and back positive for x points.) I can adjust x or the number of cycles. It appears that if the total number of point in the list exceeds 160 I get an input buffer error. The manual states that I can enter up to 2500 points, but I a not getting anywhere close to that. Is there another buffer I need to set to allow me to enter unto 2500 points. I am getting Error -360 input buffer overrun and -353 Queue overflow.

What do I need to change?


Snippet from code
Sprintf iUp "%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e \r",i,i,i,i,i,i,i,i,i,i
Sprintf Idown "-%3.0e,-%3.0e,-%3.0e,-%3.0e,-%3.0e,-%3.0e,-%3.0e,-%3.0e,-%3.0e,-%3.0e \r",i,i,i,i,i,i,i,i,i,i


// iUp and iDown are now strings with comma delimiters and the appropriate values. They are just groups of 10.
// Set Sequence for the first x number of up cycles, 2x down cycles, x up cycles
NVAR cycleCount,cycleLen
For(cycleNum=0;cycleNum<CycleCount;cycleNum +=1)
For(index=0;index<cycleLen;index+=1)
if(!(Index || CycleNum))
VDTWrite2 ":SOUR:LIST:CURR "+iUp //Use list on only first pass through
continue
endif
VDTWrite2 ":SOUR:LIST:CURR:APP "+iUp //Use append after that
Endfor

For(index=0;index<2*cycleLen;index+=1)
VDTWrite2 ":SOUR:LIST:CURR:APP "+iDown
Endfor
For(index=0;index<cycleLen;index+=1)
VDTWrite2 ":SOUR:LIST:CURR:APP "+iUp
Endfor
Endfor

Andrea C
Keithley Applications
Keithley Applications
Posts: 1280
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Input Buffer Errors

Post by Andrea C » May 28th, 2018, 10:16 am

When building the list, you can send only 100 source values each time.

:SOUR:LIST:CURR first_100_pts

:SOUR:LIST:CURR:APP next_100_pts

Ahegedus
Posts: 3
Joined: May 24th, 2018, 5:21 pm
Country: United States

Re: Input Buffer Errors

Post by Ahegedus » May 28th, 2018, 10:23 am

I am only sending 10 at a time.

Simplified the code to remove one of the loops and still getting errors if I try to have more than 160 total points (added in groups of 10).


Andy

Andrea C
Keithley Applications
Keithley Applications
Posts: 1280
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Input Buffer Errors

Post by Andrea C » May 30th, 2018, 3:04 am

What is the length of the string being written to the SMU?

Is your software managing the terminator for each VDTwrite?

Andrea C
Keithley Applications
Keithley Applications
Posts: 1280
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Input Buffer Errors

Post by Andrea C » May 31st, 2018, 2:40 pm

Input buffer size is 2048 bytes. If too many characters are sent all at once, you will get the buffer overrun error.

In your RS-232, are you using XON/XOFF flow control?

Below is screen shot of an NI IO Trace session sending 70 characters at a time to build a 210 point list sweep.
KI2400_ListSweep.PNG
KI2400_ListSweep.PNG (617.2 KiB) Viewed 7973 times

Ahegedus
Posts: 3
Joined: May 24th, 2018, 5:21 pm
Country: United States

Re: Input Buffer Errors

Post by Ahegedus » May 31st, 2018, 2:49 pm

The string being sent is very simple:

for example:
5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7,5e-7

One thing I have played with and am curious about: Is there a limit to the number of list appends that can be done?

I modified the code to send longer lists of number (albeit still only 20/line) and this reduced the number of :SOUR:LIST:CURR:APP commands I had to do. I can now have more data points, but I have not explored the limits. Need to get something working.

I had Xon/Off selected but I had to take it of because it complicated the string of data sent back. It inserted an ASCII 19 character in the front of the string that was causing no end of problems. So I disabled the Xon/Xoff.

Sprintf iUp "%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,",i,i,i,i,i,i,i,i,i,i
Sprintf Idown "%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e,%3.0e",-i,-i,-i,-i,-i,-i,-i,-i,-i,-i
Icycle = iUp+iDown

NVAR cycleCount
//Write the first set
VDTWrite2 ":SOUR:LIST:CURR "+Icycle+"\r"
//Append the additional sets
For(cycleNum=1;cycleNum<CycleCount;cycleNum +=1)
VDTWrite2 ":SOUR:LIST:CURR:APP "+Icycle+"\r"
Endfor

Andrea C
Keithley Applications
Keithley Applications
Posts: 1280
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Input Buffer Errors

Post by Andrea C » June 1st, 2018, 4:54 am

Not aware of any limit on the number of appends so long as the total list of sweep values stays within the max of 2500 points and each append specifies no more than 100 values.

The error you are facing is an overflow of the input buffer. This means your program is sending characters to the instrument faster than the command parser is processing them and you are getting an overflow error. When using RS-232 with the 2400, the XON/XOFF flow control is the only means to mediate the transmission of characters with the interface ready to receive them. This also assumes that the RS-232 interface on the PC side plays nice.

I suspect if you used a breakpoint and single stepped your code and effectively introduce some time delay in between each source list append, it would probably succeed. Maybe you can find a work around by using a delay. Or switch to using GPIB.

Post Reply

Return to “2400 Series SourceMeter”

Who is online

Users browsing this forum: No registered users and 1 guest