Hello friends,
I need help regarding Modbus protocol when dealing with multiple slaves. Even though I am new to Modbus, I have read the documentation and I understand how it is supposed to work.
My question is how do I interpret the data I receive from slaves inside my PLC program?
Additional information:
I have written a PLC program for Schneider M241 PLC using SoMachine v4.1 and it has been working as intended from when it was commisioned.
Now, the customer has installed a couple of PM5100 multifunctional meters and wants to have live feed of measurements to SCADA. From what I understand, given the equipment I have, the only possible to do this is by linking the meters to my PLC via Modbus, then have the SCADA read the data from PLC memory.
I have configured the Serial Line 2 and Modbus as seen in the attached pictues.
Now, how do I actually read the data from slave? After some investigation I've found out that I should probably be using the Read_Var function block. (pic is attached.)
How do I configure the slave adresses individually?
Do I need a separate rung with a separate Read_Var for each slave?
Where in PLC memory do the read values end up so I can access them?
Hopefully I have managed to explain my problem sufficiently. Please do tell if I need to provide more additional information.
Best regards!
Tarik
Edit:
I have already downloaded the Modbus table of registers for PM5100 so I know which registers I should access regarding the measurements I want to be read.
I need help regarding Modbus protocol when dealing with multiple slaves. Even though I am new to Modbus, I have read the documentation and I understand how it is supposed to work.
My question is how do I interpret the data I receive from slaves inside my PLC program?
Additional information:
I have written a PLC program for Schneider M241 PLC using SoMachine v4.1 and it has been working as intended from when it was commisioned.
Now, the customer has installed a couple of PM5100 multifunctional meters and wants to have live feed of measurements to SCADA. From what I understand, given the equipment I have, the only possible to do this is by linking the meters to my PLC via Modbus, then have the SCADA read the data from PLC memory.
I have configured the Serial Line 2 and Modbus as seen in the attached pictues.
Now, how do I actually read the data from slave? After some investigation I've found out that I should probably be using the Read_Var function block. (pic is attached.)
How do I configure the slave adresses individually?
Do I need a separate rung with a separate Read_Var for each slave?
Where in PLC memory do the read values end up so I can access them?
Hopefully I have managed to explain my problem sufficiently. Please do tell if I need to provide more additional information.
Best regards!
Tarik
Edit:
I have already downloaded the Modbus table of registers for PM5100 so I know which registers I should access regarding the measurements I want to be read.
Last edited: