Motor Control Blockset examples: Using variant source block

조회 수: 4 (최근 30일)
Petr Kadanik
Petr Kadanik 2020년 6월 10일
댓글: Petr Kadanik 2020년 6월 11일
Hello,
a Variant source block is used in 'mcb_pmsm_operating_mode_f28379d.slx' model example to switch betwen SIMulation mode and CODE-generation mode. Inside Varian source block, there are two variables: mcb_isCodeGenVar() and mcb_isSimVar().
Could you please tell me where and how are those variables set? When the model decides what mode is to be chosen? Do I have to play with a Variant manager?
Thanks
Petr

채택된 답변

Mark McBroom
Mark McBroom 2020년 6월 11일
Those are functions, not variables. They are p-coded M-Files that are shipped with the example. Type the following to see where the files exist:
who mcb_isCodeGenVar
Thanks.
Mark.
  댓글 수: 5
Mark McBroom
Mark McBroom 2020년 6월 11일
Yes, those two functions are part of the Motor Control Toolbox. Neither of these two functions are currently documented in MATLAB Help. I'll add a change request to have them added to the help documentation.
Petr Kadanik
Petr Kadanik 2020년 6월 11일
I would be perfect. Thanks a lot.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Component-Based Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by