このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。
ブロック マスクの作成
カスタマイズされた外観の作成、ユーザーが定義したインターフェイスの作成、ロジックのカプセル化、サブシステムおよびカスタム ブロックのデータの非表示
Simulink® を使用すると、ブロック マスクを作成できます。マスクとは、ブロックのカスタム ユーザー インターフェイスです。
ブロックのマスクによって、ブロック線図をカプセル化し、それぞれのブロック説明、パラメーター プロンプト、ヘルプ テキストを備えた独自のパラメーター ダイアログ ボックスをもつことができます。
マスクできるのは、Simulink で定義されているように、一意のブロックとして再利用できる独立したカスタム ブロックです。
ブロック マスクの作成の詳細については、簡単なマスクの作成を参照してください。
クラス
Simulink.Mask | マスクをプログラムで制御 |
Simulink.Mask.Constraints | マスク パラメーター制約を作成 |
Simulink.Mask.PortConstraints | Create mask port constraints programmatically (R2022a 以降) |
Simulink.Mask.ParameterCondition | Create mask parameter conditions (R2022a 以降) |
Simulink.Mask.PortConstraintRule | Create instance of Simulink.Mask.PortConstraintRule to define
rules of port constraint (R2022a 以降) |
Simulink.Mask.PortIdentifier | Create port identifiers to identify ports of block in mask object (R2022a 以降) |
Simulink.Mask.CrossPortConstraints | Creates cross-port constraint among ports of the same masked block (R2023a 以降) |
Simulink.Mask.SharedConstraintFile | Constraints that needs to be saved in an XML file (R2023a 以降) |
Simulink.MaskParameter | マスク パラメーターをプログラムで制御 |
Simulink.Mask.EnumerationBase | 任意のデータ型の数値を保持する列挙型クラスを導出 (R2021a 以降) |
Simulink.Mask.EnumerationTypeOptions | Simulink.IntEnumType および Simulink.Mask.EnumerationBase から派生する列挙ファイルの情報を解析 (R2021a 以降) |
Simulink.dialog.Control | ダイアログ コントロールのインスタンスの作成 |
Simulink.dialog.parameter.CustomTable | プログラムによるカスタム テーブルの作成 |
Simulink.dialog.ListboxControl | リスト ボックスをプログラムで制御 (R2019a 以降) |
Simulink.dialog.TreeControl | ツリー制御のプログラムによる制御 |
Simulink.dialog.LookupTableControl | Control mask lookup tables programmatically (R2021b 以降) |
Simulink.dialog.LookupTableControl.Table | Control table data for mask lookup table (R2021b 以降) |
Simulink.dialog.LookupTableControl.Breakpoints | Control breakpoint data set for mask lookup table (R2021b 以降) |
トピック
マスクの紹介
マスク エディターのユーザー インターフェイス
- マスク エディターの概要
マスク エディター インターフェイスを使用してマスクを作成およびカスタマイズします。 - DataTypeStr パラメーターを利用したデータ型の指定
[エディット] マスク パラメーターのデータ型制約を追加します。 - マスク ダイアログ ボックスの設計
この例を実行してみて、マスク ダイアログ ボックスを作成して一部のマスク エディター機能の使用方法を理解します。 - 大量のマスク パラメーターの処理
大量のマスク パラメーターをプログラムでテーブルに追加する。 - マスクされたブロックのテーブルのカスタマイズ
マスク ダイアログ ボックスにカスタム テーブルを追加する。 - プログラムによるカスタム テーブルの制御
プログラムによるインターフェイスを使用してカスタム テーブルを制御する。 - プログラムによるマスクの制御
Simulink® は、マスクの設定および編集を容易にする一連のパラメーターを定義しています。
マスク機能
- 制約を使用したマスク パラメーターの検証
制約を使用してマスク パラメーターに検証を追加する。 - マスク パラメーターのカスタム制約
マスクには、ユーザー入力値を受け入れるパラメーターを含めることができます。 - 複数のブロック マスクでのパラメーター制約の共有
この例では、パラメーター制約を作成し、それを同じモデルまたは別のモデルのさまざまなブロックのマスクで共有する方法を示します。 - Validate Input and Output Port Signals Using Port Constraints
You can validate compile-time signal attributes on the input and output ports of a masked block by using port constraints. Compile-time signal attributes include data type, complexity, and dimensions. You can define the rules to validate the data types, the complexity (real or complex), and dimensions (scalar, vector, or 2-D matrix) of port signals. You can also add parameter conditions to the constraint. The port constraints are active on the associated port only when it satisfies all the parameter conditions. Port constraints allow you to check that signal attributes satisfy the specified rules without having to write validation code. The mask identifies each port with port identifiers. You associate the port constraint to a port identifier. - Validate Port Signals Among Ports of the Same Masked Block
This example shows how to create cross port constraints to validate compile-time signal attributes among ports of the same masked block. For example, you can set a constraint among the input and output port signals of the masked block to have the same data type. The rules for the cross port constraints are predefined. The available rules are Same Data Type and Same Dimension. Additionally, you can also set parameter conditions. Each port in the masked block is identified by port identifiers. The cross port constraint association is done through port identifiers. - マスク コールバック コード
マスク コールバック コードを追加し、実行します。 - マスクの初期化
MATLAB® コードを使用してブロック マスクを初期化します。 - マスクにおけるブロック パラメーターのプロモート
ブロックおよびサブシステムは関連付けられた複数のパラメーターをもつことができます。 - マスク内のブロックに値を渡す
マスク ダイアログ ボックスを使用した入力値を指定します。 - リンク付きブロックのマスク
リンク付きブロックにカスタム インターフェイスを追加します。 - マスク ワークスペースまたはモデル ワークスペースを使用してバリアント ブロックのアクティブなバリアントの選択肢を制御する方法
この例では、インライン バリアント ブロックおよび Variant Subsystem ブロックのアクティブな選択肢をマスク ワークスペースまたはモデル ワークスペースから制御するさまざまな方法を示します。 - マスクされたブロックの測定単位の定義
マスクされたブロックの出力端子と入力端子に測定単位を設定する。 - マスクでのイメージの追加
イメージをマスク アイコンとして追加し、それを SLX ファイルに保存する。 - Graphical Icon Editor Overview
Create and edit mask icon of a block in a graphical environment. The features in the Graphical Icon Editor help you to easily create icons. You can also create and edit the block mask icons using a set of drawing commands. For more information, see マスク描画コマンドを使用したマスク アイコンの描画. - マスク ダイアログでの階層リストの作成
マスク上のデータの階層リストを作成する。 - Tune Mask Enumeration Parameters - Popup and Radio Button
Reference external enumeration file to assign numerical values to popup parameter. - Visualize and Plot N-Dimensional Data Using Mask Lookup Table Control
Use a lookup table to evaluate a sampled representation of a function using simple lookup operations. It enables you to assess the function with less computation time than running the function. You can visualize, edit, and plot N-dimensional lookup table data in mask dialog using the lookup table control.
マスク コールバック
- Organize Mask Initialization and Callbacks in a MATLAB File
You can organize mask initialization and mask callback code in a separate MATLAB® class file. By using a separate MATLAB file you can: - 動的なマスク ダイアログ ボックス
ユーザー入力に基づきマスク ダイアログ ボックスを変更します。 - 動的なマスク サブシステム
ブロックの構造的な内容を変更できるマスク ライブラリ ブロックを作成します。 - MATLAB コードを使用するマスクのデバッグ
マスク初期化コード内でエラーをトラブルシューティングします。
システム マスク
- システム マスクの概要
モデルのマスクについて学習します。 - プログラムによるマスクの制御
Simulink® は、マスクの設定および編集を容易にする一連のパラメーターを定義しています。 - マスクしたモデルの作成と参照
モデルを対話方式でマスクする。 - プログラムによるシステム マスクの制御
Simulink® では、システム マスクを構成および編集する一連のパラメーターが定義されます。
モデル例
- マスクのモデル例
マスク機能を説明する Simulink モデルを表示します。