Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling KE 2000 via USB->RS232 Converter

Hi all,

I have the following problem:

I have a simple reading-routine from a Keithley 2000 DMM which works fine when using the "native" comports of the Computer. When I connect the KE2000 to a COM-Port simulated by a USB(2.0) to RS232 Converter, however, it appears I can write to the DMM (there "bytes written" returned, and the DMM behaves like having received the command), but i cannot read anything from the DMM (timeout).
I checked all Port-related issues, like baud-rate, flow control, stop, data and parity bits and they are all the same like the "native" COM1. Anyone ever tried this and got it to work? Do I have to fiddle around with the Advanced settings of the port (like latency timer etc.)?

Any help would be greatly appreciated.

Dave
0 Kudos
Message 1 of 10
(5,839 Views)

I have used several USB-RS232 converters with KE2000 DMMs, some successfully & some not. It all depends on how well they obey the protocol. I generally disable flow control and do my own handshaking which I have found to be the most reliable.

Have you tried communicating with the instrument in MAX or with Hyperterminal?  An *IDN? will give you a good indication of what is going on.


Phoonzang wrote:
Hi all,

I have the following problem:

I have a simple reading-routine from a Keithley 2000 DMM which works fine when using the "native" comports of the Computer. When I connect the KE2000 to a COM-Port simulated by a USB(2.0) to RS232 Converter, however, it appears I can write to the DMM (there "bytes written" returned, and the DMM behaves like having received the command), but i cannot read anything from the DMM (timeout).
I checked all Port-related issues, like baud-rate, flow control, stop, data and parity bits and they are all the same like the "native" COM1. Anyone ever tried this and got it to work? Do I have to fiddle around with the Advanced settings of the port (like latency timer etc.)?

Any help would be greatly appreciated.

Dave



Tim Norris
"...and all this science I don't understand
it's just my job five days a week"


Using 6i, 7.0 & 7.1 on Win'98, 2K & XP
0 Kudos
Message 2 of 10
(5,833 Views)
Hi Tim,

i used Hyperterm and the MAX, but neither got a response, but did send the Commands. Do you know what Converters are best to use? Is USB1.1 or 2.0 better? And what do you mean by "own Handshake"? I just have "none" as Flow Control. Would there be any other way to have 8 COM-Ports on one Computer?

Dave
0 Kudos
Message 3 of 10
(5,828 Views)

The fact that the VISA Write returns the number of bytes written doesn't really tell if the instrument has received them correctly. You say that the instrument responds but the fact that Hyperterminal doesn't work is suspicious. I would assume that vendors of USB-RS232 converters test their products with Hyperterminal as a minimum. Make sure that your rx line in the serial cable is wired correctly. Try talking to the instrument with a regular com port.

I have a 8-port USB-RS232 converter from VScom that works perfectly.

0 Kudos
Message 4 of 10
(5,820 Views)


@Phoonzang wrote:
Hi Tim,

i used Hyperterm and the MAX, but neither got a response, but did send the Commands. Do you know what Converters are best to use? Is USB1.1 or 2.0 better? And what do you mean by "own Handshake"? I just have "none" as Flow Control. Would there be any other way to have 8 COM-Ports on one Computer?

Dave



What I meant was that I check the number of bytes available and read only that many. To aviod overflowing the input buffer on the K2000, I keep the length of the strings sent relatively short ( ~100 bytes) and insert a 1mS delay between them. I don't have exact details of how big the buffer is but I've found that the above works reliably.

If  you're not getting a response from Hyperterminal it's as Dennis has said; check the RX and TX lines are correctly wired. Also check that Flow Control is disabled on the K2000.

You can test if the USB-232 converter is working correctly by using a loop-back connector with TX connected to RX and RTS to CTS. Then if you type something in Hyperterminal you should get the same message back.

One other thing to chack. By default the K2000 is set to use GPIB, check to see that the RS232 is enabled. I'm sure you'e tried this already, but I'ts caught me more that once.

I've used both multiport converters and multiple single port converters without any problems, other than the fact that Windows changes the Serial Port number depending on which USB port they're connected to.

Tim Norris

"...and all this science I don't understand
it's just my job five days a week"


Using 6i, 7.0 & 7.1 on Win'98, 2K & XP
0 Kudos
Message 5 of 10
(5,807 Views)
Hi,

I built that connector an checked the port. In Hyperterm, I get a perfect feedback (every byte sent is received) so there seems to be a porblem wit hthe KE2000. I double checked everything on the DMM as well as the port settings under windows, they are correct. The USB-Converter allows me to specify the Latency time and the size of the send/receive-"Packages", however I really don't know what these sizes mean (and the documentation of the converters is quite bad).
When I send a ":MEAS?"-Command, the DMM behaves like doing a Measurement, but nothing is received.

Thanks everyone for the help, but I don't think I'll go on trying with these converters but just do something else...

Dave
0 Kudos
Message 6 of 10
(5,804 Views)


@Phoonzang wrote:
Hi,

I built that connector an checked the port. In Hyperterm, I get a perfect feedback (every byte sent is received) so there seems to be a porblem wit hthe KE2000. I double checked everything on the DMM as well as the port settings under windows, they are correct. The USB-Converter allows me to specify the Latency time and the size of the send/receive-"Packages", however I really don't know what these sizes mean (and the documentation of the converters is quite bad).
When I send a ":MEAS?"-Command, the DMM behaves like doing a Measurement, but nothing is received.

Thanks everyone for the help, but I don't think I'll go on trying with these converters but just do something else...

Dave


I'm afraid I've never had to play around with the latency/package size settings, so I can't help you there. In fact the converters I've used haven't let me change them.

I hope your other methods work out.

If you do find anything else out I would be interested in knowing.

Tim Norris

"...and all this science I don't understand
it's just my job five days a week"


Using 6i, 7.0 & 7.1 on Win'98, 2K & XP
0 Kudos
Message 7 of 10
(5,774 Views)
Hi again,

I now used a USB1.1->RS232-Converter, which had succes - for about 10 seconds. I could read out the *IDN? via th hyperterm programm, so i thought everything is ok. I started my labview-programm and for about 10 secs I had the righj behaviout, readings triggered by the ":MEAS?"-command, returning the proper values. After that short period, it hang again and shows exactly the same behaviour as above stated.
I turned everything off, disconnected the converter, reconnected it and tried the *IDN? again in HT. This time I received a "KEIT" and that's it. So as if the communication suddenly broke off. Now I'm really perplexed. Is there some kind of buffer settings I have to change with the Keithley?

Dave
0 Kudos
Message 8 of 10
(5,765 Views)

What speed do you use?

I have seen problems in the keithley 2000 above 9600 baud, and handshake is also a problem so start without.

 

 

greetings from the Netherlands
0 Kudos
Message 9 of 10
(5,760 Views)
I tried everything from 19.2k to 2400. Shows no different. Maybe I got something wrong with the termination characters? But then again, the "native" RS232 shouldn't work, either. I emailed Keithley about this problem (as the port works otherwise fine), maybe they know something.

Dave
0 Kudos
Message 10 of 10
(5,749 Views)