Author Topic: trouble reading an eventlog  (Read 664 times)

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
trouble reading an eventlog
« on: June 01, 2018, 05:36:45 PM »
Archie, I am creating an app that reads the eventlog of a device over ModbusTCP with 3.99YBeta10.  I have an issue that forces me to read the event description to determine if an event has occurred.  This is given by the controller as a 30 character string and I have the valuechanged event of that string to count the number of times it changes. But what I find is this is too slow and several events can occur in reality but I only catch some of them.  It is my belief its due to the reading of a long string that takes too long.  I think reading a straight integer value may be quicker but not sure how to get one fired event for several registers in a row.  I have tried a datasubscriber2 so I can get the whole length of the string but this causes a fired event for each register which in this case is 15 so this gives me too many events for one occurrence.  How do you suggest I can accurately and quickly read 15 consecutive registers and get one event so I can keep count of my event changes?  Thank you.       

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: trouble reading an eventlog
« Reply #1 on: June 01, 2018, 06:43:43 PM »
To me, that sounds like using a DataSubscriber2 and its DataChanged event.

After you enter the first address of this range then instead of subscribing to 1 element you would change it to 15.

This event is fired only when the data changes.