このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
ブロック マスクの作成
カスタマイズされた外観の作成、ユーザーが定義したインターフェイスの作成、ロジックのカプセル化、サブシステムおよびカスタム ブロックのデータの非表示
Simulink® を使用すると、ブロック マスクを作成できます。マスクとは、ブロックのカスタム ユーザー インターフェイスです。
ブロックのマスクによって、ブロック線図をカプセル化し、それぞれのブロック説明、パラメーター プロンプト、ヘルプ テキストを備えた独自のパラメーター ダイアログ ボックスをもつことができます。
マスクできるのは、Simulink で定義されているように、一意のブロックとして再利用できる独立したカスタム ブロックです。
ブロック マスクの作成の詳細については、簡単なマスクの作成を参照してください。
クラス
トピック
マスクの紹介
マスク エディターのユーザー インターフェイス
- マスク エディターの概要
マスク エディター インターフェイスを使用してマスクを作成およびカスタマイズします。 - 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 ファイルに保存する。 - マスク ダイアログでの階層リストの作成
マスク上のデータの階層リストを作成する。 - 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. - Preserve Tunability of Parameters That Are Modified or Created in Mask Initialization
A desirable feature of code generated from a model is the ability to tune variables to different values. To achieve this, user-defined variables in the model must be present in the generated code. If a model contained blocks with mask initialization commands that creates a new variable or modified an existing mask dialog parameter in the mask initialization, and if that parameter or variable is referenced in a child block, the values of the mask parameter or variable were in-lined in the generated code. The parameters were not tunable even if they referred to a workspace variable.
グラフィカル アイコン エディター
- Create and Edit Block Mask Icon
Create block mask icon using Graphical Icon Editor and Mask Drawing commands. You can toggle between the two modes from Mask Editor. This example shows how to draw a block icon with the following features using the Graphical Icon Editor.
マスク コールバック
- 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 モデルを表示します。