Forum Replies Created

Viewing 1 - 5 of 5 posts
  • r_merc

    Member
    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?

  • r_merc

    Member
    March 22, 2020 at 3:01 am

    I have a similar set up and one Maxi is com 4 and the other is com 3. Sounds like what you are doing is correct.

  • r_merc

    Member
    March 22, 2020 at 3:01 am

    I have a similar set up and one Maxi is com 4 and the other is com 3. Sounds like what you are doing is correct.

  • r_merc

    Member
    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

    Member
    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: https://github.com/smarmengol/Modbus-Master-Slave-for-Arduino

    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).”

Viewing 1 - 5 of 5 posts