Smooth system integration becomes especially important when different subsystems in a model are built in different tools or hardware. Here, we will use the Functional Mock-up Interface (FMI) to export a model from System Modeler and import it in NI VeriStand to test our system in real time.
An FMU is used as the exchange format in the multi-tool workflow.
Export the FMU
The model has two outputs, the tank level and output flow, and two inputs, the input flow and the actuator that controls the output flow.
Exporting the tank model as an FMU in System Modeler.
Import the FMU
To control the water level in the tank, the FMU has been connected to a PID regulator native to the VeriStand environment. From the simulation interface, it is possible to interact with the simulation in real time by changing the settings for input flow and desired tank level.
See how the output signals respond to changes in the input, and how the PID controller adjusts to these changes and finally reaches a new steady state.
This example shows how easy it is to exchange models with FMI. Using FMU export and import, we were able to easily design a model in System Modeler, and then test our system in NI VeriStand, which specializes in real-time testing.
Export models as FMUs
Export a model from System Modeler as an FMU, import it in another simulation software, and connect it to models native to the target environment.