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.

2410 using RS-232 at 38.4k

Models 2400, 2401, 2410, 2420, 2425, 2430, 2440, 6430
Post Reply
staylorEBAD
Posts: 25
Joined: May 29th, 2012, 3:06 pm
Country: United States

2410 using RS-232 at 38.4k

Post by staylorEBAD » January 5th, 2018, 12:51 pm

We have been using the 2410 and 2420 in a rack with other instruments using GPIB for years. Recently a few stand-alone requirements have come up and RS-232 is being used. At up to 19,200 (19.2k) baud we do not see any issues. At faster baud rates, 38.4k or 57.6k, meter errors can and do occur, especially when switching between active windows (Win7 pro) while the meter is being read.

The goal is to read the meter as fast as possible while the output is on. Using GPIB 16 to 18 readings per second is possible. Using RS-232 at 19.2kbaud the number of readings per second is 5 or 6. Here is a look at the code the meter sees:

INIT:IMM
While loop
{
FETC?
read 70 ASCII characters of data
INIT:IMM
process data just read
} end loop

The computer is fast enough that the meter and RS-232 are the bottleneck. The loop is sequential so another INIT:IMM will not be sent until data from the previous FETC? has been read. The result is that communication is always one direction at a time. Since the length of the commands is short and only a single command is being sent at a time using XON/XOFF doesn't add any reliability and would just slow down communication. The computer input buffer is 512 bytes or more so the 70 character data set will never cause an overflow.

When 38.4k baud is used the number of reads per second is higher, though not double. Eventually the meter will fail to respond to one of the "FETC?" commands resulting in a read timeout. Investigation has shown that the meter will report an error when this occurs. Sending FETC? again will retrieve the data.

An external analyzer was connected to monitor the communication. The analyzer shows that what is happening is exactly what is expected except that at some point the meter fails to send the data back. The "FETC?" command sent just before that is the same as all the others except the meter fails to respond and the meter reports an error, -113 Undefined header.

As a test the "FETC?" was split into two parts to see if the meter was sensitive to incoming data timing. "FET" was sent followed by "C?" 1.1 seconds later. The meter did not report any errors.

If anyone else has resolved this your help would be appreciated.

INIT:IMM<cr>
FETC?<cr>
+5.000418E+02,+1.290105E-09,+9.910000E+37,+7.553711E+01,+2.355200E+04<lf>
INIT:IMM<cr>
FETC?<cr>
+5.000403E+02,+4.794318E-10,+9.910000E+37,+7.565723E+01,+2.355200E+04<lf>
INIT:IMM<cr>
FETC?<cr>
(a read timeout occurs here after 1 second)
FETC?<cr>
+5.000421E+02,+7.513036E-10,+9.910000E+37,+7.577930E+01,+2.355200E+04<lf>
SYST:ERR?<cr>
-113,"Undefined header"<lf>

Dave W
Tektronix Applications
Tektronix Applications
Posts: 266
Joined: April 26th, 2010, 12:01 pm
Country: United States

Re: 2410 using RS-232 at 38.4k

Post by Dave W » January 5th, 2018, 1:49 pm

At faster than 19,200 baud I would recommend enabling flow control to help prevent overrunning the instrument's input buffer and creating errors. With that said, if the getting the max speed an reliability are of concern, stick with GPIB as it is SOLID.

staylorEBAD
Posts: 25
Joined: May 29th, 2012, 3:06 pm
Country: United States

2410 using RS-232 at 38.4k

Post by staylorEBAD » January 10th, 2018, 12:14 pm

The longest command being sent is INIT:IMM,cr> followed later by FETCH?<cr>. Neither are resent until after the meter returns data so the the meter input buffer is not being overrun. Even with the limited input command length the meter appears to be unable to handle 38.4k or faster reliably.

GPIB is an option we also use but is a bit overkill for a single meter. A 2410 with USB would be ideal.

Scott

Post Reply

Return to “2400 Series SourceMeter”

Who is online

Users browsing this forum: No registered users and 7 guests