How the two FMUs are built and used#
The FMU code and CMake projects are generated by sdv_dbc_util. The example contains 2 FMUs:
Doors2ExampleFMU.fmuin<outputfolder>/examples/door_demo_example/fmu_Doors2ExampleFMU/fmusDoors4ExampleFMU.fmuin<outputfolder>/examples/door_demo_example/fmu_Doors4ExampleFMU/fmus
Before the project can be used, the following steps need to be done:
required configuration files have to be placed into the corresponding
resourcessubfolder.function
OpenAPILoad()inmodel.cpphas to be adapted to the intended setup.
See also
The following describes how an FMU is loaded and used in OpenXilEnv.
Open XilEnvGui.exe
Generate new INI file
Recommended: in upper menu click on RT-Factor Icon to switch from fast to slow: Instead of a high (cycling) number the number should be around 1.
in XiLEnv Control Panel: Click on ‘Add…’ in ‘Process’
‘Start process’ window opens, click on ‘start an external process’
Select file
Doors2ExampleFMU.fmuorDoors4ExampleFMU.fmu.Right-Click somewhere ‘New > Text’ and open ‘Blackboard’
Right-Click and open ‘config’
Add all signal variables exposed by the selected FMU (2 doors or 4 doors).
in XiLEnv Control Panel: Click on ‘File…’ in ‘Internal Process Control’ and add script file
vapi_door2_demo.scr(2-door FMU) orvapi_door4_demo.scr(4-door FMU).in XiLEnv Control Panel: Click on ‘Run’ in ‘Internal Process Control’