RS-232 adapter wired incorreclty, trying to figure out why it worked intermittently

defcon.klaxon

Lifetime Supporting Member
Join Date
Feb 2015
Location
Far NorCal
Posts
616
Hey guys, I've been working on a couple of systems that were originally programmed and integrated by another programmer at a different business. At one site, radio problems have been occurring for a couple of years and excuses ranged from interference from PG&E switching stations to some malcontent citizen to marine radios from the nearby lake. After seeing nothing to suggest any of those things with my spectrum analyzer, I suggested we take a look at the RJ45 to DE9 adapter needed to plug the PLC into the radio. Sure enough, it was wired incorrectly! TxD, RxD and GND were ok but the flow control lines were incorrect as follows:

Pin 1 of dsub - should be DCD, was actually RTS
Pin 2 of dsub - should be RxD and was correct
Pin 3 of dsub - should be TxD and was correct
Pin 4 of dsub - should be DTR, was actually CTS
Pin 5 of dsub - should be GND and was correct
Pin 6 of dsub - should be DSR, was actually DTR
Pin 7 of dsub - should be RTS, was actually DCD
Pin 8 of dsub - should be CTS, was actually +5VDC
Pin 9 of dsub - should be RI, was not connected

I'm reading up on the RS-232 flow control protocol, but was wondering if one of you were well versed enough to see what was mismatched here and describe how the radios would work intermittently. It would seem that the data would be transmitted and received only when everything just happened to be "right" on the flow control, but with CTS being injected with +5VDC and thus always being asserted, it seems a miracle it would ever work at all.
 
That doesn't surprise me. The first thing to remember that RS232 only requires 3 connections.
Rx Receiver Data
Tx Transmitted Date
and GND Ground
All the rest of the connections may or may not be required depending on the software driver used.
I have made up and used many 3 wire RS232 cables
Some software needs controls to communicate
look it up to see the designation for each.

Also RS232 is designed for one to one connections while RS485 is designed for multiple drops. RS232 uses 5Vdc as the signal level and the RS485 us designed for 12Vdc signal. I have seen RS485 work well on 5V and at other times it will not. I have also seen RS485 setup to work with 24Vdc signal level They use higher levels for longer wire lengths
Rs232 was designed for a wire length of 50' while RS485 is designer to for a wore length of over 1000' and can be even longer with slower baud rates.
 
What Protocol was you using (Xon/Xoff or Hardware Control) if you was using Xon/Xoff you only need 2-3-5 because the software will control the flow.

Now if you was using Hardware Control, I don't see how it could have ever worked!


But if Flow is controlled by hardware you would need 2-3-5-7-8 sometimes you can jumper 7-8 but that's usually only good at a slower baud rate.
 
I would change everything to no flow control if possible to get away fro the headache also knows as flow control.
 
RS232 uses 5Vdc as the signal level and the RS485 us designed for 12Vdc signal.

Hi Gary, is there a change you have your voltages to protocols swapped? I thought RS-232 was +3 to +15 V for a 0, and -3 to -15V for a 1. I happened to be looking into RS-232 last week for an unrelated personal project involving an Arduino, and level shifters are required for the Arduino's outputs to match RS-232. Maybe I'm missing something?
 
Update to those asking about flow control: project in question is a SCADAPack and a Teledesign TR4000 radio. SCADAPack is set for Half Duplex, 9600 baud, 8 data bits, no parity, one stop bit, Rx flow is Modbus RTU, Tx Flow is none. I didn't grab the radio settings but since the SCADAPack is DTE I figured that is where the important settings are.
 
Pin 8 of dsub - should be CTS, was actually +5VDC

with clear to send always on you may have been seeing some successful handshakes. When i make my own db9 cables, i pin rx to tx and vise versa, ground to ground, jump 1,4,6 together, and jump 7,8 together. forget about 9. That takes care of handshaking regardless of software settings.

https://www.electronics-notes.com/a...ommunications/rs232-signal-voltage-levels.php


also see below for a visual of 3 wire null modem cables as i described above. Its handy if you ever need to make a db9 to db25 adapter

https://retired.beyondlogic.org/serial/serial.htm
 
Last edited:

Similar Topics

New plc programming computer has window 10 pro 64 bit and tried USA-19hs adapter but drivers are not up to snuff (no signature no whql certified)...
Replies
14
Views
3,532
I have a project to upgrade an old 1756-L55 to a newer CPU. The customer wants added functionality and the old CPU is limited to RSL v16. The...
Replies
5
Views
2,114
I have a bunch (20+) of Yaskawa GS5 inverters and would like to connect them to our modbus network. Unfortunately, they only have native RS-232...
Replies
6
Views
2,213
Hello all, I am looking to get Serial-to-USB adaptor. I have heard they might cause problems. Any recommendations? Thank you!
Replies
20
Views
6,953
The local connection tab, in Set PG/PC interface doesn't appear in PC Adapter MPI and in PC Adapter Profibus. It only works with usb pc Adapters...
Replies
0
Views
2,017
Back
Top Bottom