Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

通过交互显示控制仿真

为您的模型构建一个仪表板,在仿真期间以交互方式调节参数值并监控信号值

使用 Dashboard 库和 Customizable Blocks 库中可用的各种控件和显示为模型创建交互式控制板。

  • 控件连接到模型中的变量和模块参数,为您提供在仿真期间调节值的界面。

  • 显示连接到信号,并在仿真期间显示信号值。

要设计看起来像真实系统中的控制器和显示器的自定义 Dashboard 模块,请选择 Customizable Blocks 库中的模块。例如,您可以创建一个真实车辆中速度计的逼真模型。

您可以通过向 Simulink® 面板添加来自 Dashboard 库和 Customizable Blocks 库的模块来对现实生活中的仪表板和控制面板进行建模。面板浮动在画布之上,可以将它移至画布的任何位置。当您要在这些面板下的模型上工作时,可以将面板最小化。面板可以有多个选项卡,方便您将 Dashboard 模块组织到不同组中。

模块

全部展开

Dashboard Scope仿真期间跟踪示波器显示画面上的信号
Display在仿真期间显示信号值
GaugeDisplay signal value on circular scale
Half GaugeDisplay input value on semicircular scale
Quarter GaugeDisplay input value on quadrant scale
Linear GaugeDisplay input value on linear scale
Lamp显示反映信号灯上信号值的颜色
MultiStateImageDisplay image reflecting input value
Circular GaugeDisplay signal value during simulation on circular gauge with customizable appearance (自 R2020b 起)
DisplayDisplay signal value during simulation with customizable appearance (自 R2023b 起)
Horizontal GaugeDisplay signal value during simulation on horizontal gauge with customizable appearance (自 R2020a 起)
Vertical GaugeDisplay signal value during simulation on vertical gauge with customizable appearance (自 R2020a 起)
LampDisplay color that reflects signal value on lamp with customizable appearance (自 R2021b 起)
EditEnter new value for parameter
Knob用刻度盘调节参数值
Slider用滑动标尺调整参数值
Push Button使用按钮更改参数或变量值
Rotary SwitchSwitch parameter to set values on dial
Radio ButtonSelect parameter value
Combo BoxSelect parameter value from drop-down menu
Check BoxSelect parameter or variable value
Rocker Switch将参数在两个值之间切换
Slider Switch将参数在两个值之间切换
Toggle Switch将参数在两个值之间切换
Callback ButtonExecute MATLAB code using button
Knob Change parameter or variable value using knob with customizable appearance (自 R2021a 起)
Horizontal SliderChange parameter or variable value using horizontal slider with customizable appearance (自 R2021a 起)
Vertical SliderChange parameter or variable value using vertical slider with customizable appearance (自 R2021a 起)
Push ButtonChange parameter or variable value using button with customizable appearance (自 R2021b 起)
Callback ButtonExecute MATLAB code using button with customizable appearance (自 R2021b 起)
Rotary SwitchChange parameter or variable value using rotary switch with customizable appearance (自 R2021b 起)
Rocker SwitchChange parameter or variable value using switch with customizable appearance (自 R2021b 起)
Slider SwitchChange parameter or variable value using switch with customizable appearance (自 R2021b 起)
Toggle SwitchChange parameter or variable value using switch with customizable appearance (自 R2021b 起)

工具

仿真调速选项Slow simulation to a specified ratio of simulation time to wall clock time

对象

全部展开

Simulink.SimulationData.ParameterStores logged parameter data and metadata
Simulink.HMI.InstrumentedSignalsSave and restore signal logging specification
Simulink.HMI.SignalSpecificationProgrammatically connect a Dashboard block to a signal
Simulink.HMI.ParamSourceInfoInformation about Dashboard block variable and parameter connections

主题

带面板的模型仪表板

用 Dashboard 模块显示信号和控制参数

了解有关可视化仿真数据的更多信息