MODBUS comms query
Posted: Tue Dec 26, 2023 2:13 pm
Hi,
I am not sure if this is possible so just throwing it out there.
I have an industrial HMI which I can read data from the PLC's controlling my lighting. In the PLC all the registers have a MODBUS address so it is simple to just read the registers I need.
I am using a Raspberry Pi to read envoironmental things like temperature, humidity and power and thought it would be good if i could display these on the HMI.
I can see 2 issues here.
The HMI needs to read the data and here is the first issue, is it possible to create a variable (or array) and give it an address so the HMI can simply fetch it.
I have found the MODBUS TCP slave example but it seems like that is going to be a lot of work as each has to be processed individually, I may have 50 or so values. What I am hoping for is something where the registers can just be read without any extra code like what happens in the PLC.
Bob
I am not sure if this is possible so just throwing it out there.
I have an industrial HMI which I can read data from the PLC's controlling my lighting. In the PLC all the registers have a MODBUS address so it is simple to just read the registers I need.
I am using a Raspberry Pi to read envoironmental things like temperature, humidity and power and thought it would be good if i could display these on the HMI.
I can see 2 issues here.
The HMI needs to read the data and here is the first issue, is it possible to create a variable (or array) and give it an address so the HMI can simply fetch it.
I have found the MODBUS TCP slave example but it seems like that is going to be a lot of work as each has to be processed individually, I may have 50 or so values. What I am hoping for is something where the registers can just be read without any extra code like what happens in the PLC.
Bob