Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

version incompatibility for Embedded Matlab Function block in simulink

158 views
Skip to first unread message

craq

unread,
Feb 29, 2012, 10:27:15 AM2/29/12
to
After creating an 'Embedded Matlab function' block in version 2010a, then opening it in 2011a, saving it and reopening in 2010a, I get the following error when simulating the simulink model. This error is severe enough to crash matlab.

Error occurred in 'blah'. Error occurred while attempting to call the error callback function 'Stateflow.Translate.translate' of subsystem 'blah/Embedded MATLAB Function'. The callback function should take a block handle and error ID as input arguments, and return a string that replaces the error produced within the
subsystem. The following error was produced when the error callback function was called: Undefined function or method 'Stateflow.Translate.translate' for input arguments of type 'double'.

After a tip from http://www.gomatlab.de/hilfe-zur-fehlermeldung-t20311.html to set the 'Name of error callback function:' under 'subsystem parameters' to empty I then got a new error

Embedded MATLAB Interface Error: Error using ==> feval Invalid MEX-file 'blah.mexa64: undefined symbol: emlrtCheckBuiltInCtxR2011a.

I assumed this means that the block was compiled to mex code in R2011a, and is now somehow incompatible. I tried making trivial changes to the code in the block, to force it to recompile, but no dice. Even deleting the block and replacing it with an entirely new block (i.e. y=u) gives the same error.

Models which I didn't open in R2011a still work with Emulated Matlab Functions inside them. The simulink blocks can even be copy-pasted from one to the other.

So does anybody have any ideas of how to make Emulated Matlab Functions work in this simulink model again?

craq

unread,
Mar 2, 2012, 6:13:12 AM3/2/12
to
well, the easy solution is to copy all the simulink blocks into a new model in R2010, and then it just works.

Slightly more complicated, so that I haven't quite figured it out yet, would be to use a file which matlab created in the same directory called old_file_name.mdl.2010a which seems like an attempt to preserve the backwards compatibility... Just opening it doesn't work, but since a simple copy-paste does the trick, I'm not worried.
0 new messages