MATLAB Answers

Motor Control Blockset examples: Using variant source block

5 views (last 30 days)
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

  0 Comments

Sign in to comment.

Accepted Answer

Mark McBroom
Mark McBroom on 11 Jun 2020
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 Comments

Show 2 older comments
Petr Kadanik
Petr Kadanik on 11 Jun 2020
Perfect. Thanks.
So, mcb_isCodeGenVar() function (and associated p-file) is a specific item of MotorControl Toolbox. Please, confirm.
Is there any document with the list and of those 'integrated' functions for the MC toolbox (including a function description and applicability)?
Petr
Mark McBroom
Mark McBroom on 11 Jun 2020
This comment was flagged by Petr Kadanik
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.

Sign in to comment.

More Answers (0)