MotoHawk:Blocks:Calibration
From MotoHawk
Jump to navigationJump to searchCalibration
This MotoHawk™ block provides a connection from MotoTune that allows run-time modification of calibration values with the MotoTune tool.
Block ID
motohawk_calibration
Library
MotoHawk_lib/Calibration & Probing Blocks
Description
The block behaves in simulation like a Constant block, and accepts any Matlab value as its Default Value, including data-typing casts.
If the value displayed on the block has an asterisk (*) next to it, this indicates that the value is being overridden by a workspace calibration struct variable, called MODEL_cals, where MODEL is the name of the model.
When output values to Simulink differ from the MotoTune inputs, due to gain, offset, exponents, or enumeration choices, both values are shown.
Block Parameters
Parameter Field | Values | Comments/Description |
Name | Alpha-numeric text, single-quote enclosed | Appears if "Use Parameter" is selected in "Name Source." Name as displayed in MotoTune, for block. No special characters, such as spaces, dashes, commas (underscore allowed) |
Default Value | This value is loaded before calibration through MotoTune. This block will behave as a constant block that will output the Default Value. | |
Behavior | Define type of block behavior | |
Calibration | Use block for calibration in MotoTune (saved in .cal file) | |
Display | Use block for displaying value in MotoTune (not available for saving in .cal file). | |
Calibration NV | Use block for calibration in MotoTune (saved in .cal file). Saved in non-volatile (EEPROM) memory; allows online calibration in development and also in production modules. | |
Display NV | Use block for displaying value in MotoTune (not available for saving in .cal file). Saved in non-volatile (EEPROM) memory; allows online calibration in development and also in production modules. | |
Name Source | Select source for Name parameter | |
Use Parameter | Select to display name field and enter Name | |
Use Output Wire Name | Take name from output wire name | |
Output Data Type | Set Data Type for Output | |
Inherit from Default Value | Takes Data Type from default value entered | |
Inherit via back propagation | Set Data Type via back propagation from the attached Simulink signals | |
double, single, int8, etc. | Select Data Type from types listed | |
Read Access Level | 1-4 | Sets security level 1 lowest, 4 highest, for user access to read value |
Write Access Level | 1-4 | Sets security level 1 lowest, 4 highest, for user access to write value |
Use uploaded calibration values from MotoTune | Checkbox enable | Enable/disable to use or ignore uploaded values from MotoTune |
View Value as | Sets "Default Value" data type | |
Number | Numeric value | |
Enumeration | Enables enumeration - maps to the indicated term in the Enumeration text-entry field | |
Text | Text string | |
Enumeration (Cell String, or Struct) | Alpha-numeric text, single-quote enclosed | Field enabled when Enumeration is selected under "View Value as." Enter term of defined entity to be mapped. Cell String: A cell array of strings such as {'Off', 'On'} may be used to define the names of enumerated values. In this case, the values start with 0 and increment by one. This is especially useful for defining names for boolean flags like 'On' and 'Off'. Struct: A Matlab struct array containing a 'name' field, and optionally a 'value' field may be used to define the names and explicitly define the values of an enumerated type. For example: struct('name', {'Off', 'On'}, 'value', {0,1}). If the 'value' field is missing, then the values start with 0 and increment by one, just like with the Cell String format. |
Show Vectors As | Wide Row/Tall Column | Format vector output as row or column. |
Help Text | Alpha-numeric text, single-quote enclosed | Enter text to describe block usage per needs. |
Units | Alpha-numeric text, single-quote enclosed | Enter text to describe or label units or data for clarification in MotoTune, as appropriate per application. |
Row Header Enumeration | Alpha-numeric text, {} bracket enclosed | Cell String: A cell array of strings such as {'Off', 'On'} may be used to define the names of enumerated values. In this case, the values start with 0 and increment by one. This is especially useful for defining names for boolean flags like 'On' and 'Off'. Struct: A Matlab struct array containing a 'name' field, and optionally a 'value' field may be used to define the names and explicitly define the values of an enumerated type. For example: struct('name', {'Off', 'On'}, 'value', {0,1}). If the 'value' field is missing, then the values start with 0 and increment by one, just like with the Cell String format. |
Column Header Enumeration | Alpha-numeric text, {} bracket enclosed | Cell String: A cell array of strings such as {'Off', 'On'} may be used to define the names of enumerated values. In this case, the values start with 0 and increment by one. This is especially useful for defining names for boolean flags like 'On' and 'Off'. Struct: A Matlab struct array containing a 'name' field, and optionally a 'value' field may be used to define the names and explicitly define the values of an enumerated type. For example: struct('name', {'Off', 'On'}, 'value', {0,1}). If the 'value' field is missing, then the values start with 0 and increment by one, just like with the Cell String format. |
Minimum Value | Numeric Value | Sets lower end of allowable range for value. This can be used to prevent a user from entering an out of range number when calibrating. |
Maximum Value | Numeric Value | Sets higher end of allowable range for value. This can be used to prevent a user from entering an out of bounds range when calibrating. |
Precision | Alpha-numeric text, single-quote enclosed | Set the precision of the variable as displayed in MotoTune. For instance, if the variable has a value of 98.76543 and the precision is ‘1.3’, the value would appear in MotoTune as 98.765. |
Gain* | Numeric Value | Multiplier applied (Default is 1) to the raw value used in calculation of the engineering value as observed in MotoTune |
Offset* | Numeric Value | Constant added (Default is 0) to the raw value calculations to result in the engineering value as observed in MotoTune |
Exponent* | Numeric Value | Exponent applied (Default is 1) to the (raw value*gain) product used in calculating the engineering value as observed in MotoTune |
MotoTune Group String | Alpha-numeric text, single-quote enclosed | Determines Folder name and hierarchy as displayed in MotoTune. Use "|" character between folder names to delineate subfolder structure |