Home : Products : Hach WIMS : Interfaces : Hach WIMS Direct Server-Side Interface to Generic LIMS OLE DB : Documentation : Topics specific to the operation of this interface : Tech Notes
Q14276 - INFO: Tech Notes

TIME Functions - TIMEGT(x), TIMELT(x), TIMEEQ(x)

The time functions retrieve all records for the tags and then accumulates the time the value matches the criteria.  It "holds last value" and data does not need to be logged every minute. 

WARNING:  The TIMEGT(x), TIMELT(x), TIMEEQ(x) DO NOT SUPPORT Filtering.  Any entries in the Filter Data section are ignored when the Statistic is TIMEGT(x), TIMELT(x), TIMEEQ(x). 

Example #1: Calculate Number of minutes Pump1_Status was > 24.  Data is logged when the tag value changes.

TIMEEQ(24) returns 139.0667

 

Example 2:  Import the Number of minutes Pump1_On was = 1. Data is logged every 5 minutes

TimeEQ(1) returns 60 for 9/23/2014:

 

TWA Function - Time Weighted Average Function

Typically, this function is used when data is logged on change (not on a fixed frequency).

WARNING:  TWA does not support “Filter Tag” option due to how Ignition only writes values when changed. 

Example #1: Calculate the time weighted average for the FIT_I_FLOW tag.  The units of the tag are "GPH", therefore no scaling is required.

TWA returns 18.43556 for the midnight to 1AM hour. 

Explanation of calculation.

1st calculate the amount of seconds that the value was 10 in the hour:

910 (15 minutes * 60 + 10)

Multiply the number of seconds with the value 10 = 9100

2nd calculate the number of seconds the value was 20 in the hour:

1823 (30 minutes * 60 + 33)

Multiply the number of seconds with the value 20 = 36460

3rd calculate the number of seconds the value was 24 in the hour:

867 (14 minutes * 60 + 27)

Multiply the number of seconds with the value 24  = 20808

Sum the totals

66368 (9100 + 36460 + 20808)

Divide the sum with the number of seconds in the hour

18.43556 (66368 / 3600 seconds in hour)

 

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 11/6/2014 2:08 PM.
Last Modified on 11/12/2024 8:45 PM.
Last Modified by Ryan Rhoten.
Article has been viewed 3385 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article