Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
79139members
343562posts

How to establish Modbus TCP communication between two PLCs?

Solved
jhonut
Ensign
Ensign
0 Likes
4
2086

How to establish Modbus TCP communication between two PLCs?

Hello, 

I have two PLCs: a TM251MESE (which is the master) and a TM221CE24R (which is the slave). On my slave I've set some values for three memory words (%MW100=13, %MW101=11 and %MW102=6). I want to see these values on my master PLC. I have followed this example.

My problem is that when PLC is RUN mode I don't get rid of that "The bus is nor running. The shown values are perhaps not actual." What I'm concerned of is the communication status. I have seen here that the red triangle (please see the attached photo) means the controller is unable to communicate with the device, but I really  don't know why. I've used a software which connects to Modbus slave and I could seethe MWs values.

What should I do to see these values, through Modbus TCP, on my master PLC? 

 

Modbus.png

Attachments

Accepted Solutions
SimA
Ensign Ensign
Ensign
1
2046

Re: Need to verify the Ethernet configuration of both controllers

If you look at your capture for the M251, you have the configured settings on the left and the current settings on the right.   On the right, your IP address is at the default IP 10.10.xxx.xxx .  The controller typically revert to it's default address when there's an issue with the address.  A possible reason could be an IP address conflict (there's already another device with the same IP address on the network).  The other thing is you have to make sure that Ethernet 1 and Ethernet 2 on the M251 are on different subnet (both can't be at 192.168.44.xxx)

 

I didn't see your Slave configuration under the Industrial Ethernet Manager on the M251 but is it configured as Fixed IP address?  Because under your M251 Ethernet port 2, the DHCP server is active (checkbox in the config tab).  When this is active and you add a new generic slave, the slave is automatically added to receive an IP by DHCP instead of fixed address.  You can configure that under the Industrial Ethernet Manager in the Network Manager tab.

 

2021-01-28_09h12_32.png

 

 

See Answer In Context

Tags (1)
4 Replies 4
SimA
Ensign Ensign
Ensign
0 Likes
3
2082

Need to verify the Ethernet configuration of both controllers

Can you share a screen capture of your Ethernet 2 port configuration while Online?  Are you sure your IP and subnet mask is properly set?

 

Can you do the same with the M221?

Tags (1)
jhonut
Ensign
Ensign
0 Likes
2
2075

Re: Need to verify the Ethernet configuration of both controllers

@SimA , I can ping successfully both master and slave. Bellow you can see the online screenshots.

 

M221 (slave) settings:

M221_ETH.PNGM221_ModbusTCP.PNG

 

M251 (master) settings:

 

M251_ETH.PNGM251_Generic_modbus.PNGM251_Generic_modbus_status.PNGM251_IndustrialEthManag.PNG

Tags (1)
SimA
Ensign Ensign
Ensign
1
2047

Re: Need to verify the Ethernet configuration of both controllers

If you look at your capture for the M251, you have the configured settings on the left and the current settings on the right.   On the right, your IP address is at the default IP 10.10.xxx.xxx .  The controller typically revert to it's default address when there's an issue with the address.  A possible reason could be an IP address conflict (there's already another device with the same IP address on the network).  The other thing is you have to make sure that Ethernet 1 and Ethernet 2 on the M251 are on different subnet (both can't be at 192.168.44.xxx)

 

I didn't see your Slave configuration under the Industrial Ethernet Manager on the M251 but is it configured as Fixed IP address?  Because under your M251 Ethernet port 2, the DHCP server is active (checkbox in the config tab).  When this is active and you add a new generic slave, the slave is automatically added to receive an IP by DHCP instead of fixed address.  You can configure that under the Industrial Ethernet Manager in the Network Manager tab.

 

2021-01-28_09h12_32.png

 

 
Tags (1)
jhonut
Ensign
Ensign
0 Likes
0
2033

Re: Need to verify the Ethernet configuration of both controllers

@SimA , the IP addresses were kinda mixed up. I have done a reset origin of my master PLC and now everything is fine. Thank you very much for your help

Tags (1)