Parameter
Description
SQL_Clause
Filter criterion in SQL syntax:
[WHERE search_condition] [ORDER BY {order_expression [ASC|DESC] } ]
The criterion "ORDER BY" can only be used with a specified sort order
"{order_expression [ASC|DESC] }" .
TimeStep
Values in the specified time interval are grouped together beginning at the start time
<TimeBegin>.
Format: 'TIMESTEP=x,y'
x = period in seconds
y = aggregate function type
The interval result is returned for an interval depending on the type of aggregate
function. The following values are possible for the type of aggregate function:
● Without interpolation:
If there are no values in the period, no period result will be returned.
1 (FIRST): First value
2 (LAST): Last value
3 (MIN): Minimum value
4 (MAX): Maximum value
5 (AVG): Average
6 (SUM): Sum
7 (COUNT): Number of values
● With interpolation:
An interval result is returned for every interval. This is done with linear interpolation.
There is no extrapolation.
257 (FIRST_INTERPOLATED): First value
258 (LAST_INTERPOLATED): Last value
259 (MIN_INTERPOLATED): Minimum value
260 (MAX_INTERPOLATED): Maximum value
261 (AVG_INTERPOLATED): Average
262 (SUM_INTERPOLATED): Sum
263 (COUNT_INTERPOLATED): Number of values
Example: With TIMESTEP=60,257 , an interpolated value is returned for each 60
second period:
"TAG:R,1,'2004-07-09 09:03:00.000','0000-00-00 00:10:00.000','TIMESTEP=60,257'"
Rule
Note the following:
● <TimeBegin> and <TimeEnd> may not both be "ZERO" = "0000-00-00 00:00:00.000".
● In order to read data, <TimeBegin> must come before <TimeEnd>. For reverse sorting,
use the parameter "Order by-Clause" .
● To improve performance, use the "ValueID" in the query instead of "ValueName". You can
get the "ValueID" from the "Archive" table.
● With process values, some applications cannot handle the time with a resolution of 1 ms
and this can lead to inaccuracies.
OpenPCS 7 interface
6.7 OLE DB
OpenPCS 7
Function Manual, 05/2012, A5E02780178-02
87
Содержание SIMATIC OpenPCS 7
Страница 6: ......
Страница 16: ......
Страница 22: ......
Страница 32: ...System configurations 5 1 General configuration OpenPCS 7 32 Function Manual 05 2012 A5E02780178 02 ...
Страница 94: ......