Timer/Counter Points

Timer/counter points record the following data in three array elements:

  • A count of the number of times the event has occurred.
  • The accumulated duration of all HIGH event occurrences, stored in seconds.
  • The last event time or zero. This field will always contain the time the HIGH event occurred while the point_expression evaluates to a HIGH (non-zero) state. While the equation in the point_expression field evaluates to a LOW (zero) state, this field contains zero. Time is stored as the number of seconds since time 00:00:00 on January 1, 1970 GMT.

Each time the equation evaluates to a value greater than zero, the event is considered to be in its HIGH state and:

  • The count field, stored in the first element of the timer/counter array is incremented by one.
  • The current system time is stored in the third element of the timer/counter array.

Each time the equation evaluates to a value equal to or less than zero, or one or more source points are unavailable, the event is considered to be in its LOW state and:

  • The duration field, stored in the second element, is incremented by the duration of the last event. This duration is calculated by subtracting the start time of the last event from the current system time.
  • The last event time, stored in the third array element is zeroed.

A Reset condition occurs when the reset point is updated. This will cause the timer/counter array to be reset to zero or init_value (if it is defined)

Specifications

  • The timer/counter point is a derived point with the calculation_type set to 9.
  • A timer/counter point must be defined with a point_type_id of UDINT, and 3 elements.
  • The event described in the point_expression field serves as an "edge trigger" for an event.