Author Topic: Omron FINS UDP port  (Read 863 times)

Neeh

  • Newbie
  • *
  • Posts: 21
    • View Profile
Omron FINS UDP port
« on: May 22, 2018, 07:15:20 PM »
Is there a way to assign/change UDP port number programmatically during run time?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Omron FINS UDP port
« Reply #1 on: May 22, 2018, 11:02:09 PM »
Do you have a PLC that uses a port other than 9600? Currently there is no way to change from that port.

Neeh

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Omron FINS UDP port
« Reply #2 on: May 23, 2018, 12:43:03 PM »
I have many Omron PLCs and each uses a different port number.  I'm able to change the port number, per your instruction on my earlier post, and it works well until I found out that each PLC uses a different port.

Any suggestion of a work around?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Omron FINS UDP port
« Reply #3 on: May 24, 2018, 09:54:49 AM »
From the last code change, you will have to take it a step further and add a Property:

        Public Property PortNumber As UShort = 9600


Then in the code where the port number is set (line 173), it will use the property value

DLL(MyDLLInstance).Port=PortNumber

Neeh

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Omron FINS UDP port
« Reply #4 on: May 24, 2018, 05:16:48 PM »
I had to also add :

     DLL(MyDLLInstance).Port = PortNumber

to the IPAddress set property to get datareceived event.

Thanks for the help.