Import FMU in Xcos using Functional Mock-up Interface
The block "FMInterface" provides an easy way to use Functional Mock-up Interface for Model Exchange or CoSimulation(slave). Using this block, the user is able to simulate the Functional Mock-up Units(dynamic system models). 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, then in the new window the model for loading should be chosen. It is forbidden to do copy/paste for the models that have been loaded if the FMU does not support the several instances.
Set Real
Names of real continuous variables, parameters from the model for which the user values should be provided. Attribute 'all' of type 'vec' for getting all names for default configuration. Only first 30 variables appear.
Properties : Type 'str' of size -1 (names) or Type 'vec' of size 1 (attribute: all)
Set Integer
Names of integer discrete variables, parameters from a model for which the user values should be provided. Attribute 'all' of type 'vec' for getting all names for default configuration. Only first 30 variables appear.
Properties : Type 'str' of size -1 (names) or Type 'vec' of size 1 (attribute: all)
Set Boolean
Names of boolean discrete variables, parameters from a model for which the user values should be provided. Attribute 'all' of type 'vec' for getting all names for default configuration. Only first 30 variables appear.
Properties : Type 'str' of size -1 (names) or Type 'vec' of size 1 (attribute: all)
Get Values
Names of real, integer, boolean variables, constants, parameters from a model for which the result of the simulation should be retrieved.
Properties : Type 'str' of size -1
Debug Logging
Enable(%t) or disable(%f) logging of the information about the standard FMI functions calling. If enabled, a log message will be printed into the console of Scilab. If during the simulation an error has occurred the logger function will be called automatically.
Properties : Type 'boolean' of size 1
Relative Tolerance
Enable(%t) or disable(%f) relative tolerance. If enabled, than the model is called with a numerical integration scheme where the step size is controlled by using "relative Tolerance" for error estimation. In this case, all numerical algorithms used inside the model (e.g. to solve non-linear algebraic equations) should also operate with an error estimation of an appropriate smaller relative tolerance.
Properties : Type 'boolean' of size 1
The default properties of the block depend on a model that was loaded for simulation.
/macros/FMInterface.sci
fmu_simulate_me
fmu_simulate_cs
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 waitbar will be displaying during the loading. There is some important limitation for using of FMInterface block: only 30 parameters can be configured at the same time for the corresponding type (Real, Integer or Boolean). In other words it is not allowed to try writing more than 30 names of parameters at the corresponding fields (Set Real, Set Integer or Set Boolean).