Author Topic: Driver.CIP.ForwardOpen() Exceptions  (Read 3395 times)

Controlsnut

  • Newbie
  • *
  • Posts: 15
    • View Profile
Driver.CIP.ForwardOpen() Exceptions
« on: October 21, 2014, 07:16:02 PM »
Hi,
I keep getting these types of exceptions showing up intermittently. Call stack below. Is this a connection timeout exception of some sort?

MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException: Exception of type 'MfgControl.AdvancedHMI.Drivers.Common.PLCDriverException' was thrown.
   at MfgControl.AdvancedHMI.Drivers.CIP.ForwardOpen()
   at MfgControl.AdvancedHMI.Drivers.CIP.WriteTagValue(CLXAddress tag, String[] value, Int32 numberOfElements, Int32 sequenceNumber)
   at AdvancedHMIDrivers.EthernetIPforCLXCom.Write(String startAddress, Int32 numberOfElements, String[] dataToWrite)
   at AdvancedHMIDrivers.EthernetIPforCLXCom.Write(String startAddress, Int32 dataToWrite)
   at iControlService.ServiceHandler.timer_elapsed(Object sender, EventArgs e)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Driver.CIP.ForwardOpen() Exceptions
« Reply #1 on: October 21, 2014, 07:53:39 PM »
Wireshark is the best way to see what is happening. If there is no communication request after a period of a few seconds, the connection will close, then the next requires requires another forward open. You can see these with a Wireshark capture.

Controlsnut

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Driver.CIP.ForwardOpen() Exceptions
« Reply #2 on: October 21, 2014, 09:51:54 PM »
Hi Archie,
Thanks again. Just so I'm clear, what I'm doing is I instantiate several plc 's using a call to new EthernetCLXcom driver and add them to a list. I then pull tags stored in a database that are assigned to the various plc's. How I filter is I use the IPAddress property and if it matches the ip property of the user configured tag in the database then I write to it. I have no control what order these tags are coming in and which plc's they are assigned to, so potentially one of my created EthernetCLXcom created drivers are not being used until after successive writes to some other plc's. From what you are saying does this mean that they may be timing out and closing the connection? Would it be reasonable to just do a dummy read from each PLC to maintain a "heartbeat" if you will so that this doesn't happen. Thanks and I would like to donate to this project, I think it is outstanding. How do I do this?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Driver.CIP.ForwardOpen() Exceptions
« Reply #3 on: October 22, 2014, 05:06:19 AM »
It would be a good practice to do a read/write at least every few seconds just to keep the connection alive. There is an 8 second activity timer in the driver that automatically closes the connection. This was necessary because the PLC will close the connection after about 10 seconds.

We no longer have means to accept donations, instead we encourage purchasing the items from the web site. That income is used to continue development of the project.

Controlsnut

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Driver.CIP.ForwardOpen() Exceptions
« Reply #4 on: October 22, 2014, 03:31:19 PM »
Thanks Archie, I will look into this. Also, I will purchase some products!