Author Topic: Problem connecting to 34401A using RS-232  (Read 2430 times)

0 Members and 1 Guest are viewing this topic.

Offline NaxFMTopic starter

  • Regular Contributor
  • *
  • Posts: 124
  • Country: it
Problem connecting to 34401A using RS-232
« on: September 16, 2022, 10:39:46 am »
Hi everyone, I've been trying for hours but I can't connect to my multimeter using the RS-232 interface.
I checked everything: the protocol settings, the settings on the multimeter, the null-modem cable, downloaded agilent utilities for connecting to dmms, used two PCs, verified with an oscilloscope that the signal is present, correct, and has correct voltage levels. Nothing, the multimeter doesn't respond to anything.
I'm using putty to send serial command and recieve no response when sending SYSTem:REMote command or *IDN? command.
Did I miss something? I'm really starting to think that there's a problem with the rs-232 interface in the multimeter...
Do you have any idea?

Edit: I had an "Eureka" moment and said "Of course! I didn't send the newline character!". Well, even with the newline character it doesn't work...
I really don't want to spend 100+ euro for a GPIB cable...
« Last Edit: September 16, 2022, 11:18:55 am by NaxFM »
 

Offline nightfire

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: de
Re: Problem connecting to 34401A using RS-232
« Reply #1 on: September 16, 2022, 11:56:04 am »
Hmm... using putty, I also had in systems with multiple COM-ports chosen the wrong one, or some other utility blocking the port.
Question: Do you see what you type, resp. is local echo=on?
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5169
  • Country: nl
Re: Problem connecting to 34401A using RS-232
« Reply #2 on: September 16, 2022, 12:02:42 pm »
Set the flow control to none, remove the connector from the meter and connect pins 2 and 3 together. Do you see the echo on the screen when you type something? If not, there is something wrong at the computer side or the cable. If you see the echo and it disappears when you remove the short between pins 2 and 3 then the pc/cable side seems fine. Are you sure that pins 2 and 3 are not reversed on the meter side?
Keyboard error: Press F1 to continue.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4936
  • Country: vc
Re: Problem connecting to 34401A using RS-232
« Reply #3 on: September 16, 2022, 01:19:45 pm »
When your dmm is set up to the rs-232 ("RS-232" shows up shortly during power-on on the display), you can see the measurement data coming out from the meter continuously on the single rs-232 connector pin - in form of an ascii string (as the first step in your debugging). Double check the speed setting as well.
« Last Edit: September 16, 2022, 01:26:07 pm by imo »
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2903
  • Country: 00
Re: Problem connecting to 34401A using RS-232
« Reply #4 on: September 16, 2022, 01:20:32 pm »
Another thing to try is different kinds of line termination characters: LF, CR, CR+LF.

Can you check the RS-232 signals with a scope to see if the 34401A is sending anything?

Offline robert.rozee

  • Frequent Contributor
  • **
  • Posts: 291
  • Country: nz
Re: Problem connecting to 34401A using RS-232
« Reply #5 on: September 16, 2022, 02:02:38 pm »
to tell the 34401A to output data continuously, you need to
(1) set the GPIB address to 31,
(2) tie the DSR pin (pin 6) on the RS-232 connector high.

once BOTH these conditions are met, the meter will output data continuously to the serial port. i would suggest setting the meter to 9600 baud - the highest available as i recall.


cheers,
rob   :-)
 

Offline NaxFMTopic starter

  • Regular Contributor
  • *
  • Posts: 124
  • Country: it
Re: Problem connecting to 34401A using RS-232
« Reply #6 on: September 16, 2022, 02:15:15 pm »
Thank you everyone!
Well, turns out that my USB-RS232 adapter which was sold as a crossover cable(the one required by the DMM) was not crossover at all, also i checked TX data on pin 3 instead of pin 2 because i messed up reading the wiring diagram, so i thought it was indeed a crossover cable...
Tomorrow I'll receive the new cable, hoping it will work without problems.

BTW, Amazon Italy is FULL of cables sold as null-modem with the wrong pinout, it's ridiculous. The only crossover cable with the right pinout cost 30 euro, double the price of all the other usb-RS232 adapters...
 

Online Hydron

  • Super Contributor
  • ***
  • Posts: 1020
  • Country: gb
Re: Problem connecting to 34401A using RS-232
« Reply #7 on: September 16, 2022, 02:55:39 pm »
I just went through the same process - any null modem cable you use must have DTR/DSR (pins 4 and 6) crossed over as well as the normal TX/RX crossover (2 and 3). The other lines (other than ground) don't matter, as they are not connected according to the service manual.

I found a local ebay seller who had a female-female null-modem adapter with a workable pinout published on the auction description (many don't have it listed), but another option which should work is StarTech.com's NM9FF (https://uk.rs-online.com/web/p/d-sub-adapters/1932832 pinout: https://sgcdn.startech.com/005329/media/sets/NM9FF_Manual/NM9FF_diagram.jpg). I didn't go for the startech one mainly because I didn't want the long adapter hanging off the back of the instrument in addition to the USB-RS232 device, as it would increase the chance of an accident breaking the DMM connector. If you use an extension cable then you can put the adapter in the middle, and this problem goes away.
« Last Edit: September 16, 2022, 03:00:48 pm by Hydron »
 

Offline NaxFMTopic starter

  • Regular Contributor
  • *
  • Posts: 124
  • Country: it
Re: Problem connecting to 34401A using RS-232
« Reply #8 on: September 16, 2022, 03:12:19 pm »
Unfortunately I don't have any pc with a serial port, so I have to use an USB adapter.
I bought the startech one, let's see how it goes...
 

Offline NaxFMTopic starter

  • Regular Contributor
  • *
  • Posts: 124
  • Country: it
Re: Problem connecting to 34401A using RS-232
« Reply #9 on: September 17, 2022, 03:27:23 pm »
Well, i received the new cable and now I am able to use remote operation.
I can change settings but i still have one huge problem: whenever i send a query the multimeter just sends a couple of characters and throws error 410. This is the manual explanation for this error:
Query INTERRUPTED
A command was received which sends data to the output buffer, but the
output buffer contained data from a previous command (the previous
data is not overwritten). The output buffer is cleared when power has
been off, or after a *RST (reset) command has been executed.

I tried everything: powering off and on, sending the reset command, nothing works.
I also tried address 31 to make the multimeter send continuously data over the serial port and it works just fine, so the output buffer should be ok i think.
I'm just starting to explore scpi commands, and i'm sure there's something obvious i'm missing here.

Edit: well, i wrote a little python script and now i can talk to the dmm no problem. The culprit was putty,  i suspect it may act on the control lines when it souldn't, and this confuses the DMM...
« Last Edit: September 17, 2022, 03:46:03 pm by NaxFM »
 

Offline Zoli

  • Frequent Contributor
  • **
  • Posts: 512
  • Country: ca
  • Grumpy old men
Re: Problem connecting to 34401A using RS-232
« Reply #10 on: September 17, 2022, 04:24:51 pm »
...
Edit: well, i wrote a little python script and now i can talk to the dmm no problem. The culprit was putty,  i suspect it may act on the control lines when it souldn't, and this confuses the DMM...
I don't know how relevant is for your situation, but here's my experience with 34401A&MTTTY: typed command doesn't get any answer, but the same command sent as text worked(34401A ver 10-05-02); I suspect there is a timeout between the received characters.
 

Offline HKJ

  • Super Contributor
  • ***
  • Posts: 2978
  • Country: dk
    • Tests
Re: Problem connecting to 34401A using RS-232
« Reply #11 on: September 17, 2022, 05:00:19 pm »
 

Offline NaxFMTopic starter

  • Regular Contributor
  • *
  • Posts: 124
  • Country: it
Re: Problem connecting to 34401A using RS-232
« Reply #12 on: September 20, 2022, 07:47:19 am »
This is great, thanks!
Extremely useful, i was going to write a python script to do a fraction of what your program does.
Thank you again!
 

Offline HKJ

  • Super Contributor
  • ***
  • Posts: 2978
  • Country: dk
    • Tests
Re: Problem connecting to 34401A using RS-232
« Reply #13 on: September 20, 2022, 07:59:39 am »
This is great, thanks!
Extremely useful, i was going to write a python script to do a fraction of what your program does.
Thank you again!

Remember to press F1 (To show some help) in the different forms and windows, not all functions may be obvious from a look.
The help will be shown in a browser and is a webpage on my website, you can also find all of the help pages from the intro page linked above.
 

Offline Fgrir

  • Regular Contributor
  • *
  • Posts: 164
  • Country: us
Re: Problem connecting to 34401A using RS-232
« Reply #14 on: September 20, 2022, 05:12:35 pm »
I suspect there is a timeout between the received characters.
If this is the problem you might try setting the PuTTY option for "Local line editing" to "Force on".  This should prevent it from sending any characters until you finish typing a line.
 

Offline Zoli

  • Frequent Contributor
  • **
  • Posts: 512
  • Country: ca
  • Grumpy old men
Re: Problem connecting to 34401A using RS-232
« Reply #15 on: September 21, 2022, 03:51:05 am »
I suspect there is a timeout between the received characters.
If this is the problem you might try setting the PuTTY option for "Local line editing" to "Force on".  This should prevent it from sending any characters until you finish typing a line.
Thanks for the tip, but:
1. It happened 10 years ago
2. I was using MTTTY not PUTTY
Next time when I will have to deal with the 34401A I will remember for sure  ;)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf