Inlined tunable parameter values because of using different data type then double-precision
15 ビュー (過去 30 日間)
古いコメントを表示
Currently I am having the following problem when using tunable parameters with data types (uint8, single, etc.) other than double-precision data type in our generated code.
Example: When we want to define initial condition values for merge blocks which are taken from tunable parameters in the model attached data dictionary we get the following error:
The numeric value of the expression 'par_DEI_EnvIllum(2)' (used in parameter 'InitialOutput' of '**/CEI_Merge') because block '**/CEI_Merge' only supports double-precision tunable parameter expressions. The code for this block will not use the tunable variables (par_DEI_EnvIllum (**.sldd)
How can we solve such behaviour, do we really need to define the parameters with double-precision data types, because we won't to get rid of such data type as in the embedded unit this would result into much more computational effort for the MCU. Therefore we would like to use our integer or single-precision data types.
0 件のコメント
回答 (1 件)
Mark McBroom
2024 年 11 月 16 日
編集済み: Mark McBroom
2024 年 11 月 16 日
You can either set the data to the proper data type in the data dictionary, or you can cast the value in the block dialog. For example, single(par_DEI_EnvIllum(2))
参考
カテゴリ
Help Center および File Exchange で AUTOSAR Blockset についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!