Scilab Website | Contribute with GitLab | Scilab Community | ATOMS toolboxes
Scilab Online Help
2027.0.0 - English


FMU_WRAPPER

Import FMU in Xcos using Functional Mock-up Interface

Block Screenshot

Description

The block "FMU_WRAPPER" provides a simple way to use the Functional Mock-up Interface for Model Exchange or CoSimulation. Using this block, the user will be able to simulate dynamic system models provided as Functional Mock-up Units. The supported FMI versions are 1.0, 2.0.x and 3.0.x. It is possible to use several instances of a model and to connect any models hierarchically together. Before the simulation the model should be loaded: double-click on the block, select your FMU file; the input and output ports of the block are then generated from the FMU model description.

The SimpleFMU and FMInterface blocks are provided as macros for compatibility with older diagrams; they are no longer available from the palette.

Dialog box

Double-clicking on an empty block opens a file selector to load an FMU. A first dialog box then configures the block:

  • FMU file: path to the .fmu file. Files located under fmigetPath() are stored relative to it.

  • FMU directory: directory where the FMU is extracted.

  • FMU implementation: "me 1.0", "cs 1.0", "me 2.0", "cs 2.0", "me 3.0" or "cs 3.0", for Model Exchange or Co-Simulation of the given FMI version.

  • Enable logging ?: %t to enable the FMU debug logging.

  • Relative tolerance: tolerance passed to the FMU, 0 to use the FMU default.

  • Integer as Real, Boolean as Real, Enumeration as Real: %t to map these ports to double, %f to use integer ports.

  • String maximum length: size of the buffer used for string variables.

Further dialog boxes, up to 10 entries each, let the user set the start value of each parameter (FMI 1.0 variability="parameter", FMI 2.0 and 3.0 causality="parameter" or initial="exact"). The FMU start values are proposed by default.

Default properties

The default properties of the block ​​depend on a model that was loaded for simulation.

Interfacing function

  • SCI/modules/scicos_blocks/macros/Misc/FMU_WRAPPER.sci

Computational functions

  • fmu_simulate_me

  • fmu_simulate_cs

  • fmu2_simulate_me

  • fmu2_simulate_cs

  • fmu3_simulate_me

  • fmu3_simulate_cs

Limitations at the current version of import FMU.

Strings are not supported for input/output ports. Also, complex values are not supported. For big FMUs (for example, with more than 5000 variables) it may take some more time for the loading of these models in Xcos. The wait bar will be displayed during the loading.

Report an issue
<< DSUPER User defined functions palette MBLOCK >>

Copyright (c) 2022-2026 (Dassault Systèmes S.E.)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 15 13:01:54 CEST 2026