Interpolation (1-D)

This MotoHawk™ block behaves similarly to the native Simulink Interpolation (1-D) using Prelookup block, with n=1.

Block ID

motohawk_interpolation_1d

Library

MotoHawk_lib/Lookup Tables

Description

This block performs a linear interpolation on a 1-D matrix, "Table Data," using precalculated indices and distance fractions provided by the Prelookup or Prelookup Reference blocks. End values of the Table Data are used for inputs that fall outside of the Breakpoint Data.

Block Parameters

Parameter Field Values Comments/Description
Name Alpha-numeric text, single-quote enclosed Name of the table. Should be unique and C-legal (no special characters such as spaces, dashes or commas (underscore allowed). The output is typically assigned a Display variable with this name, and the 1-D Calibration table has the suffix 'Tbl'.
Table Data Define data to be used Define the data and type implied (or select type in Table Data Type), using valid MatLab expression.
Note that the data type of the table data determines the output port data type (when available)
Show ports Checkbox Check to expose the ports of the block. When unchecked the block will define the data, but the interpolation would be implemented via a reference block. If there are no ports then the optional Prelookup Name should be defined.
Table Data Type Drop-down list Select a data type from list, or select "Inherit from 'Table Data'" to set type as inferred from entry in Table Data field. Be sure to select a data type if there is possible ambiguity.
Storage and Accessibility   Select data Storage option
  NonAdaptive Values do not change at runtime, except via calibration.
Adaptive - Volatile Values can change at runtime (using Adapt Table block) - will not be saved over powerup cycles
Adaptive - NonVolatile Values can change at runtime (using Adapt Table block) - will be saved over powerup cycles
Adaptive - Fixed NonVolatile Values can change at runtime (using Adapt Table block) - will be saved over powerup cycles.
Fixed NonVolatile data allows for greater flexibility by permitting the addition of new data items whilst retaining existing data during an application upgrade.
Specify Memory Region Check box (enable) Selects that the data will be placed in region specified by Memory Region Name. This option is only available if the target and selected storage class support memory regions. The default memory region is used when this option is not available or unchecked.
Memory Region Name Alpha-numeric text, single-quote enclosed Name of the Memory Region in which to place the data. This option is only available when Specify Memory Region is checked.
Read Access Level 0-8 Sets security level 1 lowest, 8 highest, for user access to read value. A setting of zero indicates unsecured access is allowed.
Write Access Level 0-8 Sets security level 1 lowest, 8 highest, for user access to write value. A setting of zero indicates unsecured access is allowed.
Use uploaded calibration values Checkbox enable Enable/disable to use or ignore uploaded values from an instrumentation tool.
Help Text Alpha-numeric text, single-quote enclosed Enter text to describe block usage per needs.
Units Alpha-numeric text, single-quote enclosed Label text that describes the units of the data as appropriate for the application.
Minimum Value Numeric Value Sets the lower end of the allowable range for the variable. The specified value is in engineering units (see Engineering Values versus Native Values).

Typically this value is used by instrumentation to prevent a user from entering an out of range value when modifying.
Maximum Value Numeric Value Sets the higher end of the allowable range for the variable. The specified value is in engineering units (see Engineering Values versus Native Values).

Typically this value is used by instrumentation to prevent a user from entering an out of range value when modifying.
Precision Numeric value, single-quote enclosed Set the precision of the variable when viewed by instrumentation tools by entering a value '1.x' where "x" is the number of decimal places requested. Default is two decimal places.
Gain Numeric Value Multiplier component of the conversion equation that converts a native value into an engineering units value (see Engineering Values versus Native Values).
Offset Numeric Value Offset component of the conversion equation that converts a native value into an engineering units value (see Engineering Values versus Native Values).
Exponent Numeric Value Exponent component of the conversion equation that converts a native value into an engineering units value (see Engineering Values versus Native Values).
Pre-Lookup Name (optional) Alpha-numeric text, single-quote enclosed List name of associated Prelookup Table. 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.
Output Name (optional) Alpha-numeric text, single-quote enclosed List name of block output for clarity. 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.
Instrumentation Group Alpha-numeric text, single-quote enclosed Defines the folder name and hierarchy to be used by a suitable instrumentation tool. Use "|" character between folder names to delineate subfolder structure.

*NOTE: Engineering Value = ((Native Value * Gain)^Exponent) + Offset
See the Engineering Values versus Native Values help topic for further information.