Aveva Historian Reader Documentation
Version:Â 1.1.1Â
Retrieved:Â 2025-10-09 15:15:14
Aveva Reader
This module retrieves data from an Aveva historian database. It can get the values added since the last request as well as values within a specified time window, starting from an offset back in time.
Settings
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| Target Property | Length:Â 1-64 | The property to write the result into. | data |
| Offset | Number | The time in ms back in history to collect data until, leave this and window size at 0 to get all data from the last query | Â |
| Window Size | Number | The size of the time window to get, ending at the offset | Â |
| Tags | List of strings | The Tags to get, leave empty to get all tags | Â |
| Tags collection (Resource) | Resource containing tags | Â | Â |
| Include vValue | Boolean | If true, the vValue will be included in the result | Â |
| Retrival Mode | Â | The mode to retrieve the data, see the Historian documentation for more information | Â |
| Filters | List of objects | A list of statements that are translated into a SQL WHERE statement, if many filters are used each row must match every one of them (AND) | Â |
| Force UTC | boolean | Force the time to be in UTC instead of local time | Â |
Filters
| Column | The column to get data from |
| Operator | The operator to use |
| Data | The data to compare to |
| Behaviour | The behavior to use: if Static the data field is used as is, if Property the data field is used to match a property on the incoming message |
Credential
This module needs a credential of type 'Connection string' to connect to the database server. A minimal connection string is shown below. Depending on the setup of your database server additional parameters may be needed. Please consult the documentation for your server.
Server=tcp:192.168.0.5;Database=crosser;User ID=demo;Password=crosser123;
Retrieval Modes
When using other retrieval modes than 'Full' you typically need to provide additional conditions. For example, with 'Delta' mode you can specify conditions on one or both of the 'wwTimeDeadband' and 'wwValueDeadband' parameters. You do this by adding 'Filters'. Let's say we only want to get changes ('Delta' mode) on tag values, but no more often than every 5 seconds. Then we can add this filter:
wwTimeDeadband Equals 5000Â (the time unit is ms)
Read more about the available parameters and how they impact the different retrieval modes in the Aveva Historian documentation.
Resource File
Each needs to have a 'name' tag. in addition you can add additional tags to the resource file, these tags will be used to attach metadata to the result
{
"tags": [
{
"name": "heater_001.sensorfault",
"machine": "alfa"
},
{
"name": "heater_002.sensorfault",
"machine": "beta"
}
]
}
will give output in the format of
{
"dateTime":"2024-09-05T13:19:30.034+00:00",
"machine":"alfa",
"tagName":"heater_001.sensorfault",
"value":0
}
Input
A query will be sent to the database each time a message is received
Output
An output message will be sent each time the module receives a message. The result of the query will be added to the incoming message on the configured [Target Property]. If the target property exists on the incoming message it will be overwritten.
| Name | Type | Description |
|---|---|---|
| [Target Property] | Object array | Each measurement is represented as an object in the array |
| crosser.success | Boolean | True if the message was stored properly in the database, otherwise False |
| crosser.message | String | Contains a error message in case the insert failed, if the insert is successful this property is not set. |
Example
Prerequisite: A database with three tags usage_idle, usage_irq and usage_nice
#Settings
Target Property: data
Tags: usage_idle, usage_nice, usage_irg
Offset: 0
TimeWindow: 0
# Output
{
"data": [
{
"DateTime": "2020-08-20T14:47:00Z",
"TagName": "usage_idle
"Value": 0.2
},
{
"DateTime": "2020-08-20T14:47:00Z",
"TagName": "usage_nice"
"Value": 0.5
},
{
"DateTime": "2020-08-20T14:47:00Z",
"TagName": "usage_irq"
"Value": 0.1
}
]
}
Search Documentation
Data Sources