How to wire 3 Wire Modbus RTU to PC DB9

Hi:

I am working with a manufacturer that uses a custom DB15 connector. Their documentation lists 3 pins for the RS485 signal used for Modbus RTU: RS485 "+", RS485 "-", and RS485 GND. My question is how do I wire this to a DB9 that I will connect to a PC (running Windows in one use case and linux in another)? It looks to me like on the DB9, I want to wire pin 2 to the RS485 "+", pin 1 to the RS485 "-" pin, and pin 5 to the RS485 GND. Can anyone here confirm that as being correct?
 
What device has the DB9 connector? Your PC? A USB to RS-485 converter?

DB9 is more commonly used for RS-232. You cannot directly connect RS-485 and RS-232 together.
 
An RS-485 interface has never been 'standard' on a PC, it would be an added card. That card would have the wiring for the connector or terminal screws. Terminal screws tend to be more common for RS-485.

DB-9 was the standard connector for RS-232 for the 'standard' serial port back when a serial port was a standard, before it was abandoned in favor of USB.

There is no industry convention for the labeling of (+) and (-) driver lines for RS-485. Some vendors do it one way, others reverse polarity of the former. So you can start with (+) to (+) and (-) to (-), but if the labeling is reversed, then the communications will not work, you'll pull your hair out wondering why not and finally swap the driver lines on one end and discover that it works the other way around.

Are you sure the DB-9 is RS-485 and not RS-232? If it is, you'll need an RS-232/485 converter. Some converter models come with a DB9 connector.

As to custom DB-15 wiring, Amazon has a DB-15 male connector with a terminal strips internally for custom wiring. Google shows a number of sources for solder DB-15 connectors; I assume the 'shells' are still available.
 
Thanks. Sounds like some trial and error will be needed. The DB9 is a standard linux COM port. I've picked up DB-15 breakout box, DB-9 breakout box, and an RS-485 to USB converter. Hopefully, I can get it to work. I might also try a Modbus RTU to Modbus TCP/IP converter, but want to keep down the number of gadgets in the mix.
 
I'm sorry, but what does the statement, "The DB9 is a standard linux COM port." mean? Linux is an operating system. It is software. The PC may have a DB9 connector. If that's the case, is the DB9 connector built into the motherboard of the PC (likely meaning it's an RS-232 port on an old PC, as DB9 connectors are no longer included on modern PC's) or is the DB9 connector on some sort of adapter (such as a USB to RS-232 adapter)?

Either way, it seems like your DB9 is more than likely RS-232. Therefore you will need to use a RS-232 to RS-485 adapter in conjunction with your DB-15 breakout box (you shouldn't need a DB-9 breakout, since the RS-232 connection on RS-232 to RS-485 adapter will likely be a DB9 connector).
 
Or, since you now have a RS-485 to USB converter, forget the DB9 port entirely and just use the RS-485 to USB converter and DB-15 breakout box to make the connections (+ to +, - to -, and GND to GND).
 
Top