Activity Forums Questions & Troubleshooting Hardware RS486 and MODBUS RTU

  • RS486 and MODBUS RTU

     Lukas updated 3 years, 8 months ago 3 Members · 6 Posts
  • r_merc

    March 8, 2020 at 12:39 am

    I am trying to run the Example Code and am not getting the slave Controllino Maxi Pure to respond to the master Maxi Pure. I can’t figure out what I am doing wrong.

  • r_merc

    March 8, 2020 at 7:14 pm

    I was reading and I came across this. So are they talking about modifying Modbus.h?

    “Modbus Master-Slave library for Arduino (ModbusRtu.h) was taken from the website:

    It was necessary to modify setting of the PORTJ for pins DE and RE control. These pins are located at the PORTJ and on the pins PIN6(DE) and PIN5(RE).”

  • r_merc

    March 12, 2020 at 12:05 am

    I added some troubleshooting lines to the slave code and discovered that when the line

    ControllinoModbusSlave.poll(ModbusSlaveRegisters, 8);

    is called that the controllino resets and starts the sketch again. Sometimes it will run through the loop 2,3 or 4 times and then start over.

    Anyone have any ideas why that would be happening?

  • r_merc

    March 22, 2020 at 4:55 am

    OK here is a new twist on this. If I remove all the digitalWrite() form the sketch I can get the Mast and slave to communicate. With the digitalWrite in the Slave the communications fails. Any Ideas?

  • gmartinez

    April 22, 2020 at 12:16 am


    I Had the same problem, I tried to use ControllinoModbusSlave, and others libraries, without luck, I check the Controllino.h and found this two functions:

    void Controllino_RS485TxEnable( void );

    void Controllino_RS485RxEnable( void );

    the question is, can I use thos funcitions to enable RS485 data transfer?

  • Lukas

    August 10, 2020 at 12:45 pm

    Hello r_merc – sorry for the late reply. Have you resolved the issue, please? It seems to me that one of the outputs was connected to ground and then the digitalWrite() caused short circuit and device reset.

    Hello gmartinez – yes, these API is for the RS485 direction control. Please see our latest RS485 example here.

Viewing 1 - 6 of 6 replies

Log in to reply.

Original Post
0 of 0 posts June 2018