RS232 ASCII Works in HyperTerminal but Garbage Data with CompactLogix

vv1s34ss

Member
Join Date
Jul 2012
Location
Maine
Posts
8
Hello,

I am trying to communicate with a resistance tester that will allow me to read the current resistance being tested via RS232. In order to get the current resistance reading, all I have to do is send any character to the device and it will reply with 5 character (numerals) plus a decimal point. The resistance reading take the for 'xx.xxx' (no delimiters)

The settings for the serial port are 9600,N,8,1. When I try communicating with the device in Hyper Terminal, I get the data back that I am expecting. Anytime I type any character on my keyboard I will immediately get a response of the form "xx.xxx " (it looks like there is a space between readings but it may just be Hyper Terminal appending this).

I am using a CompactLogix L32E controller to attempt to communicate with this device and I'm not getting anywhere. At first, I was using a 2 channel 1769-ASCII module to communicate with the device but was unable to get any response back.

I switched to using the on board serial port of the L32E and I am able to get 7 characters back from the device but they are bogus. A reading of 04.618 in Hyper Terminal shows up as $BF$B7$AF$B7$BB$BF when I use the PLC to communicate with the resistance tester. I assume that the $AF is representing the decimal point because it takes a different form than the other characters. But $AF is not even close to $2E which is the ASCII code for a decimal point.

I have tried changing a whole host of settings under 'user protocol' and 'system protocol' as well as changing the number of data bits to 7 (which gives '?7/7;=?'). I have set termination and append characters to null.

The others thing I have tried are:
- Changing control ine handshaking to full and half duplex
- Various different baud rates, parity bit settings, and stop bit settings
- Turning on 'XON/XOFF' and 'Echo Mode'
- Trying all three different 'Delete Mode' settings

Can anyone point me in a direction that may help???

Thanks!
 
Usually, "garbage" characters come from framing errors, like the wrong data rate, wrong number of data bits, or wrong parity. I realize you've double-checked this, but it's still the main issue, most of the time.

I suggest trying a more "hands on" serial terminal, like Tera Term or RealTerm (my favorite). RealTerm, especially, allows you to see the actual incoming and outgoing hex values or ASCII characters or both.

Does the resistance tester require a specific trigger byte, or will it respond to any serial input at all ?
 
Yes, I have written code to grab the characters from the 232 input buffer and it works (I have tested this with Hyper Terminal). However, as I indicated, I am receiving garbage data (characters I don't expect and that don't match what I have seen using Hyper Terminal).
 
It will respond to any character at all. It's a very simple/crude interface. I will check into the tools you have suggested and see if I can glean anything from them. Thank you!
 
Just an observation:

If HyperTerminal returned 04.618, the hex for those ASCII characters is
30 34 2E 36 31 38

The hex BF B7 AF B7 BB BF string is extended ASCII (decimal values > 127 or hex >7F), which is some sort of graphic symbols.

If the leading 1 of the 8 bit extended ASCII characters is stripped off, [where B (1011) becomes 3 (0011)], the string becomes
hex 3F 37 2F 37 3B 3F
which translates exactly to what you saw for the 7 bit ASCII: ?7/7;?

I'm stumped as to why you don't get characters whose hex values are in the 30's (the numerals) 30 34 2E 36 31 38.
 
I am stumped too! I am using RealTerm right now and seeing the same results I saw in Hyper Terminal. I am not quite sure if there is a different here but I am using a USB to Serial adapter to allow for my computer to communicate to the resistance tester.
 
Just a hunch -

Can you detail the exact function and pinout of the connector on the 'resistance tester' (or a link to its specifications) the cable with which you connect from it to the USB/RS232 adapter and the cable from the tester to the serial port on the PLC?
 
Snip...
I switched to using the on board serial port of the L32E and I am able to get 7 characters back from the device but they are bogus. A reading of 04.618 in Hyper Terminal shows up as $BF$B7$AF$B7$BB$BF when I use the PLC to communicate with the resistance tester. I assume that the $AF is representing the decimal point because it takes a different form than the other characters. But $AF is not even close to $2E which is the ASCII code for a decimal point.
End Snip...
I don't know if you found a solution for this or not. I don't know about the CompactLogix, however, a few years ago I had a similar problem with a SLC500. The data garbage was repeatable so I wound up using the SWAP, MVM, ADD, and SUB instructions to manipulate the garbage values to get to the correct values.
 
I have tried to see if all of the character's binary codes are off by the same amount but it doesn't look like there any consistency between character (i.e I can't just subtract a constant from them all or swap bytes on them all and the data comes out the way I need it to). Hopefully I will have some luck with the Rockwell folks helping me.
 
Here is the tech data for the resistance tester:
http://www.ohmmeters.biz/5060XRManual.pdf

The USB to Serial cable is from RadioShack and I believe it is this model (pin out is not provided): http://www.radioshack.com/product/index.jsp?productId=3120513

Finally, the cable that was made by our electricians is a straight through cable with pins 7 and 8 jumpered on the PLC end of the cable (as suggested in the Rockwell documentation). Even if these pins are not jumpered, I get the same data results.

Thanks!
 
As the port on the resistance meter follows the same pinout as a standard port, as do the AB processors you need to use a null-modem wired cable, not a straight through cable.

Note this from the meter documentation:

A three-wire link between the resistance tester and a computer can be made through the RS-232 port. This is a standard null-modem connection
 
Last edited:
As the port on the resistance meter follows the same pinout as a standard port, as do the AB processors you need to use a null-modem wired cable, not a straight through cable.

Note this from the meter documentation:


When I use a Null Modem cable, I just get an echo back of what I am sending. I took the "standard null model configuration" to mean a null modem was not needed which it looks like is correct.

Any other thoughts?
 

Similar Topics

Hi to everybody. I need to read the first 12 characters of the message that a barcode reader sends to the ascii card (1734-rs232 ascii) and I...
Replies
8
Views
685
Hello, I have a linear actuator set up (2 Ewellix linear actuators with hall effect sensor encoders) and an SCU control unit with RS232...
Replies
4
Views
2,082
Hi, I'm new into AB controllers and I'm trying to find how to handle rs232 communication on slc 05/4. I know that I need to configure channel 0...
Replies
5
Views
3,035
Hi, Guys I'm trying to upgrade a device witch comms is thru a RS232. The PLC is a Compactlogix L16ER to a remote PIO 1734-AENT then on this PIO a...
Replies
22
Views
8,157
Hello, I am an apprentice and ee student and I have been trying get a slc 5/03 to report temperature data and system status history at a fixed...
Replies
6
Views
3,454
Back
Top Bottom