I have a simulink model that I have exported as an amesim model using the sl2amecosim command. The model seems to work as intended, except that I cannot get amesim to exchange with the model at any rate other than every second.
In simulink the fixed-step size (fundamental sample time) is set to 0.01 (I assume the units is second). The type of solver is fixed-step solver, automatic solver selection. The input ports sample time are set to -1 (inherited).
In the amesim model parameters, when the undersample parameter is kept to the default value (1), the amesim model only exchanges with the simulink component every second instead of every 0.01 second. Also, I've noticed that for some reason even when I set the undersample value to a value other than 1, they still exchange every second rather than every 5 or 10 seconds.
I need them to exchange every 0.01 second but no matter what I do they only meet every second.
Could this be a bug?
I am using amesim v15, visual c++ 32-bit compiler, matlab r2015.
Did you try with a simple example first?
I have same configuation (15.1, 32-bit VCC, MATLAB 2015b) testing a simple Relay example here. Attached for reference. As the undersample is increased there is a delay between communications of the two software and the relay is turned on/off later with respect to LMS Amesim command.
Also, how are you checking the communication rate?
On LMS Amesim side you should check
- Fixed-time step size (if using it) this should be at least the same as Simulink or smaller
- Print interval - again should be same size as Simulink to see the details of the communication
Hope this helps,