Author Topic: EthernetIPPLCSLCMICRO and ModbusTCPCom on single Ethernet port  (Read 2723 times)

ShriramPendse

  • Newbie
  • *
  • Posts: 24
  • " AUTOMATION " simplified .
    • View Profile
EthernetIPPLCSLCMICRO and ModbusTCPCom on single Ethernet port
« on: November 20, 2014, 01:21:00 AM »
Hello ,
I want to connect MLX1400 PLC (IP 192.168.0.1 ) and ModbudTCP Controller (IP 192.168.1.1 ) to PC running Advanced HMI application thru single wired Ethernet port on PC .
I added two IP addresses  to single ethernet port , namely 192.168.0.10 and 192.168.1.10 .

I wish EthernetIPPLCSLCMICRO driver IP 192.168.0.10 should talk to MLX1400 PLC (IP 192.168.0.1 ) .

And ModbusTCP driver 192.168.1.10  should talk to ModbudTCP Controller (IP 192.168.1.1 ).

In the driver vb code I could not find where to mention HOST port IP address or port no .

Is above configuration logically possible ? In another two days my hardware will arrive , then I can check this .
Expert advice requested to make it feasible or any other alternative welcome .

Thanks ,
Shriram Pendse

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: EthernetIPPLCSLCMICRO and ModbusTCPCom on single Ethernet port
« Reply #1 on: November 20, 2014, 09:26:34 AM »
The way I would do this is to set the computer, and PLC's subnet masks to 255.255.254.0, then you can assign the computer an address of 192.168.0.10 and have it be able to see both PLC's.

Quote
I added two IP addresses  to single ethernet port , namely 192.168.0.10 and 192.168.1.10 .
How would you go about doing this?

ShriramPendse

  • Newbie
  • *
  • Posts: 24
  • " AUTOMATION " simplified .
    • View Profile
Re: EthernetIPPLCSLCMICRO and ModbusTCPCom on single Ethernet port
« Reply #2 on: November 20, 2014, 10:09:25 AM »
Dear Archie,
Thanks for the solution .

I tested the configuration as follows :-

PC IP address 192.168.0.54 . Subnet as 255.255.254.0
MLX 1400 PLC address 192.168.0.53 so configured same address to EthernetIPPLCSLCMICRO.
ModbusTCPcom1 192.168.0.1
ModbusTCPcom2 192.168.0.2
ModbusTCPcom3 192.168.0.3
ModbusTCPcom4 192.168.0.4
ModbusTCPcom5 192.168.0.5
ModbusTCPcom6 192.168.0.6

I can read 100 registers (N7:0) from PLC by using read command in timer with interval of 500 mSec.
Similarly from every ModTCP device I am reading 16 HoldingRegisters at 1000 mSecs interval .
Occasionally I get error if I use write to device methods.
I generally don't map device address to AdvHMI controls on screen , rather read values and pass value to to controls value field.

About adding two IP address to LAN port on PC :-

If we goto advance properties of LAN adapter , we can add another IP address to same Physical Lan port .
In an another application Last time I required that PC should be  on companies Intranet with some IP and for connecting to PLC I needed different IP for same physical LAN port . I used above method and simultaneously PC is on Intranet as well as connects to PLC .

warm regards,
Shriram Pendse





Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: EthernetIPPLCSLCMICRO and ModbusTCPCom on single Ethernet port
« Reply #3 on: November 20, 2014, 10:33:59 AM »
Occasionally I get error if I use write to device methods.
I generally don't map device address to AdvHMI controls on screen , rather read values and pass value to to controls value field.
What errors are you getting?

Quote
About adding two IP address to LAN port on PC :-

If we goto advance properties of LAN adapter , we can add another IP address to same Physical Lan port .
In an another application Last time I required that PC should be  on companies Intranet with some IP and for connecting to PLC I needed different IP for same physical LAN port . I used above method and simultaneously PC is on Intranet as well as connects to PLC .
I learned something new, I did not know this was possible. Thanks

ShriramPendse

  • Newbie
  • *
  • Posts: 24
  • " AUTOMATION " simplified .
    • View Profile
Re: EthernetIPPLCSLCMICRO and ModbusTCPCom on single Ethernet port
« Reply #4 on: November 21, 2014, 08:13:38 AM »
Hello Archie ,

As i mentioned earlier ,I am reading register arrays in Timer events . Since user writing data to PLC is asynchronous (e.g. clicking start command to PLC ), if comm interfaces are busy in reading activity , I get various errors randomly (Connection error , packet error or TNS being NULL anything as such).
I try to avoid such errors by putting TRY catch blocks in drivers code .
The drivers in Advanced HMI take care of software errors but field related errors throw exception .

If we have to deploy this as unattended application then big issue . For Operator use HMI , there is always option to close and restart .
Well , so far so good . We have come long way and drivers are now much more reliable .

Regards,
Shriram Pendse

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: EthernetIPPLCSLCMICRO and ModbusTCPCom on single Ethernet port
« Reply #5 on: November 21, 2014, 08:33:52 AM »
The ModbusTCP driver is next in line to be revamped to the latest software architecture. These changes should resolve the TNS issues and also make it multithread friendly. I am hoping to have this done in the next 2-3 weeks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: EthernetIPPLCSLCMICRO and ModbusTCPCom on single Ethernet port
« Reply #6 on: November 25, 2014, 03:41:42 PM »
Version 3.84 is now available. The ModbusTCP driver has been completely rewritten. Once it is fully debugged it will be more stable.