Data Reading and Writing
Exchange data with the OPC server using individual items, or using
the dagroup
object to perform the operation on
multiple items. The reading and writing operation can be performed
synchronously, so that your MATLAB® session waits for the operation to complete, or
asynchronously, allowing your MATLAB session to continue processing while the operation
takes place in the background.
Functions
read | Read data synchronously from OPC DA 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 |
Properties
opcda Object Properties | Configure OPC DA client |
dagroup Object Properties | Configure OPC dagroup object |
daitem Object Properties | Configure OPC daitem object |
Topics
- Read and Write Data on OPC DA Server
Use group and item objects to read and write data on an OPC DA server synchronously and asynchronously.
- Work with Structure-Formatted Data
Learn about the structure format of OPC data in the toolbox.
- OPC Data: Value, Quality, and TimeStamp
Learn about the Value, Quality, and TimeStamp elements that make up OPC data.
- Array-Formatted Data
Use array formats returned by the toolbox.
- Work with Different Data Types
Learn how the toolbox handles MATLAB data types and OPC server data types.