Table of Contents

FMU

This simulation component adds a Functional Mock-up Unit (FMU) to the simulation.

FMU

When to use

Use this simulation component if you want to add a Functional Mock-up Unit to the simulation. This enables the combination of any kind of physical effects and algorithms with the rigid body simulation. FMUs can be created by using e.g. Modelica as the modeling language.

How to use

Add this simulation component from the simulation component library and load an existing FMU file.

Note

The FMU simulation component only supports FMU files of type Co-Simulation.

After loading the FMU, the defined inputs and outputs are created. Define the property RunningType. If the simulation is running, the FMU will be simulated either Before Simulation Step or After Simulation Step.

Parameters

FMUFilename

Indicates the absolute path to the FMU-file which is loaded.

Note

The FMU-file is an absolute path. When reloading a project, the file must be available at the same location. If not, loading the FMU will fail.

RunningType

A value indicating when the FMU will be simulated. Possible values are:

Value Description
Before Simulation Step The FMU step is executed right before the simulation steps forward in time.
After Simulation Step The FMU step is executed right after the simulation has stepped forward in time.

Inputs

After a FMU file is imported successfully, all defined inputs are listed here. If the simulation is running, the value is set in the FMU as soon as it changes.

Outputs

After a FMU file is imported successfully, all defined outputs are listed here. If the simulation is running, the value is read periodically from the FMU.

Example

In this example, the FMU simulation component is used to control the position of a turntable.

FMU controls turntable Object3D

Therefore, the PID controller and EC motor were designed in the object-oriented modeling language Modelica as shown in the picture below.

Modelica with PID and Motor

The FMU model is added to the simulation environment as a black-box. After loading the FMU all defined inputs and outputs are created.

PLC Example Properties

The SetValue input is set randomly after a given time interval. A DynamicRotationMover simulation component rotates the turntable by the calculated Torque output and returns the current angle to the controller. After another given time interval (which is not shown in this example) a new dynamic bottle object 3D is added to the turntable which increases the mass of the whole system which has to be controlled.

FMU as PositionControl