Skip to main content
Version: 8.3

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​

TypeParameterDescription
StringsourceThe historical path where the data point will be stored.
ObjectvalueThe value to be stored in the historian.
DatetimestampThe timestamp when the data point was recorded. If omitted, the current time is used. [optional]
IntegerqualityThe 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])