Jump to content

Assistance needed to have ethernet settings on a config screen


Recommended Posts

What I am trying to do is make a config screen within my program to allow an end user to change the IP, Sub-net and Gateway settings. Up until now I have all of that set on the first rung using the plc name and tcp/ip init FB and I just enter the customer supplied parameters. This is great if the customer never wants to change things on their network but becomes a pain if they do. I noticed that there is an option under ip,sub and gateway to pull the parameter from a MI location, My question is, what HMI module do I use to enter ip, sub,and gateway? Is there any additional ladder code involved?

Thanks

Link to comment
Share on other sites

There is no special HMI variable for TCP/IP parameter entry. These parameters are stored in a memory integer vector that is defined inside the TCP/IP Config function block. You simply need to use a Variable Numeric keypad entry for these MI vectors. Each octet of the parameter is stored in a separate consecutive MI.

For Example if the desired IP address is 192.168.1.1 and IP address is assigned to a vector starting at MI4000

MI4000 = 192

MI4001 = 168

MI4002 = 1

MI4003 = 1

Also attached below is an example program to better illustrate.

Indirect TCP-IP Config.vlp

Link to comment
Share on other sites

Ive started adding this function to my program using the sample you gave me as a template, but I have a question about MB 4000, I noticed that you have it linked to the save button, but when in live mode, as I change the ip address on the plc screen it instantly chages in wichever MI I happen to be entering, when I turn off the 570 and turn it back on the values haven't changed. Is a save button really necessary? I guess I am unclear as to what MB 4000 is actually doing.

Thanks

Link to comment
Share on other sites

  • MVP 2023

You have to re-initialize the ethernet card with the new IP address. Changing the MIs only changes the data that the card will get the address from, but it only looks there during initialization. Thus MB4000 triggers the initialization process to update the address.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...