custom C MEX S-function does not work after Windows11 upgrade anymore

5 Ansichten (letzte 30 Tage)
Simon
Simon am 5 Feb. 2025
Beantwortet: Meet am 15 Mai 2025
After Upgrade to Windows 11, my custom custom C MEX S-funtion does not work anymore.
Matlab2023b 64 Bit.
The error Message is:
"An error occurred while running the simulation and the simulation was terminated
Caused by:
  • Error in '<<path in Simulink model>>/S-Function' while executing C MEX S-function 'ECU_sfun', (mdlUpdate), at time 0.0.
  • Error in Math_mod"
Even after trying to reallocate the coorect s-function, I still face the issue.
Do you know where the issue might come from?
I have also a 32 Bit version of the same code runing with Windows10 which, also under Windows 11, works completely fine.
If you've got any questions, please don't hesitate to ask.
Sorry, I am not allowed to upload the code in the forum.
Thanks a lot in advance.

Antworten (1)

Meet
Meet am 15 Mai 2025
Hi Simon,
This seems to be a machine specific issue. The error might occur due to DMR files in MATLAB. Try deleting the DMR files by following the below steps:
  1. Please run the following command in MATLAB:
>> tempdir
>> Simulink.sdi.getSource
2. Using Windows Explorer, navigate to the tempdir path listed in the result from Step 1.
3. Close all instances of MATLAB. In the Windows Explorer window from Step 2, sort files by "Type".
4. Delete all files with the type "DMR".
5. Delete the file returned by the "Simulink.sdi.getSource" function if it was not deleted in Step 4.
6. Reopen MATLAB. All Prior Session Data should be removed.
I hope this resolves the issue.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by