coder.descriptor.LookupTableDataInterface クラス
名前空間: coder.descriptor
スーパークラス: coder.descriptor.DataInterface
調整可能なパラメーターをもつ Lookup Table ブロックに関する情報を返す
説明
coder.descriptor.LookupTableDataInterface オブジェクトは、生成されたコードに調整可能なパラメーターをもつ以下の Lookup Table ブロックの各種プロパティを記述します。
1-D Lookup Table
2-D Lookup Table
n-D Lookup Table
Interpolation Using Prelookup
Sine
Cosine
作成
は、モデルに調整可能なパラメーターを使用する Lookup Table ブロックが含まれる場合に params = getDataInterfaces(codeDescObj, dataInterfaceName)coder.descriptor.LookupTableDataInterface オブジェクトを作成します。codeDescObj オブジェクトは、関数 getCodeDescriptor を使用することで、モデル用に作成された coder.codedescriptor.CodeDescriptor オブジェクトです。
入力引数
Parameters データ インターフェイスの種類を指定します。
例: Parameters
プロパティ
integer、double、matrix およびそのプロパティなどのデータに関連付けられているデータ型。
属性:
GetAccess | public |
SetAccess | public |
Simulink 識別子 (SID) は、Simulink がブロックに割り当てる、モデル内で一意な数字です。
属性:
GetAccess | public |
SetAccess | public |
テーブル データの関連付けられた調整可能なパラメーターの名前。
属性:
GetAccess | public |
SetAccess | public |
データ インターフェイスと対話するモデルのバリアント条件
属性:
GetAccess | public |
SetAccess | public |
生成されたコード内のデータの実装方法の記述。このプロパティは、データ型やサイズなどの特性を示します。コード内でのデータへのアクセス方法やデータの宣言方法も示します。プロパティは、データが変数として宣言されるか、構造体メンバーとして宣言されるかを示します。
属性:
GetAccess | public |
SetAccess | public |
ランタイム環境でデータにアクセスするレート。
属性:
GetAccess | public |
SetAccess | public |
モデル コンポーネントの境界で信号に属性として指定された物理単位。
属性:
GetAccess | public |
SetAccess | public |
ブロック出力信号の有効な値の範囲。
属性:
GetAccess | public |
SetAccess | public |
テーブルの有効なサイズの調整可能性がテーブルで有効かどうかを表す値。0 または 1 として指定します。
属性:
GetAccess | public |
SetAccess | public |
データ型: logical
ブレークポイント セット情報のソースで、'Explicit values' (既定)、'Even spacing' または 'Reference' として指定されます。ブレークポイントの指定は以下のようにマッピングされます。
Explicit values—STD_AXISReference—COM_AXISEven spacing—FIX_AXIS
ASAP2 ルックアップ テーブルの詳細については、Define ASAP2 Information for Lookup Tablesを参照してください。
属性:
GetAccess | public |
SetAccess | public |
データ型: char
ルックアップ テーブル演算の値を返します。
属性:
GetAccess | public |
SetAccess | public |
Lookup Table ブロックで使用される coder.descriptor.BreakpointDataInterface オブジェクトのベクトル。これらのオブジェクトに、ブレークポイント セット データが含まれます。
属性:
GetAccess | public |
メソッド
isLookupTableDataInterface | オブジェクトが coder.descriptor.LookupTableDataInterface オブジェクトかどうか確認する |
getAllParameters | 関連付けられた coder.descriptor.LookupTableDataInterface オブジェクトと coder.descriptor.BreakpointDataInterface オブジェクトをすべて返す |
例
この例では、ルックアップ テーブル ブロック情報を取得する方法を説明します。
モデルの作成
ルックアップ テーブル ブロックを含むモデルを開いて、ビルドします。
open_system('ASAP2Demo'); slbuild('ASAP2Demo');
### Searching for referenced models in model 'ASAP2Demo'. ### Total of 2 models to build. ### Starting serial code generation build. ### Successfully updated the model reference code generation target for: ASAP2DemoModelRef ### Starting build procedure for: ASAP2Demo codeInterfacePackaging: Nonreusable function codeInterfacePackaging: NonReusable ### Successful completion of build procedure for: ASAP2Demo Build Summary Model reference code generation targets: Model Build Reason Status Build Duration ============================================================================================================ ASAP2DemoModelRef Target (ASAP2DemoModelRef.c) did not exist. Code generated and compiled. 0h 0m 7.5706s Top model targets: Model Build Reason Status Build Duration ============================================================================================================ ASAP2Demo Information cache folder or artifacts were missing. Code generated and compiled. 0h 0m 17.111s 2 of 2 models built (0 models already up to date) Build duration: 0h 0m 25.852s
ルックアップ テーブルのパラメーターのプロパティを返す
モデルのコード記述子オブジェクトを作成します。
codeDescObj = coder.getCodeDescriptor('ASAP2Demo');ルックアップ テーブルのパラメーターのプロパティを返します。
params = getDataInterfaces(codeDescObj,'Parameters');変数 params は、coder.descriptor.DataInterface オブジェクトと coder.descriptor.LookupTableDataInterface オブジェクトからなる配列です。モデル ASAP2Demo には 3 つのルックアップ テーブル ブロックが含まれています。調整可能なブレークポイント セット データがあるのはそれらのうち 2 つだけです。コード ジェネレーターは、対応する 2 つの coder.descriptor.LookupTableDataInterface オブジェクトのみを作成します。
配列内の 6 番目の位置にアクセスして Standard_Axis ブロックの詳細を取得します。
params(6)
ans =
LookupTableDataInterface with properties:
Type: [1×1 coder.descriptor.types.Type]
SID: 'ASAP2Demo:12'
GraphicalName: 'tabledata'
VariantInfo: [1×0 coder.descriptor.VariantInfo]
Implementation: [1×1 coder.descriptor.DataImplementation]
Timing: [1×0 coder.descriptor.TimingInterface]
Unit: 'rpm'
Range: [1×1 coder.descriptor.Range]
SupportTunableSize: 0
BreakpointSpecification: 'Explicit values'
Output: [1×1 coder.descriptor.DataInterface]
Breakpoints: [1×2 coder.descriptor.BreakpointDataInterface Sequence]
バージョン履歴
R2020a で導入
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)