InterpTrend
- Last UpdatedJul 05, 2024
- 2 minute read
The function of this Business Logic Tier (BLT) is to retrieve collection / summary data from the RealTime database (RTDB) collect table and the Historical database TimeSeries or timeline table. It interpolates the starttime and endtime values from previously collected values for all collect value points.
The data returned includes the following information:
-
collection time
-
summarized or collected value
-
data quality
-
index of the active data quality attribute with the highest precedence
Syntax
InterpTrend <tablename> <tagname> <columnname> <starttime> <endtime> [showFieldTime]
Parameters
|
Name |
Description |
|---|---|
|
tablename |
The name of the RTDB / Historical database table that contains the data to be accessed. This can be any of the following: collect, hour, day, month, or year. |
|
tagname |
The name of the point to be viewed. |
|
columnname |
The column of the RTDB / Historical database tables to view. This can be any of the following: value, minimum, maximum, and average. If the table name is collect, the only column allowed is the value column. If the table name is not collect, then the value column is the instantaneous value of the point. |
|
starttime |
The time from which to begin the trend data. This is entered as an integer representing Greenwich Mean Time (GMT) time, which is localized to your time zone. |
|
endtime |
The time at which the trend data stops. This is entered as an integer representing GMT time, which is localized to your time zone. |
|
showFieldTime |
If the table name is collect, enter 1 to display the field timestamp of the collection. Enter 0 or NULL to not display the field timestamp of the collection. |
Example
InterpTrend 'collect', 'analog.0analog.curval', 'value', 1401375720, 1401376860, 1
|
Time |
Milliseconds |
Value |
Status |
fieldTime |
field Milliseconds |
dqFlag |
|---|---|---|---|---|---|---|
|
1401375720 |
0 |
2 |
O |
1401375720 |
0 |
3 |
|
1401375780 |
0 |
2 |
O |
1401375780 |
0 |
3 |
|
1401375840 |
0 |
2 |
O |
1401375840 |
0 |
3 |
|
1401375900 |
0 |
2 |
O |
1401375900 |
0 |
3 |
|
1401375960 |
0 |
2 |
O |
1401375960 |
0 |
3 |
|
1401376020 |
0 |
2 |
O |
1401376020 |
0 |
3 |
|
1401376080 |
0 |
2 |
O |
1401376080 |
0 |
3 |
|
1401376140 |
0 |
2 |
O |
1401376140 |
0 |
3 |
|
1401376200 |
0 |
2 |
O |
1401376200 |
0 |
3 |
|
1401376260 |
0 |
2 |
O |
1401376260 |
0 |
3 |
|
1401376320 |
0 |
2 |
O |
1401376320 |
0 |
3 |
|
1401376380 |
0 |
2 |
O |
1401376380 |
0 |
3 |
|
1401376440 |
0 |
2 |
O |
1401376440 |
0 |
3 |
|
1401376500 |
0 |
2 |
O |
1401376500 |
0 |
3 |
|
1401376560 |
0 |
2 |
O |
1401376560 |
0 |
3 |
|
1401376620 |
0 |
2 |
O |
1401376620 |
0 |
3 |
|
1401376680 |
0 |
2 |
O |
1401376680 |
0 |
3 |
|
1401376740 |
0 |
2 |
O |
1401376740 |
0 |
3 |
|
1401376800 |
0 |
2 |
O |
1401376800 |
0 |
3 |
|
1401376860 |
0 |
2 |
O |
1401376860 |
0 |
3 |
(20 rows affected.)
Comments
This procedure is primarily used by easy eXtended Operator Station (ezXOS).