OPC Toolbox

Read and write data from OPC servers and data historians

 

OPC Toolbox™ provides access to live and historical OPC data directly from MATLAB® and Simulink®. You can read, write, and log OPC data from devices, such as distributed control systems, supervisory control and data acquisition systems, and programmable logic controllers.

With OPC Toolbox you can work with data from live servers and data historians that conform to the OPC Data Access (DA) standard, the OPC Historical Data Access (HDA) standard, and the OPC Unified Architecture (UA) standard. The toolbox lets you securely connect to OPC UA servers using a variety of security modes, algorithms, and authentication methods.

The product includes Simulink blocks that let you model online supervisory control and perform hardware-in-the-loop controller testing.

Get Started:

Analyze Plant and Manufacturing Data

Access OPC data directly in MATLAB and Simulink.

OPC for Advanced Process Control and Smart Manufacturing

OPC Toolbox, powered by the Matrikon® Flex SDK, lets you access live and historical plant data so you can build online MATLAB based applications or validate Simulink models for advanced process control or smart manufacturing. You can analyze the acquired plant data to optimize manufacturing processes.

Simulink model created using blocks from OPC Toolbox, which provide direct access to OPC data.

OPC UA

Access both live and historical plant data securely from OPC UA-compliant servers.

Establish Secure OPC UA Connections

Authenticate secure OPC UA connections with username and password or X509 user certificate credentials. Sign and encrypt messages using OPC Foundation UA specification 1.04 security policies such as Basic256Sha256.

The OPC UA client object in MATLAB showing security mode and security policy information.

Graphically Browse Name Spaces

Find available nodes on an OPC UA, OPC DA, or OPC HDA server using a graphical browser that displays the index and IDs for all the nodes on the server.

Use the Browse Name Space tool to find the OPC nodes available on your server.

Access OPC UA Live Data

Exchange data with an OPC UA server using OPC UA Client objects in MATLAB. Interact with multiple nodes at the same time by creating an OPC UA node array. Access current node array data to get values, timestamps, and quality estimates.

MATLAB code used to connect to an OPC UA server and read the current value of a node array.

Access OPC UA Historical Data

Read historical data into MATLAB as datetime objects by specifying the nodes and a time range. Query aggregate functions that your server supports such as average, maximum, minimum, and delta, and read the preprocessed data into MATLAB.

Plot of OPC UA data filtered by data quality.

OPC DA

Access live plant data from OPC DA-compliant servers to validate models and run connected applications.

Connect to OPC DA Servers from MATLAB

Create an OPC Data Access client object to connect to an OPC DA server and browse the server namespace to retrieve properties of each item stored on the server. Use the OPC Data Access Explorer app to quickly connect to OPC DA servers without writing code. 

View server namespace and item properties with the OPC Data Access Explorer app.

Access OPC DA Servers from Simulink

OPC Read and OPC Write blocks retrieve and transmit data synchronously or asynchronously to and from the OPC DA server. The blocks contain a client manager that lets you specify and manage the OPC DA server, select items, and define block sample times.

The OPC Read block for Simulink. You can choose items from an OPC server and read online plant data directly into your Simulink model.

Work with OPC DA Data

Create Data Access Groups to control sets of Data Access items on the server. Read from or write to individual items or all the items in a group simultaneously. Log data to memory or disk.

OPC DA data organized by Client objects, Data Access groups, and Data Access item objects.

OPC HDA

Access and analyze historical plant data from OPC HDA-compliant servers for process optimization applications.

Connect to OPC HDA Servers

Create an OPC Historical Data Access Client object to connect to an OPC HDA server. Browse the server namespace and retrieve fully qualified IDs of each item stored on the server. Then use the IDs to request historical data from the server.

MATLAB code used to connect to an OPC HDA server and access historical data for processing.

Reading and Writing Data from an OPC HDA Server

Retrieve raw or processed data stored on the OPC HDA server by specifying the IDs you want to retrieve, and a time period for which to retrieve data.  Configure your acquisition to retrieve raw data, aggregated data, or modified data.

Plot of resampled data items acquired from an OPC HDA server.

Latest Features

OPC UA Security

Connect to OPC UA servers over secure connections and configure security settings

OPC UA Security

Authenticate a secure OPC UA connection with username and password or X509 user certificate credentials

OPC UA

Write arrays of values to an OPC UA client node

See release notes for details on any of these features and corresponding functions.