MATLAB: Error while running Permanent Magnet Synchronous Motor Field-Oriented Control

c28069pmsmfoc_ertelectric_motor_controlexamplepermanent magnet synchronous motor field-oriented controlpower_electronics_controlsimulink

I am trying to run the example 'Permanent Magnet Synchronous Motor Field-Oriented Control', but when I run "c28069pmsmfoc_ert" in command window appears the next error: Undefined function or variable 'c28069pmsmfoc_ert'
MATLAB Version: 9.2.0.556344 (R2017a) with Embedded Coder, MATLAB Coder, Simulink Coder.
How can I solve it?
Thanks.

Best Answer

Hi Juan,
Please run the following command in MATLAB Command Window:
>> which c28069pmsmfoc_ert
You will likely receive an output:
'c28069pmsmfoc_ert' not found.
If this is the case, please make sure that you install the support package:
"Embedded Coder Support Package for Texas Instruments C2000 Processors"
You may find this under:
>> supportPackageInstaller
Once you have installed the support package, you will be able to open the model "c28069pmsmfoc_ert". Furthermore, when you do:
>> which c28069pmsmfoc_ert
You will likely receive an output:
C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\target\supportpackages\tic2000\tic2000examples\c28069pmsmfoc_ert.slx
The reason you are not able to open this model is because it resides in the examples folder of the support package that is currently not installed in your case. More information about the TI C2000 support package can be found below:
Thanks,
David