Author Topic: Changing IP address at runtime  (Read 4611 times)

Joe Matkowski

  • Newbie
  • *
  • Posts: 47
    • View Profile
Changing IP address at runtime
« on: March 10, 2015, 06:33:27 PM »
This has probably been answered already but I could not find it in the forumn but has anyone been able to change IP address to driver at runtime??

jody

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Changing IP address at runtime
« Reply #1 on: March 10, 2015, 06:41:31 PM »
Which driver are you using?

Darrell

  • Full Member
  • ***
  • Posts: 198
  • Electrician / PLC Technician
    • View Profile
Re: Changing IP address at runtime
« Reply #2 on: March 10, 2015, 09:33:13 PM »
Ive done this by adding a basic button and a textbox using the micrologix driver


add this code to the button substituting this Ip with you own

EthernetIPforPLCSLCMicroCom1.IPAddress = "149.139.119.15"
TextBox1.Text = EthernetIPforPLCSLCMicroCom1.IPAddress


you can also add a button to change the IP from what is displayed in the textbox.
add this code to a button

 EthernetIPforPLCSLCMicroCom1.IPAddress = TextBox1.Text



Joe Matkowski

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Changing IP address at runtime
« Reply #3 on: March 10, 2015, 09:54:42 PM »
All thanks for the help. I am using modbus tcp. we have been working on adding an existing app into adhmi but I don't think its gonna work so were gonna rewrite the entire project and try to stay on schedule..

Ibrahim

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Changing IP address at runtime
« Reply #4 on: March 13, 2015, 03:54:08 AM »
Hi,

i have tried chaning the ip address of my plc and got the program crashes.
and am using microllogix 1100, with this driver EthernetIPforPLCSLCMicroCom1

by clicking bush button, and this is the code
EthernetIPforPLCSLCMicroCom1.IPAddress = "192.168.1.70"

and also i have tried to use this

EthernetIPforPLCSLCMicroCom1.IPAddress = textbox1.text

both not helped me to change the ip address on run time.

so may you help me how is it possible i can change the ip on runtime plz.

thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Changing IP address at runtime
« Reply #5 on: March 13, 2015, 04:13:02 AM »
What version are you using? What message do you get when it crashes?

Ibrahim

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Changing IP address at runtime
« Reply #6 on: March 13, 2015, 10:47:33 PM »
Hi,

am using AdvancedHMIv35,
and the error header title is "NullReferenceException was unhandled"
and pointing this line
 " AddHandler DLL(MyDLLInstance).DataReceived, AddressOf DataLinkLayer_DataReceived"


Thanks alot for your support.
Ibrahim

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Changing IP address at runtime
« Reply #7 on: March 13, 2015, 11:12:30 PM »
-Right click the AdvancedHMI project in Solution Explorer and select Properties
- Select the Application tab
- Click the Assembly Information button

You should see the more detailed version number. The latest version is 3.9.8

If you don't have the latest, then download it and see if the problem still exists.

Ibrahim

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Changing IP address at runtime
« Reply #8 on: March 17, 2015, 08:17:31 AM »
Hi,

thanks,

the new version it works good for changing ip address on run time.
but i have got another problem.
when using this driver EthernetIPforPLCSLCMicroCom1 as to communicate the micrologix 1100,
all the bush buttons when i click nothing is working with this new AdvancedHMI398.
if i use older versions when i click the buttons the lights come on and off, i mean works good.

so what is that problem plz with this new version.

thnks



Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Changing IP address at runtime
« Reply #9 on: March 17, 2015, 01:48:04 PM »
the new version it works good for changing ip address on run time.
but i have got another problem.
when using this driver EthernetIPforPLCSLCMicroCom1 as to communicate the micrologix 1100,
all the bush buttons when i click nothing is working with this new AdvancedHMI398.
if i use older versions when i click the buttons the lights come on and off, i mean works good.
I did find the new driver had a problem with writing to bits. This will be fixed in the next version. A new version should be available within the next few days.

Ibrahim

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Changing IP address at runtime
« Reply #10 on: March 17, 2015, 06:17:36 PM »
hi,

thanks alot,

can you plz let us know links that we can download the old versions of the AdvancedHMI

thnks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Changing IP address at runtime
« Reply #12 on: March 18, 2015, 01:16:23 PM »
Version 3.98a is now available that incudes several fixes to the SLC/Micro driver

Ibrahim

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Changing IP address at runtime
« Reply #13 on: March 20, 2015, 07:41:11 AM »
Hi Archie,

thanks for the supporting the community.

i checked and worked the new version about the BITs (0/1) from the 'vb' bush buttoms.

thanks again.