0
votes

I'm trying to establish Modbus RTU connection (for learning purposes) between two PC's (Win10). I'm using two USB to RS485 converters (D- connected together and D+ also connected together). This converters are connected to USB2.0 ports.

USB to RS485 converter

So I'm using "Modbus Poll" and "Modbus Slave" from "modbus tools". First computer act as slave and has the following settings: Slave configuration Slave definition

Second computer act as master and has following settings: Master configuration Master definition

And my problem is, everytime i get "Timeout error": Timeout error

So, what I'm doing wrong? I'm pretty sure converters are not damaged, because Win10 detecs them.

After all I just want to send simple value to another computer (via Modbus RTU) :) Thanks

2
Have you verified that your RS485 connection is working? I would start by checking that using a terminal (I generally use putty) at both ends and verifying that a keypress at one end is displayed at the other end. This will confirm that your adapters/wiring/drivers are OK. - Brits

2 Answers

0
votes

you need to install proper drivers.i used following link which includes a how to video as well as download link for the drivers .

0
votes

Well, this is not a real answer but I can provide some debugging suggestions.

  1. In the past, I had problems with that RS-485 hardware you're using. It didn't work and I'm not sure why. The one I have uses a strange logic to drive DE pin of the MAX485. If I remember correctly, it inverts the TX line coming from CH340G using a NAND gate and feeds it to DE pin. I'm not sure if it was the problem, but I don't think it's a good design.

  2. You may need pull-up and pull-down resistors on RS-485 lines to prevent it from floating when no driver is driving the bus. Some converters include them internally. Also, you may need 120 ohm termination resistors on both ends.

  3. Instead of working with RS-485, you can simply use TTL logic for testing purposes. Use two USB-TTL converters, connect TX to RX (cross connection).

  4. When debugging communication buses (USART, SPI, I2C etc.) always use logic analyzers. Even the cheapest one saves hours of debugging time.