Skip to main content
Version: 8.1

system.opchda.readProcessed

This function is used in Python Scripting.

Description​

Reads processed values from the OPC-HDA server. Processed values are calculated values, based on the aggregate function requested for each item. The list of aggregates can be obtained by calling system.opchda.getAggregates().

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.opchda.readProcessed(serverName, itemIds, startDate, endDate, resampleIntervalMS, aggregates)

Parameters​

TypeParameterDescription
StringserverNameThe name of the defined OPC-HDA server to read.
List[String]itemIdsA list of item ids to read.
AnystartDateThe starting date/time of the query.
AnyendDateThe ending date/time of the query.
IntegerresampleIntervalMSThe interval, in milliseconds, that each value should cover.
List[Integer]aggregatesA list which should be one-to-one with the item ids requested, specifying the integer id of the aggregation function to use. The aggregation ids are defined in the OPC-HDA specification. The list of aggregates can also be obtained by calling system.opchda.getAggregates().

Returns​

List[ReadResults] - A list of read results which is one-to-one with the item IDs passed in. The ReadResult object has a 'serviceResult' quality property that indicates whether the call was successful, and is itself a list of QualifiedValues.

Scope​

Gateway, Vision Client, Perspective Session

Code Examples​

Example #1
# This example will read processed data from a Matrikon server between two specified dates.
# Declare start and end dates
start = system.date.getDate(2022, 3, 14)
end = system.date.now()

# Call system function and print results
readValue = system.opchda.readProcessed("Matrikon",[1],start,end,1000,[1])
print readValue

Keywords​

system opchda readProcessed, opchda.readProcessed