Main Content

Historical Data Access

Access data on OPC HDA servers

Industrial Communication Toolbox™ provides an OPC HDA client that connects to OPC HDA servers. Use the client to read and interpret both raw and processed data. Alternatively, retrieve raw values and process them with OPC HDA functions in the toolbox. While working with large data sets, instructing the server to return only processed data can reduce transfer time and volume.

MATLAB® stores all data from an OPC HDA server as an OPC HDA data object, facilitating convenient data storage, manipulation, and visualization. Each data element includes data value, quality, and timestamp associated with an item ID.

Functions

expand all

opcregisterInstall and register OPC Foundation core components
opchdaserverinfoQuery host for installed HDA servers
opchdaCreate OPC historical data access client
connectConnect client object to OPC server
isConnectedDetermine if HDA client is connected to server
disconnectDisconnect client object from OPC server
opc.hda.resetDisconnect and delete all OPC HDA client objects
findDescriptionLocate OPC HDA servers using server description
getNamespaceOPC HDA server namespace
browseNamespaceGraphically browse OPC HDA server namespace
readRawRead raw data of specified time range from HDA server
readModifiedRead modified data from an OPC HDA server
readAtTimeRead data from an OPC HDA server at specified times
readProcessedRead server-aggregated data from OPC HDA server
opc.hdaQualityStringconverts OPC HDA quality ID to quality string
readItemAttributesRead item attribute values from OPC HDA server
getDescriptionGet description of OPC HDA aggregate type or item attribute
getIDFromNameGet ID of OPC HDA aggregate type or item attribute
getIDListGet IDs of all aggregate types or item attributes of OPC HDA object
getNameListGet names of all aggregate types or item attributes of OPC HDA object
getIndexFromIDIndices matching OPC HDA data item IDs
opc.setDateDisplayFormatSet display format of timestamp for OPC data objects
opc.getDateDisplayFormatGet display format of timestamp for OPC data objects
showValuesDisplay table of values for OPC HDA data object
stairsPlot OPC HDA data in stairstep graph
plot Plot OPC HDA data in line graph
tsintersectIntersection of timestamps in OPC HDA data object
tsunionUnion of timestamps in OPC HDA data object
arrayHasSameTimeStampVerify if all elements in OPC HDA data object have same timestamp
resampleResample OPC HDA data object to have defined timestamps
singleConvert OPC HDA data object array to single matrix
doubleConvert OPC HDA data object array to double matrix
int8Convert OPC HDA data object array to int8 matrix
int16Convert OPC HDA data object array to int16 matrix
int32Convert OPC HDA data object array to int32 matrix
int64Convert OPC HDA data object array to int64 matrix
uint8Convert OPC HDA data object array to uint8 matrix
uint16Convert OPC HDA data object array to uint16 matrix
uint32Convert OPC HDA data object array to uint32 matrix
uint64Convert OPC HDA data object array to uint64 matrix
logicalConvert OPC HDA data object array to logical matrix

Topics

About OPC Historical Data Access (HDA)

Server Connection and Browsing

Data Retrieval and Display

Featured Examples