Description

Learn about the hour and event meters that can be used to trace the count or duration of events.

Video recorded using: Ignition 7.9

Transcript

(open in window)

[00:00] In this video, we're going to talk about Event meters and Hour meters, which are special item modes that create drive values that can be used to track how long a condition is true, or how many times a condition becomes true. So for example, we'll usually start off with a Boolean tag of some sort. If we come into the tag we see that instead of the direct value, we can choose to make this item an Hour meter or an event meter. First let's look at Hour meters. Hour meters accumulated a value while a condition is true. There are two possible conditions on zero or not on zero. This concept also works for Boolean tags where on zero is triggered by false value. So for example here will leave the default which will be on the true condition. The retentive option specifies what happens when the condition is no longer true. Do we reset the value to zero, or do we retain the value until the next condition occurs and continue from there. The difference here of course, is whether we want to time how long a condition is true, or we want to track the cumulative duration of multiple events over a period of time. For example, we'll set to retentive and we'll leave the units in seconds. Now of course because we're accumulating a value, we want to change the datatype of this item to a numeric value that we can then log the database. When I save the item and start the group, we see that the value starts off at zero. My Boolean condition is not true right now. So nothing is happening. If I write to the tag every second, the group accumulating time for this event. Event meters are very similar, although instead of time, they're tracking counts of events. Therefore there is no retentive option in this case because we don't want to reset when the value goes to false. In fact we want to count how many times it goes from false to true. Again we'll change the type to a numeric value, and we'll write to a field database. Now this item, as I transition from false to true, we will accumulate the count. Event meters and Hour meters, can be used in many creative ways to track things such as downtime, park counts, and so on. And the next video will look at how to reset the accumulated values.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.