Skip to main content
Version: 8.1

Hour and Event Meters

Inductive University

Hour and Event Meters

Watch the video

Hour meter and Event meter refer to the Value Mode option settings on tags in Transaction Groups. The Value mode drives values that are used to create values that determine how long a value was true. While the selected Value Mode for most transactions is Direct however, the Hour meter mode accumulates value for the duration of a condition, and the Event meter accumulates count in response to the condition.

Hour Meter​

It is common to write to a tag during the time when a tag's value is true. An hour meter simplifies this effort. Hour meters can be meters that accumulate the millisecond, second, minute, hour, or day.

Count the Duration of a Tag Being True​

  1. From the Tag Browser, drag a boolean tag into the Basic OPC/Groups Items area of a Standard Transaction Group.

    Count Duration of Tag Being True Step 1

  2. From OPC Browser or Tag Browser, drag a memory tag or OPC tag (must be a numeric data type) into the Basic OPC/Groups Items portion of the Standard Transaction Group.

  3. Right-click on the boolean tag in the Transaction Group and select Edit. The Edit group tag window is displayed.

    Count Duration of Tag Being True Step 3

  4. In the Edit group tag window, for Value Mode, select Hour meter.

  5. In the Edit group tag window, for Target Type, select Other tag from the dropdown menu. In Target Name enter the name of the memory tag as the target, and click OK.

    Count Duration of Tag Being True Step 5

  6. In the Basic OPC/Groups Items area where the tags are located, go to the Target Name column, left-click on each tag to get the dropdown menu, and set the following:

    1. For the boolean tag, select the memory tag from the dropdown which is set previously as the target tag to write the hour meter to.

      Count Duration of Tag Being True Step 6a

    2. For the memory tag, select Read-only from the dropdown.

      Count Duration of Tag Being True Step 6b

  7. Click Enabled at the top of the page, and do a File > Save to start the group.

  8. Set the boolean tag to true to the start of the Hour meter.

Event Meter​

Another common scenario is to count the number of times an event occurred, where an event represents a value change to the tag. For instance, the Event meter targeting a boolean tag would count each value change from false to true. Notice that this is different from the Hour meter as it counts the amount the value changes from false to true, instead of the duration the tag value is true. This count will total the number of cycles the boolean tag has experienced.

note

The data type must be set to integer when using an Event meter regardless of the OPC Item type.

Count in Response to a Tag Being True​

  1. From OPC Browser or Tag Browser, drag a boolean tag into the Basic OPC/Groups Items area of a Standard Transaction Group.

  2. From OPC Browser or Tag Browser, drag a memory tag or OPC tag into the Basic OPC/Groups Items portion of the Standard Transaction Group.

    Count in Response to a Tag Being True Step 2

  3. Right-click on the boolean tag in the Transaction Group and select Edit.

  4. In the Edit group tag window, set the following:

    • Value Mode: Event meter
    • Target Type: Other Tag
    • Target Name: _Sim_New_Programmable_/Events (or name of the tag you are using)
  5. Click OK.

    Count in Response to a Tag Being True Step 5

  6. In the Basic OPC/Groups Items area where the Tags are located, go to the Target Name column. Left-click on each tag to get the dropdown menu, and set the following:

    1. For the boolean tag, select the memory tag from the dropdown which is set previously as the target tag to write the hour meter to.

    2. For the memory tag, select Read-only from the dropdown.

      Count in Response to a Tag Being True Step 6b

  7. Click Enabled at the top of the page, and do a File > Save All to start the group.

  8. Set the boolean tag to true to start the Event meter. You'll see the Event Tag update in the Tag Browser.

Reset an Hour or Event Meter Based on a Condition​

Inductive University

Resetting Hour and Event Meters

Watch the video

You can set the hour or event meter based on a condition.

  1. In the Basic OPC/Group Items section, right-click and Edit a Tag that is serving as the Hour or Event meter. The Edit group tag window is displayed.

  2. In the Value Mode area, select the Reset on condition check box.

  3. Click the Tag icon to display the Choose Tag window, and select a Group Tag from the popup window.

  4. Click OK.

    Reset an Hour or Event Meter Based on a Condition Step 4

  5. Next to the Tag icon, choose the operator sign (for example >), and enter a number. In the example we entered 9.

    Reset an Hour or Event Meter Based on a Condition Step 5

  6. Click OK. The target tag will now reset in response to the condition (after nine occurrences in our example).