Hi everyone! I have been struggling with making my Modicon M241 PLC to act like a MODBUS TCP server. Using a modbus TCP master simulator, I am able to read and modify Holding registers but when I try to read INPUT registers, a modbus message timeout error is displayed.
For making it act like a Modbus TCP server, I have added ModbusTCP_Slave_Device block to the Ethernet section.
I have configured the IP addresses and stuffs. What else do I need to configure other than this to enable reading of input registers from PLC?
PS: I have been configuring the settings using SoMachine software.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using a standard PLC_communication library (schneider electric) that operates with a READ/WRITE_VAR functionblocks. These can read write data on other modbus tcp devices in the network. You can set the type of register that you want to read/write along with an quantity and where to start.
gr Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
tom vg hat geschrieben:
Hello Somachine user
I'm using a standard PLC_communication library (schneider electric) that operates with a READ/WRITE_VAR functionblocks. These can read write data on other modbus tcp devices in the network. You can set the type of register that you want to read/write along with an quantity and where to start.
gr Tom
Hello Tom!
I think I wasn't clear. I want my PLC to act like a MODBUS TCP SERVER i.e. other TCP devices to read its holding and input registers, not the other way round. How to go about doing that?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Zitat:
I want my PLC to act like a MODBUS TCP SERVER i.e. other TCP devices to read its holding and input registers
In my case i have 2 TM251MESC that communicates with modbus tcp to each other. They both can act as a server depending on the fb that you are using to read or write data in plc 1 or 2. There is nothing special to setup for this only implement the FB and set how many data you want to read.
How much data do you want to read from your server PLC? 100MW?
This is probeably 1 of many solutions to read or write data over ethernet
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
tom vg hat geschrieben:
In my case i have 2 TM251MESC that communicates with modbus tcp to each other. They both can act as a server depending on the fb that you are using to read or write data in plc 1 or 2. There is nothing special to setup for this only implement the FB and set how many data you want to read.
How much data do you want to read from your server PLC? 100MW?
This is probeably 1 of many solutions to read or write data over ethernet
I think I will try to do the same. But in this approach, how do we define the location of input registers or holding registers? Some help would be greatly appreciated..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone! I have been struggling with making my Modicon M241 PLC to act like a MODBUS TCP server. Using a modbus TCP master simulator, I am able to read and modify Holding registers but when I try to read INPUT registers, a modbus message timeout error is displayed.
For making it act like a Modbus TCP server, I have added ModbusTCP_Slave_Device block to the Ethernet section.
I have configured the IP addresses and stuffs. What else do I need to configure other than this to enable reading of input registers from PLC?
PS: I have been configuring the settings using SoMachine software.
Hello Somachine user
I'm using a standard PLC_communication library (schneider electric) that operates with a READ/WRITE_VAR functionblocks. These can read write data on other modbus tcp devices in the network. You can set the type of register that you want to read/write along with an quantity and where to start.
gr Tom
Hello Tom!
I think I wasn't clear. I want my PLC to act like a MODBUS TCP SERVER i.e. other TCP devices to read its holding and input registers, not the other way round. How to go about doing that?
Thanks!
In my case i have 2 TM251MESC that communicates with modbus tcp to each other. They both can act as a server depending on the fb that you are using to read or write data in plc 1 or 2. There is nothing special to setup for this only implement the FB and set how many data you want to read.
How much data do you want to read from your server PLC? 100MW?
This is probeably 1 of many solutions to read or write data over ethernet
I think I will try to do the same. But in this approach, how do we define the location of input registers or holding registers? Some help would be greatly appreciated..
the quantity and position are inputs on the fb it self. check the fb and you'll notice