WOLFRAM SYSTEM MODELER

MultipleServers

Example that demonstrates a possible use of multiple servers

Diagram

Wolfram Language

In[1]:=
SystemModel["OPCClassic.Examples.MultipleServers"]
Out[1]:=

Information

This example demonstrates that using the OPC Classic Library, it is possible to connect to multiple servers from one model. The ready-to-use example uses the same server twice (due to limited availability of accessible OPC servers for testing), so in order to fully explore using multiple servers, you need to:

  1. Have access to a second OPC server, either on your local host or remote.
  2. Change hostName and serverName accordingly in component opcServer or opcServer1.
  3. Change the corresponding itemName in the connected block so that it connects to a simulation item on the new server.

The readReal component reads data from item "Saw-toothed Waves.Real8" on "Matrikon.OPC.Simulation.1". The data is then passed through a Butterworth lowpass filter with a cut-off frequency of 2.0 Hz. Finally, the component writeReal writes the filtered data to item "Bucket Brigade.Real8" on "Matrikon.OPC.Simulation.1".

There are several possible applications of being able to connect to more than one server from one model, such as processing data read from one server and writing the modified data to another server.

This is a demonstration of the use of multiple OPC servers

Plot of the saw-toothed signal read from component opcServer.


This is a demonstration of the use of multiple OPC servers

Plot of the filtered signal and the sampled data written to component opcServer1.

Components (5)

opcServer

Type: OPCServer

Description: A model used for setting up server parameters (name of host and server)

filter

Type: Filter

Description: Continuous low pass, high pass, band pass or band stop IIR-filter of type CriticalDamping, Bessel, Butterworth or ChebyshevI

readReal

Type: Read

Description: A block for reading data from items on an OPC server at intervals determined by parameter samplePeriod

writeReal

Type: Write

Description: A block for writing data to an item on an OPC server at intervals determined by parameter samplePeriod

opcServer1

Type: OPCServer

Description: A model used for setting up server parameters (name of host and server)