Flux e-Machine Toolbox: Command Line

Introduction

The command line of Flux e-Machine Toolbox is a program called emtcli which allows to invoke certain features of Flux e-Machine Toolbox from a script.

This command line can be launched from the emtcli.exe file located in the directory:

%FLUX_INSTALL_DIR%/Flux/EMachineToolbox/bin

Currently emtcli allows to run an performance map computation from an existing Flux e-Machine Toolbox component and / or to export the results of a previous perfomance test.

The different syntaxes

  • Running an performance map computation:
    emtcli --project <FeMT component path> --inputs <input file path>
  • Export results of an existng computation in txt format:

    emtcli --project <FeMT component path> --export <test name> <format> <output path>
  • Running a computation and export it at the end:

    emtcli --project <FeMT component path> --inputs <input file path> --export <test name> <format> <output path>

Options

  • --project: the path of the Flux e-Machine Toolbox coupling component from which the computation or the export must be run

  • --inputs: the path to the text file which contains the input parameters of the computation to run. This file must contain one parameter by line, each parameter being defined by: Name=Value.

    The supported parameters correspond to the input parameters displayed in the Flux e-Machine Toolbox application and are described below:

    TestName=<Name of the test to create to do a computation>
    LineCurrent=<corresponds to the RMS phase current maximal (A)>
    LineVoltage=<corresponds to the RMS phase voltage maximal (V)>
    CommandMode=MTPA or MTPV <corresponds to the command mode>
    MaxSpeed=<corresponds to the maximal speed (tr/min)>
    InitialAngleComputation=USER or AUTO <corresponds tothe definition of the initial angle>
    InitialAngle=<corresponds to the rotor intial angle (deg, to define only if InitialAngleComputation is fied at AUTO>
    NbIdIq=<corresponds to the number of computation for Jd, Jq>
    NbSpeed=<corresponds to the number of computation for the speed>
    NbCompElectPeriod=<corresponds to the computation by electrical period>
    DistributionEnabled=yes or no <corresponds to the distribution (local - CDE)
    CoreNumber=1 <corresponds to the number of cores (Mumps)>
    NumericalMemory=2048 <corresponds tot the numerical memory (Mio). 0 for dynamic memory. >
  • -–export: must be followed by exactly three arguments:
    • <test name>: The name of the test present in the coupling component, for which the results must be exported. The name will also be used to name the export directory in which the text files will be exported
    • <format>: The format of exported files. Currently only the string "TXT" is supported and allows to export the results in text format
    • <output path>: The path of a directory in which the export directory will be created. If this path does not point to an existing directory the command line will try to create the missing directories

Example of use via the DOS console

It is necessary to have generated a FeMT coupling component from a Flux project and have the path to this component. For instance d:\Example emtcli\Example.FEMT. Here are the steps to use the command line via DOS:

  1. In a user working directory, create a new text file named « inputs.txt »

  2. Open the « inputs.txt » file in a text editor and enter wished values for input parameters of test to run:

  3. From a Windows Explorer, open a DOS window in the working directory
  4. In the DOS window, update the environment variable « Path » by adding the directory « bin » of EMachineToolkit to be able to run easily emtcli:
    > setPATH=%PATH%;C:\Altair\Flux_2019.1\EMachineToolbox\bin
  5. Then execute the command « emtcli » to run the test and export results:
     > emtcli --project Example.FEMT --inputs inputs.txt –export EMTCliExample TXT “d:\Example emtcli”