i have an issue with importing simulink models into AMESIM via SL2AMEcosim.
With Matlab 2007 the procedure (using old_sl2amecosim) worked fine, but when I tried to change to Matlab 2015 (which uses new_sl2amecosim) it didn't work out anymore.
The problem is that in the new version the multidimensional signal output is split into a bunch of scalar outputs, which isn't compatible with my other submodels anymore.
How can I fix that?
Did the requirements for the Simulink model (port definitions etc.) change, or is my current modeling approach deprecated?
what is your issue exactly?
- sl2amecosim failing. In which case what error do you get?
- sl2amecosim fine but you can't connect the resulting submodel to your existing Amesim model? If it's an issue of vector/scalar you may have to use mux submodel from signal and controls library to combine scalar outputs from your submodel into a vector signal (use demux submodel for the opposite operation).
thanks for your reply. It took me a while, but no I have time to answer.
I think you understood the main problem well. The problem is that the building process does not fail at all.
But instead of keeping the vector structre of the Simulink model, which was created by a demux block in there, the routine creates a bunch of scalar signals.
This could be fixed using the mux block that is displayed in the picture just as you said.
But it would be much more convinient if the building process would simply maintain the structure of my simulink model like before.
Maybe you could provide a simple simulink model, which has this behavior?
Siemens PLM Support is working on the problem of converting MUX blocks contained at the ports of the simulink model correctly into the AMESim model.
The problem can be solved for now with a quick and dirty workaround: connect AMESim MUX-block models to the ports to restore correct data format.
To date, I figured out that there has been a change in philosophy using sl2amecosim with relative library paths e.g. sl2amecosim ('SimulinkModel','LibraryPath','Icon').
This can be fixed manually for now and hopefully is available again in a future release.
I'll upload the hopefully final solution by next week.