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.

RS232 - no data read

2182 Series Support
Post Reply
Leitom
Posts: 2
Joined: January 16th, 2013, 5:23 am
Country: Austria

RS232 - no data read

Post by Leitom » January 16th, 2013, 5:41 am

Hello!

I want to use the 2182 nanovoltmeter via RS232. I use the program "Advanced serial port monitor" for testing the RS232 commands.

Here is the configuration of the RS232 of the 2182:
baud rate: 9600
Flow control: none
TX Term: CR

Here is the configuration of the com port of the program:
baud rate: 9600
stop bits: 1
data bits: 8
Parity: none
Flow control: none
TermChar End-of-String for receiving: CR
TermChar End-of-String for sending: CR

So the nanovoltmeter configuration and the program configuration should be fine.

I then start my measurement with configuring the 2182:
*RST\r
*CLS\r
:conf:volt\r
:sens:volt:nplc\s1\r

Then I read my measured values with :read?\r

This works a few times to a few minutes and I always get back 16 bytes of data. But somehow, sometimes not the full data is transmitted, see timestamp 20130116141343.826. And after getting one uncomplete measurement value, I won't get data anymore with the :read? command, even when I do the "*RST\r*CLS\r:conf:volt\r:sens:volt:nplc\s1\r" configuration again. The only thing that helps is to reboot the computer.

Code: Select all

<20130116141323.734 TX>
*RST [len=4]
<20130116141328.478 TX>
*CLS [len=4]
<20130116141333.837 TX>
:read? [len=6]
<20130116141334.818 RX>
-1.52479127E+00 [len=15]
<20130116141339.005 TX>
:read? [len=6]
<20130116141339.443 RX>
-1.69969205E+00 [len=15]
<20130116141340.166 TX>
:read? [len=6]
<20130116141340.604 RX>
-1.76223840E+00 [len=15]
<20130116141340.989 TX>
:read? [len=6]
<20130116141341.429 RX>
-1.81413693E+00 [len=15]
<20130116141341.678 TX>
:read? [len=6]
<20130116141342.115 RX>
-1.86138423E+00 [len=15]
<20130116141342.310 TX>
:read? [len=6]
<20130116141342.747 RX>
-1.90679400E+00 [len=15]
<20130116141342.942 TX>
:read? [len=6]
<20130116141343.317 TX>
:read? [len=6]
<20130116141343.380 RX>
-1.95230760E+00 [len=15]
<20130116141343.469 TX>
:read? [len=6]
<20130116141343.826 RX>
-1.99169699E+0ð
<20130116141344.006 TX>
:read? [len=6]
<20130116141344.165 TX>
:read? [len=6]

Until the timestamp 20130116141343.826 everything works fine, but afterwards i don't receive data anymore.

Does somebody know what the problem could be?

Thanks, Tom

Dale C
Keithley Applications
Keithley Applications
Posts: 2849
Joined: June 10th, 2010, 6:22 am
Country: United States
Contact:

Re: RS232 - no data read

Post by Dale C » January 16th, 2013, 1:49 pm

I ran this code for over an hour with no trouble.
*RST
*CLS
:conf:volt
:sens:volt:nplc 1
:FORM:ELEM READ, TST
For I -= 1 to 10000
:READ?
Read the data
Next I


this was with an RS-232 connection to the Model 2182A.
I changed the terminator to LF instead of CR and that seemed to help.
Also on the FORMAT Command I use the Timestamp.
this is not in the manual but I tried it anyway and it worked.
Give it a try. This will give you time as well as the reading.

Leitom
Posts: 2
Joined: January 16th, 2013, 5:23 am
Country: Austria

Re: RS232 - no data read

Post by Leitom » January 17th, 2013, 1:39 am

Thank you for your response!

I tried ":FORM:ELEM READ, TST" but i always get the syntax error -102, even when I just try ":FORM:ELEM TST", which should configure the timestamp as only output - or am I wrong?

I changed the terminator to LF, but I still get the same result. The program works for 20min, then uncomplete data (-4.43ø) is sent and afterwards I don't get a response at all. Is the configured terminator at the 2182 used as terminator for both the readings and the writings? I sent the command *RST with different terminators but it always worked. Does this mean that terminator is just important for the data read from the nanovoltmeter?

I use a Prolific Serial to USB converter, could this be the problem? Maybe the driver can't handle the uncomplete data?

Thanks again, Tom

Dale C
Keithley Applications
Keithley Applications
Posts: 2849
Joined: June 10th, 2010, 6:22 am
Country: United States
Contact:

Re: RS232 - no data read

Post by Dale C » January 17th, 2013, 12:22 pm

I was using a straight through serial cable to my docking station for my laptop.
I did not have much hope that the terminator change would help or the TST command.
But you never know.
So here is a far out thought... Can you use GPIB?

Post Reply

Return to “Nanovoltmeters”

Who is online

Users browsing this forum: No registered users and 1 guest