alexm963 (Customer) asked a question.

Communicating with budget MODBUS RTU Modules

I picked up a handful of cheap RS485 relay modules on ebay and have been unable to connect to them with the CLICK. I can do everything on them with a USB-UART connection, but the CLICK receive command only returns an error. The COM port setup is correct. Is it possible the CRCis not coming through correctly? I've been trying everything I can think of and made no progress. I thought it may have worked once but have been unable to duplicate.


  • alexm963 (Customer)

    The error code doesn't return anything. The board is not communicating back to the PLC. I put a logic analyzer on the data lines and the PLC is sending the right bits. I'm guessing its mostly an issue with the cheap ebay board, but there's not a lot to work with as far as data sheets.

  • kewakl (Customer)

    Try swapping RS-485 signals.

    Try adding/subtracting 1 to/from the register address.

    Is there any register that has a known value. try to read that register first.

     

    What CRC does the relay module require?

    Are the modules RTU or ASCII? Any datasheet?

    • alexm963 (Customer)

      Tried swapping the A+/B- lines. No change.

      Tried adding 1 to the register address(it only uses the first address). No change.

      The CRC is the standard MODBUS16. RealTerm has no problem generating it for the UART connection.

      They are RTU. No real datasheet that I can find. These modules are made by bestep or eletechsup. There's a handful of YouTube videos on them. That's about it.

       

      I ordered a USB to RS485 adapter and will try working with them through that to make sure the 485 connection is functioning. If that works I'll still be at a loss though. They claim to be rated for 7-24VDC but maybe 24V is too much?

      Expand Post
  • OkiePC (Customer)

    This is a relay module. Is there anything to "Receive" from it aside from maybe port settings?

     

    Have you tried a "Send" instruction?

     

    Can you share a link to the actual hardware and/or manual?

  • OkiePC (Customer)

    What does your Click Programming look like?

     

    Using the link you provided along with this tool:

    https://rapidscada.net/modbus/

    I think we can determine how to set up the SEND and RECEIVE instructions in the Click to replicate those Modbus RTU requests.

    • alexm963 (Customer)

      At this point I'm certain that the Click is sending the command correctly. I put a logic analyzer on the data lines and they looked perfect. The Click is sending the exact same bytes that I have RealTerm sending over UART. The only difference is that the module doesn't send a response back to the Click, but it does through the UART.

      • kewakl (Customer)

        terminator character(s) correct? Not sure if that is implied by your 'I put a logic analyzer on the data lines and they looked perfect' comment.

      • alexm963 (Customer)

        Yes, the CRC at the end was also good.

10 of 16