I'm successfully created co-simulation AMESim and simulink models and I can execute fine when the amesim model is in the current folder in matlab. However, our simulation architecture requires it be several folders beneath the current folder. This causes an abnormal exit from the s-function mex.
Also, I moved the simulink model and the mex file to a sub-folder location and the simulation executed fine.
Yes, I have moved the mex file to another folder on the path and that works. However, the *.ame file alway needs to be in the matlab current directory, being in another folder on the path does not work. I've dug into the c-file amesim makes to create the mex and there appears to be a function that hard codes this into the compiled mex. I'm currently trying to pass an absolute path into the amemex.exe comiler program to get around this.