Page 1 of 1

RS232 - no data read

Posted: January 16th, 2013, 5:41 am
by Leitom

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:

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>
<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

Re: RS232 - no data read

Posted: January 16th, 2013, 1:49 pm
by Dale C
I ran this code for over an hour with no trouble.
:sens:volt:nplc 1
For I -= 1 to 10000
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.

Re: RS232 - no data read

Posted: January 17th, 2013, 1:39 am
by Leitom
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

Re: RS232 - no data read

Posted: January 17th, 2013, 12:22 pm
by Dale C
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?