LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 to USB with Agilent 34401A and E3631A

Solved!
Go to solution

Hi,

 

I'm fairly new to labVIEW and I'm trying to get a few instruments to work. The instruments are a DMM Agilent 34401A, a Programmable DC load BK precision 8500 and a power supply Agilent E3631A. 

 

All of them have RS232 output, so I use converter cables to USB. The BK precision one has its own converter and for the other 2 I use this converter:

https://www.conrad.nl/nl/aten-usb-11-adapter-1x-d-sub-stekker-9-polig-1x-usb-11-stekker-a-zilver-989...

 

I also use a gender changer between the RS232 port and the cable on the Agilent instruments. The problem is that the communication to these machines dont seem to be working, even though i have installed all drivers and the latest labVIEW 2016 and NI VISA. 

 

When I open NI MAX and open the VISA test panel of an instrument the write function of *IDN?\n works fine, but the read times out with the following error:

VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.

 

The instrument settings, baudrate, parity etc. , all correspond to the values I've set in MAX. The other thread suggested using Tera Term or HyperTerminal to check the connection. I've tried both programs, and they both succeed in establishing a connection to the instruments, but neither receive a response from a command *IDN?\n or *IDN?\r . 

 

The BK precision instrument works fine with the software they deliver with it. I would appreciate all the help i can get.

 

Kind regards,

Thomas

 

 

0 Kudos
Message 1 of 14
(13,372 Views)

If you are not getting a proper responce to a *IDN? then your serial setting are wrong or your physical connection is wrong. Don't even consider moving on until you can at least get a proper *IDN? responce.

 

Things to check:

Serial settings: Baud rate, parity, start bits, stop bits, etc.. (read the manual)

Physical Connection: Are your instruments serial ports DTE or DCE? (read the manual)

Computers are DTE,  connecting DTE to DCE require a straight through cable, connecting DTE to DTE or DCE to DCE requires a null modem cable. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 14
(13,357 Views)

Also beware of cheap USB to serial converters, many of these have counterfeit Prolific chipsets in them. 

 

Recent Prolific drivers can detect the counterfeit chips and either not work at all or worse yet cause intermittent failures.

 

http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=155&pcid=41

 

I recommend only buying FTDI USB to Serial converters from a reputable source like Digi-Key.

https://www.digikey.com/product-search/en/cable-assemblies/smart-cables/1574108?k=FTDI

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 14
(13,355 Views)

Thanks for your reply!

 

I checked all serial settings in the manuals and they seem fine for the agilent instruments. The BK precision provides you with a TTL to USB connector and warn you about connecting a normal RS232 connector, so maybe its a different protocol? As i said, the software they delivered with it works fine. 

 

Furthermore, both agilent machines are DTE. So I might have the cabling wrong then?

 

 

0 Kudos
Message 4 of 14
(13,334 Views)
Solution
Accepted by Thomas43333

Oops I made a mistake above.

Connecting DTE to DTE or DCE to DCE reqires a null modem cable and we use a null modem cable on our Agilent 34970's, so chances are that's what you need too.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 14
(13,328 Views)

One more thing to watch out for.

 

HP/ Agilient (Now Keysight) instruments ship from the factory set to use GPIB as the communications interface.  You need to manually (From the hard fromt panel) set those devices to use RS 232

 

And, just for completeness, that BK Precision adaptor converts to IET-232 not RS-232  IET-232 is a simillar serial protocol but it is NOT compatable with your everyday RS-232 port.  Do not ask me why BK decided to use a propriatary protocol.  They just did.


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 14
(13,314 Views)

Is the protocol for labVIEW with IET-232 different than RS-232? As in, what do i need my VISA settings to be to be able to talk to this instrument?

 

And for the NULL modem. Is it another cable, or is it an adapter I could purchase?

0 Kudos
Message 7 of 14
(13,275 Views)

@Thomas43333 wrote:

Is the protocol for labVIEW with IET-232 different than RS-232? As in, what do i need my VISA settings to be to be able to talk to this instrument?

 

And for the NULL modem. Is it another cable, or is it an adapter I could purchase?


Probably not as long as you are using their adaptor and VI's

 

A null modem cable and be a cable or an adaptor.

 

http://digital.ni.com/public.nsf/allkb/1EE0DD8AF67922FA86256F720071DECF

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 14
(13,248 Views)

Alright! Will try to communicate with a null modem in between.

 

If the BK precision should work, what could be the problem then? I use their adaptor.

0 Kudos
Message 9 of 14
(13,236 Views)

Thanks all! Got the Agilents working with a null modem inbetween. The BK was working all along with its own adapter. However, it needed a different protocol which they have implemented in labVIEW, and MAX does not know it, that's why i got errors.

0 Kudos
Message 10 of 14
(13,200 Views)