Author Topic: Can someone explain pollrateoverride  (Read 3260 times)

Controlsnut

  • Newbie
  • *
  • Posts: 15
    • View Profile
Can someone explain pollrateoverride
« on: October 20, 2014, 11:07:09 PM »
I'm using ethernetclx driver to make successive writes to a plc. I have been struggling with send queue full type exceptions intermittently  as well as CIP.ForwardOpen() type exceptions. I've added the thread.sleep(100) after every 3 writes to no avail. My quesiton is, I am not actually reading data and displaying it, I'm simply just making successive writes.

Is there a way to disable the polling of the plc as I don't need to update my application with any values from the plc? Could this be impacting some of the problems I am experiencing? Thanks.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Can someone explain pollrateoverride
« Reply #1 on: October 21, 2014, 12:52:03 AM »
PollRateOverride sets the delay (in milliseconds) between subscription reads. Subscriptions are used by all the visual controls to get their data continuously. There is also a property DisableSubscriptions that stops the subscription polling all together.

if you are getting a Que full error, then you are sending requests faster than the PLC can respond to them. The next version of 3.80 is in testing that will attempt to reduce this error by looking in the que to see if a similar request is still pending, if so, it discards it instead of filling the que with duplicate requests.

If you are doing reads in code, then you have to be sure not to send more than 30 requests without giving the PLC time to respond. Wireshark is your best friend in helping troubleshoot these problems. You can capture packets and see how much time it takes the PLC to respond to requests.

Controlsnut

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Can someone explain pollrateoverride
« Reply #2 on: October 21, 2014, 07:54:56 AM »
Hi Archie,
Thanks a lot, and great job on these drivers...so many possible uses when you have access to plc controllers from high languages such as VB and C#. Like I said, my application does not perform any reads at all, just writes, so from what you're saying I can just set DisableSubscriptions to true. I'll try it and see if the problem goes away. Thanks for the speedy reply!

Controlsnut

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Can someone explain pollrateoverride
« Reply #3 on: October 21, 2014, 03:23:54 PM »
Hi Archie,
I've disabled subscriptions like you suggested, (although I only make writes to the plc, no reads). Attached is the log file of the app running for about 1 hour. As you can see it starts out with some generic exception and then continues with the send queue full error. I have a thread.sleep(100) after every 3 writes. Here is an exerpt of the one error. Is it possible I'm trying to write to a tag that doesn't exist. Please if you could look though the log. Thanks.

21/10/2014 1:15:43 PM: Problem clearing tag list - 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)