RS485 read failure

GiorgioT
2017-03-20
2017-03-24
  • GiorgioT - 2017-03-20

    Hi,

    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:
    http://www.mcmajan.com/mcmajanwpr/blog/2014/01/20/arduino-e-rs485/
    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 : https://www.sparkfun.com/products/13706 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.

    Thanks.

    IMG: Screenshot (166).png

     
  • 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 - 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.

    Thanks.

     

Log in to post a comment.