RS485 Pinout when using PyModbus

I am trying to control a RS-485 RTU device (Love 16C-3) using a Python script (pymodbus library) that runs on a Windows 10 PC. The hardware is connected to the computer using a USB-RS232(http://www.kynix.com/Parts/3903714/RS232-GM-355.html) cable.

In my initial test, the Python script is not able to read anything off the RS-485 device.

What is the RS-485 pin out for the DB9 connector?
Should a USB-RS485 cable be used instead?
closed account (1vRz3TCk)
You need a USB to RS485 converter.
RS-232 and RS-485 are two different specification's.

RS-232 is 3 wires full duplex hardware, with 1 receive and 1 transmit wire, and one logical ground. The signal levels are 3V to 15V for a low bit and -3V to -15V for a high bit. Any voltage levels outside of these is not valid.

RS-485 is 2 wires half duplex hardware, receive and transmit both use the pair of wires. Wire A is the normal signal and wire B is the inverse signal. RS-485 does no have defined signal voltages as it uses the differential between A and B to determine the bit. There must be at least 200mV differential between the two wires to count as a valid bit.

You probably need to buy a USB-RS485 virtual com port, they're not too expensive. Personally I recommend FTDI, we use them a lot at work and haven't had much issue with FTDI but we have with other companies chips.

Once you've got that you need to get your serial settings correct and try talking to your device.
Best of luck :)
Last edited on
closed account (1vRz3TCk)
RS-232 is 2 wires full duplex hardware...
RS-232 has a minimum of three wires for full duplex. A two wire setup could be used if the data is only to flow one way.
CodeMonkey wrote:
RS-232 has a minimum of three wires for full duplex.

Quite right... I've updated my post to include a logical ground too.
Topic archived. No new replies allowed.