Why do I get an error when using the same get or set functions for different signal objects in a Simulink model with Embedded Coder R2014b or R2015a?
4 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2015-4-7
回答: MathWorks Support Team
2015-4-7
I have a Simulink model with different signal objects with GetSet Custom Storage Class using the same get or set functions. This worked with Embedded Coder R2014a. I recently upgraded to R2014b and get an error message related to "Potential conflicting usages of identifier <get/set_function_name>". Why do I get this error and how can I resolve this issue?
采纳的回答
MathWorks Support Team
2015-4-7
This is an expected behavior. Though this workflow might have been possible in Embedded Coder R2014a, it was not an intended or desired workflow. Hence, it is no longer supported in Embedded Coder R2014b and later releases.
In Embedded Coder R2014b and later, if you have different signal objects connected to different signals, you need to use different get and set functions for these. Alternatively, you should use the same signal line for common get or set functions.
Though not recommended for code generation, you can use the following workaround to avoid this error during simulation when multiple signal objects share get or set functions:
(1) Open the 'Configuration Parameters' editor for the model.
(2) In the 'Code Generation' pane, select the ERT-based 'System target file' (ert.tlc).
(3) Enable the option 'Ignore Custom Storage Classes'.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!