Author Topic: Getting PLC IP address when using CLX.ini as address  (Read 1637 times)

Noe

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Getting PLC IP address when using CLX.ini as address
« on: October 30, 2015, 11:20:21 AM »
Hi Archie. I used the CLX.ini file option to set the PLC IP in a settings file to store and change my driver IP, but I want to display in a label the IP address, if I set the "EthernetIPforCLXCom1.IPAddress" I would get "CLX.ini". Is there another way to read IP value?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Getting PLC IP address when using CLX.ini as address
« Reply #1 on: October 30, 2015, 12:15:21 PM »
Your easiest option is probably to edit EthernetIPForCLXCom.vb and go to line 209, which should be this:

    Private m_IPAddress As String = "192.168.0.10"

and change it to:

    Public m_IPAddress As String = "192.168.0.10"

You can now access:

  EthernetIPforCLXCom1.m_IPAddress

Noe

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: Getting PLC IP address when using CLX.ini as address
« Reply #2 on: October 30, 2015, 12:50:07 PM »
Thanks Archie! Great response as usual!