Water Tank Model with Dashboard
This example shows a real-time model of a water tank controlled by dashboard controls. You can change the inputs to the plant by using the dashboard knobs and observe the response on the gauges.
Run Model in Connected IO Mode
To switch to Connected IO mode if needed, on the Desktop Real-Time tab, select Mode > Connected IO.
To start the real-time execution, click Run in Real-Time.
Change the input flow and output valve values by using the dashboard controls and observe the results on the dashboard gauges.
Run Model in Run in Kernel Mode
To switch to Run in Kernel mode if needed, on the Desktop Real-Time tab, select Mode > Run in Kernel.
To start the real-time execution, click Run in Real-Time. The model builds, connects to Simulink® in Run in Kernel mode, and starts.
Change the input flow and output valve values by using the dashboard controls and observe the results on the dashboard gauges.
Open the Model
open_system('sldrtex_dashboard');
Open Subsystem and See Signals Marked for Signal Logging
Double click the
Tank dynamics
subsystem.Observe the
Overflow
,Water level
, andOutput flow
signals are marked for signal logging with the Simulation Data Inspector.
Run the Model and View Logged Signals
Click the Run in Real Time button.
Click the Data Inspector button.
Observe signal logging in the Simulation Data Inspector.
Clean Up the Model
clear close all bdclose all