Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

TRUNCATE examples

  • Last UpdatedMar 04, 2025
  • 1 minute read

Example 1

The following expression returns the product of flow rates for two pumps, with the fractional portion of each value removed.

TRUNCATE( Pump101.Flow * Pump102.Flow )

Represented as a query:

SELECT DateTime, Value, OPCQuality

FROM History

WHERE wwExpression = 'TRUNCATE( Pump101.Flow * Pump102.Flow )'

Results:

DateTime

Value

OPCQuality

2022-03-31 15:24:49.2590000

11030

192

2022-03-31 15:24:51.2590000

14974

192

2022-03-31 15:24:53.2590000

14542

192

2022-03-31 15:24:55.2590000

14887

192

...

...

...

Represented as a line chart over a 1 hour interval:

Truncate graph example.

Example 2

The following expression divides the current time's second value by 5, removing the fractional portion.

TRUNCATE( SysTimeSec / 5.0 )

Represented as a query:

SELECT DateTime, Value, OPCQuality

FROM History

WHERE wwExpression = 'TRUNCATE( SysTimeSec / 5.0 )'

AND wwRetrievalMode = 'Full'

Results:

DateTime

Value

OPCQuality

2022-03-31 15:31:39.0000000

7

192

2022-03-31 15:31:40.0000000

8

192

2022-03-31 15:31:41.0000000

8

192

2022-03-31 15:31:42.0000000

8

192

...

...

...

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in