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 During a Sweep

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

Read Data During a Sweep

Post by staylorEBAD » December 15th, 2017, 7:55 pm

Is it possible to read data from a 2410 during a list sweep? RS-232 is being used. There are no bytes in the port buffer until the sweep completes.

Note: If the asterisk is on the display *RST does not clear it. TRACE:FEED:CONTROL NEVER must be sent. This is important if the meter changes back and forth between sweep and non-sweep modes.

*RST;*CLS
*OPC?
Read
TRACE:FEED:CONTROL NEVER // *RST does not set this back to never
SYST:TIME:RESET:AUTO ON
TRACE:CLEAR
TRACE:POINTS 500
TRACE:FEED:CONTROL NEXT
SYST:BEEP:STAT OFF
SENS:FUNC:CONC ON
SOUR:FUNC CURR
SENS:FUNC:ON 'VOLT','CURR'
SENS:VOLT:PROT 2
SENS:VOLT:RANG 2
SOUR:CURR:RANG 1.0
SOUR:CURR:MODE LIST
SOUR:LIST:CURR 0
SOUR:LIST:CURR:APP 1,1,1,1,1,0
TRAC:TST:FORM ABS
SOUR:CLE:AUTO 1
SOUR:DELAY 1.000
TRIG:COUN 7
ARM:COUN 1
*OPC?
Read
OUTP ON
INIT:IMM
TRACE:DATA?
The computer monitors the serial port at the single byte level. Nothing comes in until the sweep is complete.

Scott

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

Read Data During a Sweep

Post by staylorEBAD » December 19th, 2017, 12:10 pm

The reply from Tektronix to my support request asking the same question:

"Thank you for your interest in Keithley products. My name is Joe Veneri.
Unfortunately due to the way the sweep is ran/data is collected you can not read the contents of the buffer until the sweep is completed."

I tried several methods and came to the same conclusion. The Operation Event Register can be read during the sweep. Bit 3 (8) is high during the sweep.
:STATus:OPERating:CONDition?.
My actual sweep is five minutes long so the standard few second timeout on serial port reads needs to be dealt with also.

Please note that if either *OPC? in the code is omitted the code may not work depending on how rapidly your computer sends the commands. This is using C# and RS-232 at 19.2kbaud. GPIB is generally even faster.

So far baud rates faster than 19.2k are unreliable. If ALT-Tab is used to switch back and forth between windows under Window 7 the communications at higher baud rates will eventually hang. It doesn't happen every time but if you do it enough or get lucky and do it at the right/wrong time it can happen the first time. We see this when doing 6 measurements per second for long periods. If you only do occasional reads it may take a very long time before you see it happen. If you have solved this I would like to know how. I have tried both USB to RS-232 converters and motherboard based serial ports. They both do it. The XON/XOFF flow control doesn't help. Probably because communication errors can miss or corrupt those characters also. Table 14-2 in the manual says RTS/CTS are tied together.

Scott

Boyan Boyanov
Posts: 4
Joined: March 10th, 2018, 11:23 pm
Country: United States

Re: Read Data During a Sweep

Post by Boyan Boyanov » March 11th, 2018, 12:38 am

As far as I know this is the intended behavior, data comes out only after the sweep completes. The only way around is to set the SOURCE to FIXED mode, and then in your code send individual commands with specific source levels and read out data one at a time.

Code: Select all

:SOUR:VOLT:LEV xxx;
:OUTP ON;
?READ;
This obviously limits your sweep rate, so if you want to scan fast you will have to live with it.

Post Reply

Return to “2400 Series SourceMeter”

Who is online

Users browsing this forum: No registered users and 3 guests