Author Topic: EthernetIPforCLXCom v3.97d - Odd Issue at Application Startup  (Read 643 times)

thirdeye73

  • Newbie
  • *
  • Posts: 22
    • View Profile
EthernetIPforCLXCom v3.97d - Odd Issue at Application Startup
« on: October 31, 2019, 01:16:06 PM »
I am currently using v3.97d, EthernetIPforCLXCom driver.  My application acts as a data server between a CompactLogix PLC and a SQL Express database.  The application has about 25 data subscribers, each of which listens for a boolean PLC tag.  The DataChanged event handler has the following typical format:

    * Read one or more PLC tags
    * Execute a SQL stored procedure
    * Write the returned results to PLC tags

The PLC tags are fields of a UDT, mostly INT and BOOL data types, although there are one or two STRING typed tags.

This application has been working well for around four years now, but there is one nagging issue that has recently hit the customer's radar:  when the PC is rebooted, and the data server application starts, the first DataChanged event of each subscription fails with an exception.  Second and subsequent events work just fine.

Unfortunately I do not have the exact exception data, but if memory serves it is a conversion error, and there is nothing that points to where in the code it happens.

I am verifying that I have an established connection with the PLC before processing subscription data--by this I mean that when I handle the ConnectionEstablished event, I am starting a heartbeat timer with the PLC.  The PLC will not initiate any "triggers" until the app reports it is connected and the heartbeat timer is active.

Also, when an error happens, I write an error code to the PLC, and it successfully receives this tag write.

I have updated the application to v3.99x, and simplified it quite a bit.  I now use one DataSubscriber2, add all the tags I need to listen for, and in the event handler I branch with a select statement based on the PLC address.  However, I am currently off site and cannot test.

My questions are:

1)  Are there any known issues in v3.97d that could cause the described behavior?
2)  My poll rate is set to 500ms.  I don't really want to make it too long, as the app needs to have a fairly quick response time.  Could poll rate be a contributing factor?
3)  Is there a better way to listen for my trigger tags, or to read/write the additional tags when a trigger is being handled?

Thanks,
Scott


Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5272
    • View Profile
    • AdvancedHMI
Re: EthernetIPforCLXCom v3.97d - Odd Issue at Application Startup
« Reply #1 on: October 31, 2019, 02:07:10 PM »
The question about known issues with 3.97d will be hard to answer. The only way to find out is to search through the ReleaseNotes.txt and see if a problem like that has been fixed.

The PollRateOverride of 500ms is very reasonably, maybe even slow. I typically like to use 200

The DataSubscriber2 is the easiest way to implement watches for triggers. The other method is direct subscriptions to the driver, which takes a bit more code writing.

thirdeye73

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: EthernetIPforCLXCom v3.97d - Odd Issue at Application Startup
« Reply #2 on: October 31, 2019, 04:27:38 PM »
I have been able to build a lab test with a spare PLC I found.  I cannot replicate the problem.  This leads me to suspect it's a network load issue, as the real-world application also has several VFDs, 2 barcode scanners, a robot, and an HMI all eating up Ethernet/IP bandwidth.  The PLC is almost maxed out on allowed E/IP connections.