I am trying to use SL2AMECOSIM and I'm running into a problem about which I can't find any information.
I'm using MATLAB R2016 64-bits. Compiler is set to Visual C++ 64-bit on both matlab and amesim.
I tried with a very simple model to see if the problem would go away, but amesim still fails to simulate with the same error.
I compile the model with sl2amecosim('relay','C:\AMETest\libsl2ame','auto') , everything seems to complete fine with no error: "====> SL2AMECOSIM CODE GENERATION FOR MODEL DESPERATE FINISHED SUCCESSFULLY."
I import this in an amesim model:
Warning/Error: Load of imported Simulink model failed.
4 Warning/Error (from submodel DESPERATE instance 1): Fatal error in DESPERATE instance 1.
5 Warning/Error: Terminating the program.
6 Warning/Error: Initialization failed.
7 Information: LMS Amesim model DESPCASD initialization failed.
The "since the model has no state variable..." warning doesn't seem to be related; i've added some dummy components to make it go away, it goes away but the "load of simulink model" failed error persists.
OK, I have figured it out.
For anyone wondering:
the 'Simulink model path' parameter generated by amesim is wrong. It generated this string: ./C:\AMETest\libsl2ame/lib/win32
Remove the ./ and it works.
I have also tested with another computer that has amesim 15 (32-bit visual c++ compiler) and matlab r2015 32-bit, and the same problem occurs.