Visual Studio C++ compiler for Flux FMU

SimonGuicheteau
SimonGuicheteau
Altair Employee
edited June 2021 in Community Q&A

If you can't export correctly FMU from Flux or if they don't contain binaries. What should you do?

Answers

  • SimonGuicheteau
    SimonGuicheteau
    Altair Employee
    edited June 2021

    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.

    image

    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

    image

    You can also set it in the FluxMotor preferences

    image

    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.

    image

    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.

    image