Documentation

OPC Toolbox Functions

Server Discovery

opcregister Install and register OPC Foundation Core Components
opcserverinfo Version, server, and status information
opchdaserverinfo Query host for installed HDA servers
opc.hdaSupport OPC Toolbox HDA troubleshooting utility
opc.daSupport OPC Toolbox data access troubleshooting utility
opcsupport OPC Toolbox troubleshooting utility
opcDataAccessExplorer Open OPC Data Access Explorer app
openosf Open OPC Data Access Explorer session file

Server Connection and Browsing

opcfind Find OPC Toolbox objects with specific properties
opcda Construct OPC data access object
opchda Create OPC historical data access client
connect Connect OPC Toolbox client to server
isConnected True if HDA Client is connected to server
disconnect Disconnect OPC Toolbox client from server
propinfo Property information for OPC Toolbox objects
obj2mfile Convert OPC Toolbox object to MATLAB code
opcreset Disconnect and delete all OPC Toolbox objects
opc.hda.reset Disconnect and delete all OPC HDA client objects
getnamespace (opcda) OPC data access server name space
getNameSpace (opchda) OPC historical data access server name space
browsenamespace (opcda) Graphically browse OPC DA server name space
browseNameSpace (opchda) Graphically browse OPC HDA server name space
flatnamespace Flatten hierarchical OPC name space
serveritems Query server or name space for fully qualified item IDs
opcserverinfo Version, server, and status information
opchdaserverinfo Query host for installed HDA servers
readItemAttributes Read item attribute values from OPC HDA server
serveritemprops Property information for items in OPC server name space
getDescription Get description of OPC HDA aggregate type or item attribute
getIDFromname Translate OPC HDA aggregate type or item attribute name to numeric identifier
getIDList Get all aggregate type or item attribute IDs
getNameList Get all aggregate type or item attribute names
copyobj Make copy of OPC data access object
delete Remove OPC Toolbox objects from memory
isvalid True for undeleted OPC Toolbox objects
save Save OPC Toolbox objects to MAT-file
load Load OPC Toolbox objects from MAT-file
disp Summary of information for OPC Toolbox objects
get OPC Toolbox object properties
set Configure or display OPC Toolbox object properties
opchelp Help for OPC Toolbox data access function or property

Data Access

Item and Group Management

addgroup Add data access group to opcda object
additem Add data access items to dagroup object
clonegroup Clone group into new private group on same client
makepublic Convert private group into public group
removepublicgroup Remove public group from server

Data Reading and Writing

read Read data synchronously from OPC groups or items
readasync Read data asynchronously from group or items
write Write values to group or items
writeasync Asynchronously write values to group or items
cancelasync Cancel asynchronous read and write operations

Data Visualization

trend Display graphical trend of OPC data for group
opcqid Construct quality ID from item's quality string
opcqparts Extract quality parts from OPC quality ID
opcqstr Convert OPC quality ID into readable string

Data Logs and Buffers

refresh Read all active items in group
start Start a logging task
stop Stop a logging task
wait Suspend MATLAB execution until object stops logging
flushdata Remove all logged data records associated with dagroup object
getdata Retrieve logged records from OPC Toolbox engine to MATLAB workspace
peekdata Preview most recently acquired data
opcread Read logged records from disk to MATLAB workspace
opcstruct2array Convert OPC data from structure to array format
opcstruct2timeseries Convert OPC data from structure to time series format

Events and Callbacks

opccallback Event information for OPC Toolbox callbacks
cleareventlog Clear event log, discarding all events
showopcevents Event log summary for OPC Toolbox events
genslread Generate Simulink OPC Read block from MATLAB group object
genslwrite Generate Simulink OPC Write block from MATLAB group object

Historical Data Access

Raw Data

readRaw Read raw data stored over a time range from HDA server
readModified Read modified data from an OPC HDA server

Processed Data

readAtTime Read data from an OPC HDA server at specified times
readProcessed Read server-aggregated data from an OPC HDA server
getDescription Get description of OPC HDA aggregate type or item attribute
getIDFromname Translate OPC HDA aggregate type or item attribute name to numeric identifier
getIDList Get all aggregate type or item attribute IDs
getNameList Get all aggregate type or item attribute names

Data Manipulation and Display

single Convert OPC HDA Data object array to single type matrix
double Convert OPC HDA data object array to double type matrix
int8 Convert OPC HDA data object array to int8 matrix
int16 Convert OPC HDA data object array to int16 matrix
int32 Convert OPC HDA data object array to int32 matrix
int64 Convert OPC HDA data object array to int64 matrix
uint8 Convert OPC HDA data object array to uint8 matrix
uint16 Convert OPC HDA data object array to uint16 matrix
uint32 Convert OPC HDA data object array to uint32 matrix
uint64 Convert OPC HDA data object array to uint64 matrix
logical Convert OPC HDA data object array to logical matrix
tsintersect Intersection of time stamp in OPC HDA data object
tsunion Union of time stamps in an OPC HDA data object
arrayHasSameTimeStamp True if all elements of OPC HDA data object have same time stamp vector
getIndexFromID Indices matching OPC HDA data item IDs
resample Resample OPC HDA data object to have defined time stamps
opc.setDateDisplayFormat Set format for date display of OPC objects
opc.getDateDisplayFormat Format for date display of OPC objects
showValues Display table of values for OPC HDA data object
stairs Plot OPC HDA data object as stairstep graph
plot Plot OPC HDA data object as lines
opc.daQualityString OPC data access part of quality ID as strings
opc.hdaQualityString OPC historical data access part of quality ID as strings
Was this topic helpful?