メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

Configure and Build Model for Rapid Simulation

After you identify your rapid simulation requirements, configure the model for rapid simulation.

  1. Set model configuration parameter System target file to rsim.tlc (Rapid Simulation Target).

  2. Click RSim Target to view the RSim Target pane.

    RSim Target pane in Model Configuration Parameters dialog box

  3. Set the RSim target configuration parameters for your rapid simulation requirements.

    GoalParameter Settings
    Generate code that allows the RSim executable program to load parameters from a MAT-fileSelect Enable RSim executable to load parameters from a MAT-file (default).
    Let the target choose a solver based on the solver already configured for the model

    Set Solver selection to auto (default). The code generator uses a built-in solver if a fixed-step solver is specified on the Solver pane or calls the Simulink® solver module (a shared library) if a variable-step solver is specified.

    Explicitly instruct the target to use a fixed-step solverSet Solver selection to Use fixed-step solvers. In the Configuration Parameters dialog box, on the Solver pane, specify a fixed-step solver.
    Explicitly instruct the target to use a variable-step solver

    Set Solver selection to Use Simulink solver module. In the Configuration Parameters dialog box, on the Solver pane, specify a variable-step solver.

    Force storage classes to Auto for flexible custom code interfacingSelect Force storage classes to AUTO (default).
    Retain storage class settings, such as ExportedGlobal or ImportedExtern, due to application requirementsClear Force storage classes to AUTO.
  4. Set up data import and export options. On the Data Import/Export pane, in the Save to Workspace section, select the Time, States, Outputs, and Final States parameters, as they apply. By default, the code generator saves simulation logging results to a file named model.mat. For more information, see シミュレーション データの保存.

  5. If you are using external mode communication, set up the interface, using the Code GenerationInterface pane. See エクスターナル モード シミュレーションによるパラメーター調整、信号監視、コード実行プロファイリング for details.

  6. Press Ctrl+B. The code generator builds a highly optimized executable program that you can run on your development computer with varying data, without rebuilding.

    For more information on compilers that are compatible with the Simulink Coder™ product, see C または C++ コンパイラの選択と設定 and テンプレート makefile と make オプション.