Main Content

Install a Simulation Server for OPC Examples

This example shows you how to install a simulated OPC Server for use with the OPC examples.

Many of the OPC examples need to connect to a live OPC server. Matrikon™, a supplier of a variety of OPC servers, provides a simulation server for testing purposes. 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 Matrikon OPC Simulation Server correctly.

Download the Matrikon OPC Simulation Server

Download the simulation server by visiting and downloading the "OPC Simulation Server".

You may be required to register with Matrikon in order to download the OPC Simulation Server.

Install the OPC Simulation Server

Perform a default installation of the Matrikon OPC Simulation Server, including all prerequisites.

Run OPCREGISTER (64-bit users only)

If you are running 64-bit MATLAB, you should re-register the OPC Foundation Core Components that ship with MATLAB. This enables the 64-bit MATLAB application to browse for 32-bit servers on your machine.


Verify the Existence of the OPC Simulation Server

Browse for OPC servers on your local machine to verify that the OPC Simulation Server has been successfully installed.

sInfo = opcserverinfo('localhost')
sInfo = 
                 Host: 'localhost'
             ServerID: {'Matrikon.OPC.Simulation.1'  'OSI.DA.1'  'OSI.HDA.1'}
    ServerDescription: {1x3 cell}
     OPCSpecification: {'DA2'  'DA2'  'DA2'}
    ObjectConstructor: {1x3 cell}

The list of ServerIDs should include Matrikon.OPC.Simulation.1