WOLFRAM SYSTEM MODELER

TankSystem

A tank system model where height data is written to and read from an OPC item

Diagram

Wolfram Language

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

Information

In this example, sampled data from one system is used to control the behavior of another, and the OPC server works as the communication link between these two systems.

The first system consists of a simple tank (tank1) with an outlet. The tank is fed with a medium in a pulse-wise manner determined by component pulse. The height of the medium in the tank is sampled every 0.2 seconds and written to a MatrikonOPC Server (opcServer). The sampled data represents a height profile that should be mimicked in tank2 in the second system. To achieve this behavior, the height data read from opcServer is used as a reference signal to the PID component that controls the behavior of the second tank.

This is a model of two tank systems communicating via an OPC server

Plot of the height of tank1 and the sampled signal written to the OPC server.


 

This is a model of two tank systems communicating via an OPC server

Plot of the height of tank2 and the reference signal fed to the PID controller.

Components (8)

writeReal

Type: Write

opcServer

Type: OPCServer

readReal

Type: Read

tank1

Type: SimpleTank

pulse

Type: Pulse

step

Type: Step

PI

Type: LimPID

tank2

Type: ControlledTank