Motor Control Blockset examples: Using variant source block

65 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Mark McBroom
Mark McBroom el 11 de Jun. de 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 comentarios
Mark McBroom
Mark McBroom el 11 de Jun. de 2020
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 el 11 de Jun. de 2020
I would be perfect. Thanks a lot.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Component-Based Modeling en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by