MatthewDuhamel

Connecting Multiple PLCs over Ethernet/IP

5 posts in this topic

I currently have two NX1P2 PLCs communicating back and forth over ethernet IP. However, I am looking to expand this project across multiple PLCs and I need a way for one PLC to see all other PLCs that are connected to the LAN network via Ethernet IP.

I can use the _EIP_EstbTargetSta[255] function which is a boolean value that returns true if there is an established connection  to a device where the last octet of the IP is specified in the array [255]. 

This function works well but my PLCs are configured with the subnet 255.255.0.0. And I need to see the connection status based on the third octet. Is there an existing function that I can use, or is there a way to view the full structured text for the _EIP_EstbTargetSta[255] function and modify it to suite my specific application? 

Share this post


Link to post
Share on other sites

Your addresses likely won't line up with the array index but you can still find out what IP is assigned what index in EstbTargetSta[XXX].

.

Go to Tools -> Ethernet/IP Connection Settings and right click on your IP address. Select Monitor. Click on the Connection status tab and you will see the IP address of the target PLC and in brackets the assigned number which you can use in the EstbTargetSta array.

Capture.PNG

1 person likes this

Share this post


Link to post
Share on other sites

I should add - you can change this assigned number but it requires you to use Network Configurator. It installs with Sysmac. Create all your connections in Sysmac and then upload the network in Network Configurator. Open the connections for the PLC in question and you can change the Node ID.

Capture.PNG

1 person likes this

Share this post


Link to post
Share on other sites

Sorry I should have been more concise with my question, I am using Sysmac Studio for my programming and need to add a function within the program to choose which controller to connect to.

For example if I have three controllers connected over ethernet IP (192.168.30.5, 192.168.31.5, 192.168.32.5) and I want 30 to only communicate with 32, how could I set this up in Sysmac Studio to "select" which controller to communicate with? Is it possible create a dynamic EIP configuration, where the IP in the configuration can change automatically based on user input? 

Share this post


Link to post
Share on other sites

The established target variable isn't going to do what you want if the PLCs are not in IPs with the same first 3 bytes.

Any device can talk to any device, as long as your subnet is right.  For tag data link, you would be making the connection settings for each PLC so you would define who talks to who.  If you only want 30 to talk to 32, you only set up tag sets and mapping for those.  

If you are talking about explicit messaging using UCMM or Class 3 communications, one of the inputs on the function block is where you define the IP address of the target.  It can accept a text string or a string variable, which would allow you to change it from within the program.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now