The data type of the gain parameter is a built-in integer when the following conditions are met.
The input type is a built-in integer.
The Parameter data type is set to
Inherit:Inherit via internal rule
.
The value of the gain parameter can be represented without losing any precision by a built-in integer.
The Parameter minimum and Parameter maximum values in the Parameter Attributes tab of the Gain block parameters can be represented without losing any precision by a built-in integer.
Default: Off
For Gain blocks with the Parameter data
type set to Inherit:Inherit via internal
rule
, the parameter data type compiles to a built-in
integer type whenever possible.
For Gain blocks with the Parameter data
type set to Inherit:Inherit via internal
rule
, the parameter data type is the type which
maximizes precision.
This optimization affects both simulation and code generation.
This optimization affects only Gain blocks in the model.
For more efficient code, specify the Parameter minimum and Parameter maximum values in the Parameter Attributes tab of the Gain block parameters.
In cases where the data type of the gain parameter compiles to a fixed-point data type (non-zero scaling), the software checks out a Fixed-Point Designer™ license.
Parameter:
GainParamInheritBuiltInType |
Value:
'on' | 'off' |
Default:
'off' |
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | On (when target hardware supports efficient multiplication)
Off (otherwise) |
Safety precaution | No recommendation |