Tectron Posted June 17, 2011 Report Share Posted June 17, 2011 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 Quote Link to comment Share on other sites More sharing options...
Jas Posted June 17, 2011 Report Share Posted June 17, 2011 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 Quote Link to comment Share on other sites More sharing options...
Tectron Posted June 17, 2011 Author Report Share Posted June 17, 2011 Thanks for the sample code. I think I can figure this out now. Steve Quote Link to comment Share on other sites More sharing options...
Tectron Posted June 17, 2011 Author Report Share Posted June 17, 2011 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 Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted June 19, 2011 MVP 2022 Report Share Posted June 19, 2011 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. Quote Link to comment Share on other sites More sharing options...
Jas Posted June 20, 2011 Report Share Posted June 20, 2011 Flex is correct. You'll notice MB4000 has a touch property assigned to the "save" button on the HMI in my particular example. This was done to reinitialize the IP parameters without cycling power to the PLC. Quote Link to comment Share on other sites More sharing options...
Tectron Posted June 20, 2011 Author Report Share Posted June 20, 2011 Ok, I understand now. I have it up and running successfully now. Thanks Again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.