From: Kate J. on
I had my system of files (which include Simulink models as well as xPC Target) up and running on my previous PC; then, the PC died, and I had to transfer everything over to a new PC. Now, when I try to run these same files/models that had previously worked, (specifically, the Simulink model that runs on my Host PC, using xPC Target; I call this my "Host model"), I get the error message:
........................................
Error while obtaining sizes from MEX S-function 'controller_CMEXsfcn' in 'Host_model/S-Function'. MATLAB error message:

Invalid MEX-file 'C:\research_project\8-01-10\mymexfile.mexw32': This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
..........................................
I have deleted the previous mymexfile.mexw32 from my working directory and rebuilt it, as I figured that it might need to be built on the new PC; however, this hasn't resolved this error.

What might be the problem? If the mex file cited in the error message *is* located in my working directory, and it worked on my previous PC, why does the error message now say that my mex-file is 'invalid'?

Thanks for any input anyone has.
From: Robert on
"Kate J." <quisquiliae(a)hotmail.com> wrote in message <i3v1us$ldg$1(a)fred.mathworks.com>...
> I had my system of files (which include Simulink models as well as xPC Target) up and running on my previous PC; then, the PC died, and I had to transfer everything over to a new PC. Now, when I try to run these same files/models that had previously worked, (specifically, the Simulink model that runs on my Host PC, using xPC Target; I call this my "Host model"), I get the error message:
> .......................................
> Error while obtaining sizes from MEX S-function 'controller_CMEXsfcn' in 'Host_model/S-Function'. MATLAB error message:
>
> Invalid MEX-file 'C:\research_project\8-01-10\mymexfile.mexw32': This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
> .........................................
> I have deleted the previous mymexfile.mexw32 from my working directory and rebuilt it, as I figured that it might need to be built on the new PC; however, this hasn't resolved this error.
>
> What might be the problem? If the mex file cited in the error message *is* located in my working directory, and it worked on my previous PC, why does the error message now say that my mex-file is 'invalid'?
>
> Thanks for any input anyone has.

An S-Function "controller_CMEXsfcn" would usually call mdlInitializeSizes from some controller_CMEXsfcn.mexw32 but from mymexfile.mexw32. Maybe you provide us with the code from controller_CMEXsfcn:mdlInitializeSizes or whatever you really run. If you're not allowed to, you must reproduce the problem with some neutral example model/code and post it.

Chears,

Robert
From: Kate J. on
Oops, my mex file's name is actually 'controller_CMEXsfcn.mexw32', not 'mymexfile'; I had changed the name in the latter part of the error message to simplify things, but forgot to change it at the top of the error message.

Does that change anything?
From: Kate J. on
To clarify my last post, here is my actual error message:

Error while obtaining sizes from MEX S-function 'controller_CMEXsfcn' in 'Host_model/S-Function'. MATLAB error message:

Invalid MEX-file 'C:\research_project\8-01-10\controller_CMEXsfcn.mexw32': This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
From: Kate J. on
Thanks for your input, Robert. I will take a look at the mdlInitializeSizes code in the mex file. However, I'm puzzled why this same, unaltered code would run fine on my previous PC, but now fail on the new one... weird.
 |  Next  |  Last
Pages: 1 2
Prev: simulate jump process
Next: high density scatterplot