RS485 read failure

  • GiorgioT

    GiorgioT - 2017-03-20


    I'm trying to communicate with a TOSHIBA inverter through RS485.
    I use a SN75LBC184 (MAX485 equivalent) connected to RX/TX channels of the BBB through suitable 5v - 3.3v level shifters.
    I decided to control the DE/RE pins of the MAX485 in hardware, without enabling RTS/CTS pins of the UART, by means of NE555 as explained here:
    Unfortunately, Codesys returns RESPONSE_WRONG_SLAVE (see attachment) even if i'm always able to write the registers and spin the motor. Moreover the read function occasionally works fine and i can read the registers but the most of the time the read fails.

    Then, i adapted the RS485 shield for Raspberry Pi : to work with the BBB but i get the same exact results as above.

    I then tried that shield on a Raspberry Pi and I always read and wrote successfully all the registers.

    I also loaded the overlay BB-UART4-RS485-00A0 to control directly the MAX485 DE/RE pins through the P9.27 pin but it does not work either. I couldn't see any signal from P9.27 using an oscilloscope.


    IMG: Screenshot (166).png

  • boldive

    boldive - 2017-03-21

    you have declared Modbus_Slave under Modbus_Master. Under one port it can be Master or Slave, not both. I am not sure it this is the right way to do it.

  • GiorgioT

    GiorgioT - 2017-03-24

    Hi, it should be the right way. My BBB is the master wired with N. slaves along the bus.
    Anyway i solved using a MAX13488E with AutoDirection Control.



Log in to post a comment.