You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks a lot for this nice library! I am using it for a (very) simple Modbus master to test a RS485 network. So far all worked well. But now I want to send broadcast messages to all connected slaves, and it seems like nothing is sent (checked with oscilloscope).
Specifically in ModbusRtu.h line 55 mentions u8id=0 is intended for broadcast, but line 546 in Modbus::query() returns immediately if u8id==0.
Do I need to call a different method than query() for sending a broadcast and if yes, which one? For a simple example thanks a lot in advance! Have a great day :-)
The text was updated successfully, but these errors were encountered:
I need broadcast too. However, your changes didn't work for me.
I change the line 751 from:
if (au8Buffer[ ID ] != u8id ) return 0;
to
if (au8Buffer[ ID ] != u8id && au8Buffer[ ID ] !=0 ) return 0;
and now, the slave accepts 0 id as well.
Although, the slave processes all the funcions with this id (for example read holding registers), it returns response error not a valid one.
Maybe there is a better and concrete solution.
hello,
thanks a lot for this nice library! I am using it for a (very) simple Modbus master to test a RS485 network. So far all worked well. But now I want to send broadcast messages to all connected slaves, and it seems like nothing is sent (checked with oscilloscope).
Specifically in ModbusRtu.h line 55 mentions u8id=0 is intended for broadcast, but line 546 in Modbus::query() returns immediately if u8id==0.
Do I need to call a different method than query() for sending a broadcast and if yes, which one? For a simple example thanks a lot in advance! Have a great day :-)
The text was updated successfully, but these errors were encountered: