This example shows you how to install a simulated OPC UA Server for use with the OPC Toolbox examples.
Many of the examples in OPC Toolbox need to connect to a live OPC server. OPC Foundation provides a set of sample OPC UA servers for demonstrating OPC UA functionality. This example explains how to download and install that simulation server, and test that MATLAB can connect to the server.
Note: You must have administrator privileges on your machine in order to install the OPC Foundation Quickstart Servers correctly.
Download the sample servers by visiting https://opcfoundation.org/developer-tools/developer-kits-unified-architecture/ and downloading the "Sample Applications".
You will be required to register with the OPC Foundation in order to download the Sample Applications.
Open the ZIP file you downloaded and run the .MSI file to install the OPC Quickstart examples.
Once installed, you must use the OPC UA Dashboard to launch each required server prior to using that server. The examples make use of the HA Data Server and the Generic Server. Because of the behvaiour of the servers, it is recommended that for these examples you run the servers only when exploring these examples, and close the servers when you have finished working with the examples.
Run the HA Data Server and Generic Server from the OPC UA Dashboard.
Browse for OPC UA servers on your local machine to verify that the two servers have successfully started.
sInfo = opcuaserverinfo('localhost')
sInfo = 1x2 OPC UA ServerInfo array: index Description Hostname Port ----- ----------------------------------- -------- ----- 1 Quickstart Historical Access Server ons-dean 62550 2 UA Sample Server ons-dean 51210