Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

バリアントのイベントベースのコンポーネント

初期化、リセット、および終了の各イベントと Simulink 関数を条件付きで実行

モデルの初期化、リセット、および終了の各イベントで、サブシステムの実行をバリアント制御の選択に応じてアクティブまたは非アクティブにできます。Simulink® 関数を条件付きで実行することもできます。

イベントベースのバリアント ブロックの生成コードには、システムのすべてのバリアントの選択を含めることができます。コードのコンパイル前に選択を切り替えることができます。イベント ベースのバリアント ブロックのコード生成の詳細については、を参照してください。

ブロック

Initialize Functionモデルの初期化イベントでサブシステムを実行
Reset Functionモデルのリセット イベントでサブシステムを実行
Terminate Functionモデルの終了イベントでサブシステムを実行
Simulink FunctionSimulink ブロックで関数をグラフィカルに定義

クラス

Simulink.VariantControlCreate a variant control variable object (R2021a 以降)
Simulink.Parameterパラメーター値の保存、共有、構成
Simulink.Variantバリアント選択を制御する条件を指定

関数

enumerationクラスの列挙型メンバーと名前

オブジェクト

struct構造体配列

トピック

  • Conditionally Execute Custom Initialize, Reinitialize, Reset, and Terminate Routines

    The custom routine blocks(Initialize Function, Reinitialize Function, Reset Function, and Terminate Function) blocks are preconfigured subsystem blocks that enable you to add custom routines to the default initialize, reset, and terminate routines to change or read block states. You can execute the custom routine conditionally by specifying variant conditions on the Event Listener block within custom routine blocks.

  • Conditionally Execute Simulink Functions

    With variant blocks, you can conditionalize functions defined using Simulink Function blocks. A variant condition from a variant block does not propagate inside a Simulink Function block. Instead, it stays on the boundary and controls the entire Simulink Function block. For more information, see Simulink Function.