Jump to content
Nassos.NET

TCP/IP CARD INIT with data entered from the Information Mode

Recommended Posts

Hello there,

i'm trying to find a way to Initialize the TCP/IP card with the IP,Mask,default Getaway from the data that i initially put in the device through the Information mode.

I found the Retry and Timeout Registers (SI 101,102) but i can't find the IP, Mask and default getaway to Dynamically Initialize the TC/IP card.

I don't want to have different .vlp's for each device.

 

P.S. i also saw the MI option but it would put unnecessary complexity to the ladder program (need to have two modes in start up etc.).

 

thanks in advance,

Nassos

Share this post


Link to post
Share on other sites

 

1 hour ago, Nassos.NET said:

P.S. i also saw the MI option but it would put unnecessary complexity to the ladder program (need to have two modes in start up etc.).

 

What unnecessary complexity do you mean and what are the two modes in startup you're referring to?

Share this post


Link to post
Share on other sites
1 minute ago, Flex727 said:

 

What unnecessary complexity do you mean and what are the two modes in startup you're referring to?

 

Hello flex727, thank you for your reply,

Yes, why should i do two modes if the data is there and accessible.

In two modes I need to create input Display, hold the hole ladder program the user to put the data. Also with this i introduce potential user errors when the device go to IP enter Mode, and the user didn't notice and start the machine without the device on-line, and this can go deeper..

 

Nassos

 

Share this post


Link to post
Share on other sites

If you initialize the TCP/IP card with MIs, then you only need to enter the data once, not every time you start up. You can also enter the MI data through INFO Mode if you wish instead of with HMI user input.

Share this post


Link to post
Share on other sites
1 minute ago, Flex727 said:

You can also enter the MI data through INFO Mode if you wish instead of with HMI user input.

Hi again,

This still is putting the same data twice, once in the Ethernet Option and once in the operands for the MI's.

If i understand there is no way to get the Ethernet Options from the ladder program, i'm i right to assume that?

 

9 minutes ago, Flex727 said:

If you initialize the TCP/IP card with MIs, then you only need to enter the data once, not every time you start up.

So every time i push to the device new .UDC i don't need to set it again?

Thanks again for all your help,

Nassos

Share this post


Link to post
Share on other sites

 let me clarify it a bit,

The requirements are as follows,

The device is taking some measurements of a machine, now in order to start or stop taking measurements there is a PC with a .NET application. To connect with the device the application uses Modbus over TCP/IP with the device as a slave.

Now if i use the Unitronics .NET library to connect with the device over Ethernet the only thing i(or the on-site Technician) need to set is the Ethernet section in Info mode(Nothing to do i ladder). But if i use Modbus over TCP/IP i need to initialize from constants or MI's.

To come back to my original question, is it possible to get in my ladder program the "Information Mode-->IP parameters" values in order to Initialize the TCP/IP Card with them?

I hope i didn't confused you more,

Nassos

 

 

Share this post


Link to post
Share on other sites
3 minutes ago, Nassos.NET said:

is it possible to get in my ladder program the "Information Mode-->IP parameters" values in order to Initialize the TCP/IP Card with them?

The way you set the IP parameters in ladder is to use the TCP/IP Card Initialization Function Block. In that function block you can hard code the IP parameters with actual numbers that do not change, or you can enter MI addresses which allow you to change the IP parameters at any time by changing the values in the MI vectors. You can change those values via HMI or enter the values through INFO Mode. Once you have entered the values into the MI vectors, then the PLC will retain them unless the battery dies with power removed from the PLC (battery lasts about 10 years).

You can also set the IP parameters directly via INFO Mode if there is no TCP/IP Card Initialization Function Block in ladder. Even if there is a TCP/IP Card Initialization Function Block, you can change the IP parameters via INFO Mode, but they will only stay in effect until the PLC is rebooted (if the FB is activated by SB 2).

Share this post


Link to post
Share on other sites

Stay out of Info Mode for this sort of thing.

You can use sockets to have up to four simultaneous Ethernet connections to the same PLC.  If you really need to change the IP address you can re-init the card from logic - there's no rule that the card can only be initialized on startup.

Post your program and I'll hack it up for you to show you what I'm talking about.

Joe T.

Share this post


Link to post
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...