Can older 32-bit mex files be run as S-functions in 64-bit Simulink?

I think I know the answer, but I can't find it clearly stated in a forum, and the diagnostic is, "S-Function ' mexw32_file_name' does not exist". The mex file was created with R2012a, and I am running 64-bit R2015a. The source model to rebuild the mex files is not readily available. Thanks.

 채택된 답변

Walter Roberson
Walter Roberson 2016년 5월 31일

1 개 추천

No, that is not possible. It is not possible for 64 bit Windows applications to call 32 bit Windows routines. The closest you could get would be to use TCP (or similar, perhaps shared memory) to have two different programs running and communicating with each other.

댓글 수: 5

Looking for what to do next, if the S-function were created with 64-bit R2012a, would it then be useable in an R2015a or later environment?
I am not certain, but I think so. Ideally mex files should be recompiled for each version, but the incompatible changes have not happened every release.
Hi Walter,
Since its not possible to directly run a mex32 on 64 Bit version of MATLAB, is it possible to have the 32 Bit Version of MATLAB Running the mex32 file and a 64 Bit version of MATLAB communicating with the 32Bit Version of MATLAB? Thanks!
Yes that can be done using tcp or similar communications methods. memory mapped files perhaps.
You just might possibly be able to use the MATLAB Automation interface, but I am not at all sure that works between 32/64 bits and would tend to suspect that it would fail.
Thank you. But it wont be possible to apply the same concept in Simulink I suppose where 2 Simulinks run side by side, one is 32 bit and the other is 64 Bit and their signals communicate in real time and synchronized? I hope the following picture gives a better idea.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품

태그

질문:

2016년 5월 31일

댓글:

2020년 10월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by