water tank model with dashboard -凯发k8网页登录
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(fullfile(matlabroot,'toolbox','sldrt','sldrtexamples','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