Simulink model autocoding: how to generate global parameters shared between different subsystems component-by-component?
이전 댓글 표시
hello,
I am currently autocoding a model "modA" composed of two subsystems "ssA1" and "ssA2", from the ERT script. This model modA is based on a global parameter p = [p1, p2] shared between both subsystems, that is, p(1) is given as a parameter of the subsystem ssA1 while p(2) is given as a parameter of the subsystem ssA2.
My problem is that the ERT does not declare the global parameter p as it is, but two parameters "ssA1_p" and "ssA2_p" instead. I would prefere to keep the original semantics of the parameters because I am generating at the same time a wrapper that requires to be based on the parameters names as they are declared in the workspace. That is, p declared as is it in the header, and p(1) and p(2) used instead of ssA1_p and ssA2_p in the source code.
At present, all I know is that in RTW file, p is given as an element of CollapsedTunableParameters list, and both ssA1_p and ssA2_p parameters are declared in ModelParameters with the attribute IsPseudoWorkspaceVar set to yes.
I have supposed that my problem could be solved by specifying the right model configuration parameter, but I could not find it...
Thanks for your time and answer ;)
답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Target Language Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!