LabVIEW Control Design and Simulation Module

Creating an External Solver (Control Design and Simulation Module)

  • Updated2023-03-14
  • 1 minute(s) read

You can use the External Solver Interface to create and use external ordinary differential equation (ODE) solvers in the LabVIEW Control Design and Simulation Module. When you create an external solver, you can use the solver for any simulation subsystem.

Complete the following steps to create an external solver.

  1. Create a C/C++ project that uses the External Solver Interface functions to define the external ODE solver. Use the following guidelines when creating the C/C++ project:
    • Use C-style calling conventions when defining the External Solver Interface functions.
    • Include the SIM_Solver.h header file, located in the labview\CCodeGen\Simulation directory. This header file includes definitions and declarations for all functions and data types that the ESI supports.
    • Use the Information function to specify the name of the solver that appears in the ODE Solver pull-down menu in the Configure Simulation Parameters dialog box.
    • Define the solver such that it exports all Callback API functions.
  2. Build the C/C++ project into a (Windows) .dll, (macOS) .framework or .dylib, or (Linux) .so shared library file.
  3. Copy the shared library file into the labview\vi.lib\Simulation\ContinuousLinear\Implementation\Shared\Solvers\Plugins directory for each installation of LabVIEW where you want to use the external ODE solver.

Log in to get a better experience