Check model version consistency between generated code and model
이전 댓글 표시
Hello experts,
a Simulink model is equipped with a "Model Version", which is increased every time a change in a model is saved. We can read this from the model via
get_param(model,'ModelVersion')
If we generate code from this model, the *.c and *.h files also include this model version, e.g.
* Code generated for Simulink model 'FeatureName_GENCODE_mdl'.
*
* Model version : 1.44
* Simulink Coder version : 9.8 (R2022b) 13-May-2022
* C/C++ source code generated on : Tue Feb 27 07:46:12 2024
Is there an option, to retrieve the model version from generated code programmatically, to check the consistency of model versions between generated code and model (despite performing SIL/PIL tests)?
To manually parse generated C-Code in MATLAB and search for Model version seems a bit unclean to me. Is there a better option?
Many Thanks and BR!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulink Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!