ABB Inverter(slave) + MAX485 + Arduino(master) : 0xE0 (ModbusMaster invalid response slave ID exception)

Thank you for the additional information. You should be able to achieve successful communications with this setup. Are you receiving an error when doing this? If so, what error? If not, what makes you believe communications is not successful? Please detail what you mean by, "There was no success."


I don't understand what you're trying to do by placing a jumper wire across the ends of R7. This shorts A and B together. Luckily, according to the datasheet, the MAX485 driver's are short-circuit current limited and it has thermal shutdown circuitry, otherwise you would have damaged the MAX485. There is no possible way this could have resulted in successful communication. Your indication of "connected" or "not connected" must not be reliable and is not providing you with the actual status of the RS-485 communication.


In order to identify where the problem lies, please follow my previous recommendation:
Please verify that the inverter is still successfully working using your computer, Modbus Poll, and USB/RS-485 adapter. Please also verify that the Arduino/MAX485 board are still successfully working using your computer, Modbus Simulator, and USB/RS-485 adapter.

Regarding connecting a MAX485 transceiver directly to your Arduino using a breadboard, you could certainly give this a try, but I doubt you will see any difference versus the MAX485 board that you've removed R7 from (assuming that board has not been damaged). If you do try this, you will need to have a pull-up resistor on the RO signal, since that output from the MAX485 is high impedance when RE is high. You may be able to simply enable an internal pull-up on the Arduino's RX pin in code:
https://www.arduino.cc/en/Tutorial/DigitalInputPullup

Thank you for responding!

After removing R7, I still get error E2 (timeout error).

Sorry, I also don't really understand what happened when connecting the resistor terminals, but what appeared in the serial was what I expected to get (figure 1).

To use only the MAX485 CI I need to put only one pull up resistor (10kohm), ok?

1608150198327.png
 
After removing R7, I still get error E2 (timeout error).
OK. This is different from the 0xE0 error you were originally getting. A timeout error is typically caused by one of two things (assuming hardware has not been damaged): wiring or configuration settings.

Please triple-check that you have your RS-485 +, -, and GND connections correct and the S1:1 on the inverter is in the OFF position. Try swapping the + and - wires, just in case you have them connected backwards.

Please also confirm that the following items match in both your Arduino code and the inverter's Modbus RTU parameters:
  • Baud Rate
  • Parity
  • Number of Stop Bits
  • Modbus Slave Address (i.e. address of the inverter and the address you're targeting in the Arduino's Modbus requests)
  • Request Timeout (Arduino only, make sure this is sufficiently high, for example try setting it to 1 second)

Sorry, I also don't really understand what happened when connecting the resistor terminals, but what appeared in the serial was what I expected to get (figure 1).
It's not possible for communication to work while the A and B lines are shorted together, but if you were making this connection while the devices were powered and then removed the jumper wire, it may have allowed communications to work momentarily. It would be more helpful if you could add debug printing to your Arduino program indicating when it transmits a request, the transmit buffer contents, whether a valid response was received or an error occurred, and the received buffer contents (if any).

To use only the MAX485 CI I need to put only one pull up resistor (10kohm), ok?
Yes, you should only need to add a pull-up to the RO/RX signal for communications to work. You can do one of the following:
1. Install a 10k ohm resistor between RO and VCC
2. Turn on the Arduino's internal pull-up resistor on its RX input pin
 
Yes, you should only need to add a pull-up to the RO/RX signal for communications to work. You can do one of the following:
1. Install a 10k ohm resistor between RO and VCC
2. Turn on the Arduino's internal pull-up resistor on its RX input pin

Hi.
I used only the MAX485 with the 10k resistor as you suggested, I had no results. Then just take the CI and connect it to the inverter (without polarization and termination resistors) and I managed to establish the communication (Fig 1).
This for 1 inverter. I have to put 3 inverters in an rs485 network and for that I think I have to insert the terminating resistor..this is my next step.
I thank you for all the time you spent helping me. Thank you!


1608572568519.png
 
I'm confused about what you did to get it to work. Please clarify so that others reading this that may have the same issue have a clear understanding of what you did wrong (and what they may be doing wrong on their own setup).

What's the difference between this:
I used only the MAX485 with the 10k resistor as you suggested, I had no results.
And this:
Then just take the CI and connect it to the inverter (without polarization and termination resistors) and I managed to establish the communication (Fig 1).
Could you please detail the connections you made, or better yet, share a drawing?

Regarding your other statement:
This for 1 inverter. I have to put 3 inverters in an rs485 network and for that I think I have to insert the terminating resistor..this is my next step.
This is not true, you do not need to install terminating resistors just because you have more devices on the bus. Only if the total length of the bus becomes very long (refer to my table in post #33).
 
I'm confused about what you did to get it to work. Please clarify so that others reading this that may have the same issue have a clear understanding of what you did wrong (and what they may be doing wrong on their own setup).
Hi, Sorry for the delay.
I made the connection between the inverter and the Arduino with a MAX485 integrated circuit (figure). I didn't modify the code.

1609844925383.png

I think one of the resistors in the module I used before was preventing the signal from reaching the arduino.

Thank you for your help!
 
The MAX485 CI has 8 pins. I connected them to the Arduino as follows:

VCC --- 5V ARDUINO
GND --- GND ARDUINO
A ---- A (D + INVERTER)
B --- B (D- INVERTER)
RI ---- RX1 ARDUINO
DI --- TX1 ARDUINO
RE --- PIN 2 ARDUINO
DE --- PIN 3 ARDUINO

THE CODE I USED IS BASED ON THE EXAMPLE OF THE MODBUS MASTER LIBRARY.
NO GREAT MODIFICATIONS WERE NECESSARY.
 
I think one of the resistors in the module I used before was preventing the signal from reaching the arduino.
I encourage you to confirm the exact cause of why it was not working previously. Without knowing what caused the failure, you cannot be sure that you've fixed it. It is likely that you will have the same issue again, unless you identify the cause and confirm that your solution resolves the identified issue.

If the only difference between your working configuration of the MAX485 chip by itself and the configuration of the MAX485 chip and a 10K resistor between RO and VCC, then I highly doubt the resistor is to blame (only a mis-wiring or wrong resistor value would cause a problem, or perhaps you already have an internal pull-up resistor enabled on the Arduino's RX pin).
 
The MAX485 CI has 8 pins. I connected them to the Arduino as follows:

VCC --- 5V ARDUINO
GND --- GND ARDUINO
A ---- A (D + INVERTER)
B --- B (D- INVERTER)
RI ---- RX1 ARDUINO
DI --- TX1 ARDUINO
RE --- PIN 2 ARDUINO
DE --- PIN 3 ARDUINO

THE CODE I USED IS BASED ON THE EXAMPLE OF THE MODBUS MASTER LIBRARY.
NO GREAT MODIFICATIONS WERE NECESSARY.
Thank you for the detailed connection description, however, you are still missing a common GND connection between the Arduino, MAX485, and the inverter.
GND --- GND ARDUINO --- GND INVERTER

Without wiring a common ground connection between all devices, you may see intermittent communication issues. This could lead you to (incorrectly) believe that other things are causing your problem, when in fact all of the communication issues were caused by not connecting ground references together. That being said, this type of issue is far more common in the field rather than on a test bench, since ground references in a lab environment tend to be at the same voltage potential, which is not necessarily true in the field.
 
Thank you for the detailed connection description, however, you are still missing a common GND connection between the Arduino, MAX485, and the inverter.
GND --- GND ARDUINO --- GND INVERTER
Hello. Sorry, but I connected all GND:

GND ARDUINO --- GND MAX485 ---- GND INVERTER
 
Top