WOLFRAM SYSTEM MODELER
TankSystemA tank system model where height data is written to and read from an OPC UA node on an OPC UA server |
![]() |
SystemModel["OPCUA.Examples.TankSystem"]
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.
This example requires an OPC UA example server running on localhost
.
Read about how to start the example server here.
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 an OPC UA Server (using client
).
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 the server by client
is used as a reference signal to the PID component that controls the behavior of the second tank.
errorHandling |
Value: Types.ErrorHandling.ErrorWhenUncertain Type: ErrorHandling Description: How to handle node errors (request errors are handled by the connected Read/WriteNodeList component) |
---|
![]() |
tank1 |
Type: SimpleTank Description: Model of a simple tank holding liquid |
---|---|---|
![]() |
pulse |
Type: Pulse Description: Generate pulse signal of type Real |
![]() |
step |
Type: Step Description: Generate step signal of type Real |
![]() |
PI |
Type: LimPID Description: P, PI, PD, and PID controller with limited output, anti-windup compensation, setpoint weighting and optional feed-forward |
![]() |
tank2 |
Type: ControlledTank Description: Model of a simple tank with actuator input |
![]() |
client |
Type: Client Description: Client for connecting to an OPC UA server |
![]() |
clock |
Type: PeriodicExactClock Description: Generate a periodic clock signal with a period defined by an Integer number with resolution |
![]() |
shift |
Type: ShiftSample Description: Shift the input clock by a fraction of the last interval and provide it as output clock |
![]() |
write |
Type: Write Description: Adds writing of a Real scalar node to a WriteNodeList |
![]() |
read |
Type: Read Description: Adds reading of a Real scalar node to a ReadNodeList |