MATLAB: Do I get an error regrading missing DLL when importing an fmu file to FMU Block in Simulink R2018a

simulink

When opening FMU Block Parameters and choose an fmu file I get an error when I try to apply the change:
Error parsing FMU'xyz.fmu'
Caused by:
Error in supplied FMU: Dynamic library file ('xyz.dll') does not exist in FMU 'xyz.fmu'. For more information, see the FMU troubleshooting documentation.
In older releases I can update the FMU Block parameters accordingly, but get an error when trying to simulate:
Failed to load FMU fr FMU blockmy_model/xyz.
Warning: Could not find binary file for this platform.
Make sure that the FMU s supported for this platform.

Best Answer

In the troubleshooting section of the FMU documentation
https://www.mathworks.com/help/releases/R2018a/simulink/ug/implement-an-fmi-block.html
the first suggestion is:
"Check the compliance of the FMU with the FMI standard. Use the FMU compliance checker."
This can be done as follows:
1) Follow the link in the documentation that leads you here:
https://trac.fmi-standard.org/browser/branches/public/Test_FMUs/Compliance-Checker
2) Download the latest zip file for your platform - for example Win64:
3) Unzip that archive in the same folder as where your FMU is and form a DOS prompt execute "fmuCheck.win64.exe fmuName.fmu". You can also do it in MATLAB using the ! operator, like:
>> !fmuCheck.win64.exe xyz.fmu
In this case the reason for the error is the following:
The issue is that the FMU you try to load only contains a 32-bit DLL that cannot be used on 64-bit MATLAB (or vice versa).
You will need the FMU supplier to include the 64-bit DLL in this FMU (or 32-bit respectively).
If you are currently using 64-bit MATLAB and have an older release (R2015b or older) it might also be possible to get a 32-bit version of MATLAB. Starting with MATLAB R2016a only 64-bit versions are available.
But please note that this is only stretching the issue. That's why we recommend going for 64-bit.