readProcessed
Read aggregate data from nodes of an OPC UA server
Syntax
Description
reads processed historical data from the nodes given by UaData
= readProcessed(UaClient
,NodeList
,AggregateFn
,AggrInterval
,StartTime,EndTime
)NodeList
.
NodeList
must be an array of OPC UA node objects, which you can create
using getNamespace
, browseNamespace
, or
opcuanode
. The interval between StartTime
and
EndTime
(which can be datetime variables or date numbers) is split into
intervals of AggrInterval
, a MATLAB duration variable or a double
representing the interval in seconds. For each interval of time, the server calculates a
processed value based on the AggregateFn
requested.
AggregateFn
can be specified as a character vector or as an
AggregateFnId
object. A client stores the available Aggregates for a
server in the AggregateFunctions
property. For a description of Aggregate
functions, see OPC UA Aggregate Functions.
UaData
is returned as a vector of OPC UA data objects. If
readProcessed
fails to retrieve historical data for a given node,
that node is not included in the returned OPC UA data object, and a warning is issued. If
all requested nodes fail, an error is generated.
reads from the nodes identified by UaData
= readProcessed(NodeList
,AggregateFn
,AggrInterval
,StartTime,EndTime
)NodeList
. All nodes must be of the
same connected client.
OPC UA servers provide historical data only from nodes of type
Variable
. If you attempt to read values from an
Object
node, no data is returned for that node, and the status for that
node is set to Bad:AttributeNotSupported
, a warning is issued, and the
node is not included in the returned UaData
object.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2015b