logo Welcome, Guest. Please Login or Register.
December 14, 2017, 12:54:50 AM
Home Help Search Login Register
 News: Self-Registration temporarily suspended due to abuse.To Register as a member, please email to webmaster@triplc.com with your email and username.

  Internet PLC Forum
  General
  Technical support
(Moderator: support)
  Forcing an IP address
? previous next ?
Pages: [1] Go Down Reply Notify of replies Send the topic Print
   Author  Topic: Forcing an IP address  (Read 65 times)
Lorne
Jr. Member
**

Posts: 54



I'm a old guy

View Profile
Forcing an IP address
« on: November 27, 2017, 04:54:08 PM »
Reply with quote

I have a question about forcing an IP address into the PLC without having to re boot the PLC
I understand the concept of setting the IP address to 0.0.0.0 to allow the PLC to accept an IP address from the router.
This all works fine so the print #4 command actually places the IP address into H$ example 192.168.0.133 and also sets a relay IP_READY

However if the router is not present I want the PLC to accept the address as 192.168.1.15:9080
So inside the program I am using a timer that will turn on after 2 minutes if the IP address does not change from 0.0.0.0
it calls a function that first loads  checks to see if H$ is empty
Then I use DM[800] = 192 DM[801] = 168 DM[802] = 1 DM[803]= 15 AND DM[804] = 908
Then I load that into H$ so far everything works out OK
However even in the manual it says that you need to reboot the PLC
So my actual question is how is it that the router can change the IP address without having to reboot but the program can't. Is there any command I can use that would emulate the signal that the router would send to the PLC to change the IP address?
Report to moderator   Logged
support
Global Moderator
*****

Posts: 3049





View Profile WWW E-Mail
Re:Forcing an IP address
« Reply #1 on: November 27, 2017, 11:54:08 PM »
Reply with quote

Network routers have a different design purpose in that it is their job to look out for new connection and to assign IP address.

The PLC fimware initializes the Ethernet parameters during startup and most often the PLC is assigned a fixed IP address during the initialization so that will be the parameter it uses. If the fixed IP address has changed then it require a reboot in order to re-initialize the Ethernet port.

The PLC firmware does not want to spend precious CPU time to periodically check to see if it has if the IP address has changed in order to re-initialize the Ethernet port.

In many applications the PLC may not even be connecting the Ethernet port to the network, hence it is by design that the PLC only check for DHCP IP address (if IP address is set to 0.0.0.0 for Fx based PLC only) during boot up and if it doesn't find an address it assume that there is no network connection or no DHCP server and thus would ignore the Ethernet port.

Report to moderator   Logged

Email: support@triplc.com
Tel: 1-877-TRI-PLCS
Pages: [1] Go Up Reply Notify of replies Send the topic Print 
? previous next ?
Jump to: 


Login with username, password and session length

Powered by MySQL Powered by PHP Internet PLC Forum | Powered by YaBB SE
© 2001-2004, YaBB SE Dev Team. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!