3.7.2 Broadcast Behavior #2313
-
Hi, I'm updating to the latest version of pymodbus and have some questions about the api changes. From 3.7.x it appears broadcast_enable has been removed. However, I do not see in the docs what consequence this will actually have. Right now a broadcast message with broadcast_enable=True, will return quickly with the assumption that there should be no response. Without broadcast_enable, what is the new expected behavior? If I use slave_id=0, should it still return immediately or will there be a new behavior? How is it expected to use broadcast now? ** Also, it's noted in the docs that using broadcast is not advised. I wanted to share feedback that this general guidance is somewhat limited. In industrial applications right now there are many power control devices that advise from the manufacturer to use broadcast. For instance, if you are controlling several inverters in parallel and need to issue a power command, it is advised from many manufacturers to use broadcast so that all devices receive the command all at once. For example, there is a brand new inverter only designed and manufactured within the last few years that also keeps with this methodology. So there are definitely still use cases where broadcast is highly advised and actually necessary. Just because it is may be less common does not necessarily mean that "modern devices do not allow broadcast" or that it is "inheriently dangerous". Just as with any technology, it just should be used responsibly and with knowledge of the consequences. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Hi, I don't know why (like you I am not a pymodbus specialist) but I found this. Basicaly if the slave_id is 0, False, '' (empty string) or None, the response is None. I have wondered too. But there is a reason, for sure. --> So broadcast is always disabled. |
Beta Was this translation helpful? Give feedback.
-
Broadcast (slave=0) is part of the modbus standard and is not especially documented. Feel free to submit a pull request with a documentation update, if you want it documented. slave=0 returns imidiatly without waiting for a response. next version will return a response if there are any. all devices support slave=0, that is a demand to be modbus compatible.....however it is not recommended to use slave=0 for production, but merely for device detection. |
Beta Was this translation helpful? Give feedback.
-
Hi, Hopefully this is of any help, the Huawei Smartlogger is one of those devices that does reads over
https://support.huawei.com/enterprise/en/doc/EDOC1100050690 In if self.broadcast_enable and not request.slave_id:
resp = None
break In if not request.slave_id:
resp = None
break In the case of Thanks! |
Beta Was this translation helpful? Give feedback.
Changed on dev.