Visual Studio C++ compiler for Flux FMU
Answers
-
First, you need to install the correct C++ compiler. I can recommend using Visual Studio installer and go for the 2017 Community version. Then you need to select the package as below. You can deselect some of the addons as seen on the picture.
Once this is installed, you can set the path in Flux supervisor options, coupled software.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
You can also set it in the FluxMotor preferences
Once this is done, you can now export FMU correctly from both software. You can test if from any PM motor in FluxMotor directly.
Or you can use the model solved from the Flux tutorial called "Flux-Activate IPM motor speed control". This model solves for various Id,Iq,Angpos values. You can select to export FluxA, FluxB, FluxC and TORQUE as output.
You can replace directly the 4 LookUp tables in the Activate model, in the 3rd motor type, by this single block and run directly the model in the right working directory. You will need to add an FMU block and select the fmu file exported previously.
1