ModBus info
#1442
Replies: 1 comment 5 replies
-
Our current implementation offers API to communicate with Modbus clients. Nothing on server. On the second part (about conversion from double value to byte arrays) this has nothing to do with C#. You should look into Modbus specs and learn how that's supposed to be implemented. Sensors outputting float values are absolutely common, so this has to be there. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks!
Hi have a few question regarding current Modbus implementation for nanoframework, if there is someone that can help me. First is - is there a way to dynamically define a device ID on the network (all nanoframework devices like esp32, a master and a few slaves)? Using a scan function, maybe using MAC address in the process or something similar? I'd sure would like to have so more elaborate examples in Modbus folder. Second - I have trouble understanding how to implement a ModBus Device, since modbus client have a function ReadHoldingRegisters that returns short[], but the Device implementation can have an overload function TryReadHoldingRegisters that has only a short as an out parameter, not short[]. I would like to return a sensor info which is a double. Is there a way of how to do that? I guess the way would be to convert double to short[] but there is no function to overload in this regard... maybe I'm just not understanding how it suppose to work.
kind regards, martin
Beta Was this translation helpful? Give feedback.
All reactions