Main Content

シミュレーションを制御するためのアプリの作成

App Designer を使用した Simulink® シミュレーションを操作するカスタム アプリの対話的な作成

App Designer を使用して、Simulink シミュレーションを操作するカスタム アプリを作成します。次のようにアプリを対話的に構成します。

  • 特殊な Simulink UI コンポーネントを使用して、シミュレーションの実行や一時停止、進行状況の表示などの一般的なタスクを実行する。

  • UI コンポーネントをモデル内の変数に接続して、シミュレーションの実行中にモデル変数を調整する。

  • 時間スコープの UI コンポーネントをモデル内の信号に接続して、シミュレーション結果を可視化する。

はじめに、Create App for Simulink Modelを参照してください。

関数

すべて展開する

uitimescopeDisplay time-domain signals in app (R2024a 以降)
uisimdatabuttonCreate buttons to save or load simulation data in app (R2024a 以降)
uisimcontrolsCreate simulation controls in app (R2024a 以降)
uisimprogressDisplay simulation progress bar in app (R2024a 以降)
uisimvartunerCreate a model variable tuner UI component in an app (R2024a 以降)
bindConnect app components to simulation signals and variables (R2024a 以降)
findbindingsFind bindings between objects (R2024a 以降)

シミュレーションの構成

setExternalInputSimulationInput オブジェクトまたは Simulation オブジェクトを使用して、最上位の入力端子の外部入力データを指定する
setInitialStateSpecify initial state for simulation using SimulationInput or Simulation object
setVariableSimulationInput オブジェクトまたは Simulation オブジェクトを使用してシミュレーション用の変数値を設定する
setModelParameterSet model parameter values for simulation using SimulationInput or Simulation object
setBlockParameterSet block parameter values for simulation using SimulationInput or Simulation object

シミュレーションの実行の制御

initializeInitialize simulation represented by Simulation object (R2024a 以降)
startStart simulation represented by Simulation object (R2024a 以降)
stepAdvance simulation represented by Simulation object by specified amount (R2024a 以降)
pausePause active simulation represented by Simulation object (R2024a 以降)
resumeContinue paused simulation represented by Simulation object (R2024a 以降)
stopStop simulation represented by Simulation object (R2024a 以降)
terminateTerminate simulation represented by Simulation object (R2024a 以降)

オブジェクト

すべて展開する

BindingConnection between app components and simulation signals and variables (R2024a 以降)
SimulationControl simulation execution and tune variable, block parameter, and model parameter values (R2024a 以降)

プロパティ

すべて展開する

TimeScope PropertiesControl time scope UI component appearance and behavior (R2024a 以降)
LoadInputButton PropertiesControl load input button UI component appearance and behavior (R2024a 以降)
SaveOutputButton PropertiesControl save output button UI component appearance and behavior (R2024a 以降)
SimulationControls PropertiesManage simulation controls UI component appearance and behavior (R2024a 以降)
SimulationProgress PropertiesControl simulation progress bar appearance and behavior (R2024a 以降)
VariableTuner PropertiesControl variable tuner behavior and appearance (R2024a 以降)

トピック