www.gusucode.com > opc 案例源码 matlab代码程序 > opc/demoUA_installserver.m

    %% Install an OPC UA Simulation Server for OPC UA Examples
% 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.

% Copyright 2012 The MathWorks, Inc. 
% $Revision: 1.1.6.1 $  $Date: 2012/04/14 04:18:44 $

%%
% *Note:* You must have administrator privileges on your machine in order to install the OPC Foundation Quickstart
% Servers correctly.

%% Download the OPC Foundation Sample Servers
% 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.

%% Install the OPC Quickstart 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.

%% Verify the Existence of the OPC Quickstart Simulation Server
% 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')