Lookup Table Blocks

From NewEagleWiki
Revision as of 17:23, 17 June 2010 by Anonymous (talk | contribs) (Created page with '==A== ===MotoHawk:Blocks:Adapt Table=== This MotoHawk® block modifies the values of a 1-D or 2-D table at runtime. The Table Name must reference a 1-D or 2-D table defined els…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A

MotoHawk:Blocks:Adapt Table

This MotoHawk® block modifies the values of a 1-D or 2-D table at runtime. The Table Name must reference a 1-D or 2-D table defined elsewhere in the model, using either an Interpolation or Table block. The 'Adapt Quantity' input will be summed into the table at the locations surrounding the currently used location of the table. The 'Adapt Min' and 'Adapt Max' values saturate the adapted value after adding the 'Adapt Quantity'.

If the current index of the table is within 1/4 of a breakpoint, then all of the error will be added to that location. Otherwise, 1/2 of the error will be distributed to the two neighboring table locations. The 'Adapt Mode' selects whether 1/2 of the error will be distributed at all. The adaption can be disabled when between points. The 'Output Adapted Value' checkbox selects whether an output port will be exposed that outputs the amount distributed to all appropriate cells in the adapt table.

C

MotoHawk:Blocks:Convert Index T to Double

This MotoHawk® block converts the custom index_T data type, which is output by a MotoHawk Prelookup block, into a double, which has the form 'index.fraction'. Index is a zero-based integer representing the table index, and fraction is used for interpolation.

I

MotoHawk:Blocks:Interpolation1D

This MotoHawk® block behaves similarly to the native Simulink Interpolation (1-D). It is used with the Prelookup block. Note that the generated VarDecs will be the entered 'Name' with suffix 'Tbl', and one with the 'Name' if no explicit 'Output Name' is supplied.

MotoHawk:Blocks:Interpolation1D Reference

This MotoHawk® block performs the same operation as a MotoHawk Interpolation (1-D) block, but does not define any data or create any VarDecs visible from MotoTune. Data Storage created by any another MotoHawk Data Definition may be referenced. However, proper viewing of the associated index array in MotoTune will only be available if the data from another MotoHawk Interpolation 1-D block is referenced.

MotoHawk:Blocks:Interpolation2D

Use this MotoHawk® block to define 2D Interpolation (tables). Name is the VarDec name used in MotoTune. The output is normally assigned a Display variable with this name, and the 2-D Calibration table has the suffix 'Map'. Output Name is an optional name for the output of the table. If left blank, a VarDec will be generated called Name. If non-empty, a downstream Probe must be provided called Output Name, which allows customization of the output VarDec. An error will result if the VarDec does not exist.

Table Data contains a 2-D matrix of values to be accessed. This data may be modified via MotoTune. Note that the data type of the table data determines the output port data type. If the Prelookup block for the input cannot be directly routed to this block for any reason, explicitly entering the name of the Prelookup block will allow the VarDec to be found. This is sometimes a problem when using a Data Store to pass the output of the Prelookup index to this block, for example. An empty string in this field will let the code-generator determine the name of the Prelookup that is directly attached.

MotoHawk:Blocks:Interpolation2D Reference

This MotoHawk® block performs the same operation as a MotoHawk Interpolation (2-D) block, but does not define any data or create any VarDecs visible from MotoTune. Data Storage created by any another MotoHawk Data Definition may be referenced. However, proper viewing of the associated index arrays in MotoTune will only be available if the data from another MotoHawk Interpolation 2-D block is referenced.

L

MotoHawk:Blocks:Prelookup

This MotoHawk® block behaves similarly to the native Simulink PreLook-Up Index Search block. It is used to generate an index and interpolation fraction for use with a MotoHawk Interpolation (1-D) or MotoHawk Interpolation (2-D) block. Note that the generated VarDecs will be the entered 'Name' with suffixes 'Idx' and 'IdxArr', and one with the suffix 'In' if no explicit 'Input Name' is supplied.

MotoHawk:Blocks:Prelookup Reference

This MotoHawk® block performs the same operation as a MotoHawk Prelookup block, but does not define any data or create any VarDecs visible from MotoTune. Data Storage created by any another MotoHawk Data Definition may be referenced. However, proper viewing of the associated index array in MotoTune will only be available if the data from another MotoHawk Prelookup block is referenced.

T

MotoHawk:Blocks:Table1D

This MotoHawk® block incorporates a Prelookup block and Interpolation1D block. Name is the VarDec name used in MotoTune. The output is normally assigned a Display variable with this name, the breakpoint table has the suffix 'IdxArr', the intermediate index has the suffix 'Idx', and the 1-D Calibration table has the suffix 'Tbl'. Output Name is an optional name for the output of the table. If left blank, a VarDec will be generated called Name. If non-empty, a downstream Probe must be provided called Output Name, which allows customization of the output VarDec. An error will result if the VarDec does not exist.

Breakpoint Data contains the table of breakpoint values to be searched. This data may be modified via MotoTune. Note that the data type of the breakpoint data determines the input port data type. Table Data contains a 1-D vector of values to be accessed. This data may be modified via MotoTune.

Note that the data type of the table data determines the output port data type. Source Name is the VarDec name of the signal driving the input. If a non-empty string is entered, the source VarDec must exist, either by connecting a Probe or a Table of the same name. If an empty string is entered, the input will have a Display variable with the suffix 'In'.

MotoHawk:Blocks:Table2D

This MotoHawk® block encapsulates two Prelookup blocks and Interpolation2D block.

Name is the VarDec name used in MotoTune. The output is normally assigned a Display variable with this name, the 1-D Calibration breakpoint tables have the suffixes 'RowIdxArr' and 'ColIdxArr', the intermediate Display variables for the indices have the suffixes 'RowIdx' and 'ColIdx', and the 1-D Calibration table has the suffix 'Map'. Output Name is an optional name for the output of the table. If left blank, a VarDec will be generated called Name. If non-empty, a downstream Probe must be provided called Output Name, which allows customization of the output VarDec. An error will result if the VarDec does not exist. Breakpoint Data contains the table of breakpoint values to be searched. This data may be modified via MotoTune. Note that the data type of the breakpoint data determines the input port data type. Table Data contains a 2-D matrix of values to be accessed. This data may be modified via MotoTune. Note that the data type of the table data determines the output port data type. Row and Column Source Name are the VarDec names of the signals driving the input. If a non-empty string is entered, the source VarDec must exist, either by connecting a Probe or a Table of the same name. If an empty string is entered, the corresponding input will have a Display variable with the suffix 'Row' or 'Col'.