Häufig gestellte Fragen

Brauchen Sie technischen Support?

Troubleshooting FMU-interface for CarMaker

Frage

I have problems using my FMU (Functional Mock-up Unit) in CarMaker. Which requirements does the FMU have to fulfill and how can I check its functionality?

Antwort

Before getting started with your FMU in CarMaker, please make sure that it fulfills the following requirements (hint: the requirements are listed in Release Notes of each CarMaker version):

  • FMI standard 1.0, 2.0 or 2.0.1 (the latter from CarMaker 9 on) and of the type "FMI for Co-Simulation Stand Alone"
  • Before CarMaker 8: Pre-compiled FMUs are supported
  • From CarMaker 8 on: Both pre-compiled and source code FMUs are supported.
  • From CarMaker 9 on: Both conditions of the attribute 'needsExecutionTool' (true and false) are supported. Before CarMaker 9 only 'needsExecutionTool' = false was supported.
  • The FMU should be free from internal errors. An easy way to check for consistency is by using the FMU Compliance Checker for the corresponding architecture: https://fmi-standard.org/downloads/

If all requirements are fulfilled but there are still problems left regarding FMU-import to CarMaker or doubts about the simulation result, please check the following points:

Importing issues:

  • Where and how can I check, if the FMU was imported successfully and called during the current simulation?
    • After importing your FMU to the CarMaker project folder according to the steps in Programmer's Guide, chapter: "Functional Mock-up Interface (FMI)", open the FMU Plug-ins dialog via CM-GUI > Application > FMU Plug-ins and check the FMU's State. In case there is a mismatch between Architecture, no Model class selected or no FMU Inputs defined, the ERROR-State of the FMU is highlighted in red and further information can be found in the section below:"Detailed Information" of the FMU Plug-ins dialog.
    • All individual settings regarding the FMU interface (e.g. inputs, parameters, outputs, step size, etc.) can be adjusted in the tab "FMU Details" of the FMU Plug-ins dialog or within the FMU's *.pluginfo file, which is located in your CM-ProjectFolder\Plugins.
    • FMUs of the Model class "Generic" are treated differently compared to other Model classes. Please have a look into the Programmer's Guide - Appendix B "Generic Plug-in Models" for more details about integrating a FMU of the Model class "Generic". For all other Model classes, the FMU can be selected via CarMaker GUI within the corresponding drop-down menu, e.g. Vehicle Data Set > Brake > Brake Model: MyBrake_FMU.
    • In order to check if the FMU model was called and executed during the current simulation, just Add FMU Inputs/ Outputs to DDict via FMU Plug-ins dialog > FMU Details > Settings or switch on FMU Debug Logging and observe the newly created UAQs in IPGControl/ Direct Variable Access or the entries in the Session Log in case of FMU Debug Logging.

Saving issues:

  • How can I save my FMU settings and what can I do, if the changes are not applied?
    • All changes of the FMU settings are stored in the *.pluginfo file. This file can be exchanged between different project folders of the same CarMaker version.
    • The new settings, parameters etc. are applied directly when changing between the tabs in the FMU Plug-ins dialog (Overview / FMU Details) or by starting a new simulation.
    • An exception existed for FMUs of the Model class "Generic" until CarMaker 8.0.2. In order to save the changes, it was necessary to either save the vehicle model (in Vehicle Data Set > File > Save) or restart the CarMaker executable (via Application > Configuration / Status > Start & Connect).

Execution issues:

  • My FMU of the Model class "Generic" is integrated correctly, but not used in the simulation. Furthermore, the entry for calling my FMU (GenericPlugin..AbsPlace = DVAStr) in "Additional Parameters" of the Vehicle Data Set > Additional or Vehicle Data Set > Misc. has disappeared.
    • Before CarMaker 8.1.2 / 9.0 it was not possible to use a FMU with a name containing non-alphanumerical characters. In order to use the FMU model, change the name and import it to CarMaker again or update the CarMaker version, which contains the bugfix.
  • The simulation containing my FMU model is able to run once, but the 2nd simulation run fails. What happens in the background?
    • In contrary to many other simulation tools, CarMaker opens a parallel thread when initializing the FMU and keeps it open even after simulation end. The termination and re-initialization of the FMU happens during the Preparation Phase of the next simulation. A new parallel thread will be opened and the old one will be freed. Some FMUs from third-party tools (e.g. Silver before Release 4.1) have problems with this execution order and cause a crash of the CarMaker simulation program. This can be investigated after getting stuck in the Preparation Phase of the 2nd simulation run by checking the status of the executable via Application > Configuration / Status. The executable must be restarted before the next possible simulation. The error does not occur with "thread-safe" FMUs.

Issues regarding simulation results:

  • I'm using CarMaker 9.0 or 9.0.1 and observe implausible FMU-Output values. What can I do to get rid of the problem?
    • Those particular CarMaker versions (9.0 and 9.0.1) contain a bug in regard to linking FMUs to all UAQs of the Data Dictionary, which contain a dot "." character in its name.
    • A possible workaround is "indirect mapping" of the relevant UAQs, e.g.: FMU_Output 1 > UserOut_01 > DM.Gas or ask the CarMaker Support Team for a patch.
Brauchen Sie technischen Support?
  • Datum: 20.01.2021
  • Produkt: CarMaker
  • Version: 9.1
  • Komponente: FMI
  • Sprache: Englisch

Tags

FMU
Model Integration
Co-Simulation