Parsing fails for library

조회 수: 9 (최근 30일)
David Everett
David Everett 2020년 1월 15일
편집: stozaki 2020년 1월 25일
Hi, I have a stateflow chart that uses framework data and functions declared in externally-provided source. I also have stateflow charts in library blocks that use the same data and functions. I have set up the simulation target to include the header files and stubs to allow me to use test versions of the framework functions. When I update my model I get errors reported relating to the stateflow charts in the library blocks stating that the data and functions cannot be resolved. When I disable the links between the model and the library subsystems the errors are no longer reported. The errors are summarised with "library failed to build" and "parsing failed..." errors.
It appears that Simulink wants to build the library subsystems separately (I assume to speed up any simulation), however it does not seem to inherit the configuration of the parent model. I could use model referencing but for this application I would prefer to use libraries.
Any insight or help would be appreciated.
Regards, Dave
  댓글 수: 2
stozaki
stozaki 2020년 1월 24일
Cloud you attach your library model file?
David Everett
David Everett 2020년 1월 24일
Hi Stozaki,
I've created a sample model which exhibits the same behaviour which I've attached. I used my home use copy to generate the example, but I get the same error using my full license at work. Hopefully you can point me in the right direction.
Thanks in advance,
Dave

댓글을 달려면 로그인하십시오.

답변 (2개)

stozaki
stozaki 2020년 1월 25일
편집: stozaki 2020년 1월 25일
I got rid of the error.
1. The function setting of the library block has been set "reusable".
2. RTWUseSimCustomCode of the configuration set has been turned ON.
Regards,
stozaki

David Everett
David Everett 2020년 1월 25일
Thanks Stozaki, I'll try these changes later today when I've got my work laptop. I've been generating code from Simulink since the early 2000s but I've never come across this before. Is this a new feature? Maybe I've never used this combination of library and referencing (I usually use referenced models in a function-call subsystem, but the simplicity of the requirement lent itself better to libraries).
I'll let you know how it goes.
Thanks again - Dave

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by