Author Topic: Pollrate confusion  (Read 2042 times)

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Pollrate confusion
« on: December 03, 2015, 07:49:03 PM »
Archie, can you please help clarify same basic settings of the drivers and datasubscribers.  I don't completely understand how these interact with each other.  For instance the ModbusTCP driver has a pollrate override setting and in the datasubscriber has a pollrate and log interval setting.  What is the difference between these two and what determines the pollrate to the end device(PLC)?  If I set the pollrate or log interval of the datasubscriber to 250ms and the ModbusTCP to 500ms, my assumption is that data is refreshed every 500ms from the actual device and the datasubscriber polls the driver every 250ms.  So  setting the pollrate value of the datasubscriber less than the driver is essentially a waste of time?  Hope this question makes sense, thanks.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Pollrate confusion
« Reply #1 on: December 03, 2015, 08:57:37 PM »
Only the PollRate on the driver actually does anything. Some controls have some leftover properties that were never implemented.

The PollRateOverride will attempt to update subscriptions at that rate. If the PollRateOverride is set to 0, it will update as fast as the PLC and communication link will allow.

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: Pollrate confusion
« Reply #2 on: December 03, 2015, 10:35:25 PM »
Ok.  I do see that changing the LogInterval of the datasubscriber2 does change the timestamp on the data in the log.  Also I assume the value for the Pollrate override in the driver is in milliseconds.  But when I enter 30000 in the driver pollrate override and using ModRsim, I see the poll happen at 10 seconds.  Changing this to 60000 makes the poll occur at 20 seconds observing the 'lights" on ModRsim.  I tried to use wireshark to capture this however I do not see any packets when using ModRsim to verify this. 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Pollrate confusion
« Reply #3 on: December 03, 2015, 11:14:45 PM »
The packet rate may not match the poll rate because the poll rate is a round trip for all subscriptions. Let's say for instance that you have a subscription for 40001 and one for 41000 and a PollRateOverride of 10000. You will see a read packet every 5 seconds, but if you look at the read for only one of the addresses, it will be every 10 seconds. The driver spaces its total number of reads across the poll rate.