system.historian.types.dataPoint
New in 8.3.5
This function is used in Python Scripting.
Description​
Creates a data point that can be stored to a historian. Data points represent individual values associated with a historical path, timestamp, and quality.
The returned object is used with system.historian.storeDataPoints.
Client Permission Restrictions​
This scripting function has no Client Permission restrictions.
Syntax​
system.historian.types.dataPoint(source, value, [timestamp], [quality])
Parameters​
| Type | Parameter | Description |
|---|---|---|
| String | source | The historical path where the data point will be stored. |
| Object | value | The value to be stored in the historian. |
| Date | timestamp | The timestamp when the data point was recorded. If omitted, the current time is used. [optional] |
| Integer | quality | The quality code of the data point. If omitted, a "good" quality is used. [optional] |
Returns​
AtomicPoint - A data point object that can be passed to system.historian.storeDataPoints.
Scope​
Gateway, Vision Client, Perspective Session
Code Examples​
Create and Store Data Points
# Create a data point and store it using the historian API.
source = "histprov:default:/tag:MyTag"
value = 42
point = system.historian.types.dataPoint(
source,
value
)
system.historian.storeDataPoints([point])