Hi all,
I am trying to run the Matlab script and Simulink examples from the project https://simtk.org/projects/opensimmatlab/.
When I run Matlab script, it could run successfully and got the results. But when Simulink runs, the errror is
"An error occurred while running the simulation and the simulation was terminated
Caused by:
Error in 'TestSimulink/Patella Reflex Plant/EngineMatlab' while executing MATLAB S-function 'SEngineMatlab', flag = 3 (output), at time 0.0.
Invalid message ID format: 'EngineMatlab faled during step'. "
Thank you.
Simulink error of opensim-matlab interface
- Yixuan Sheng
- Posts: 3
- Joined: Sat Jun 16, 2018 1:37 am
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Simulink error of opensim-matlab interface
Hi,
This project was created for OpenSim v3.3 and it will not work with v4.0. The source code is made available and with some effort the code can be ported for v4.0.
This project was created for OpenSim v3.3 and it will not work with v4.0. The source code is made available and with some effort the code can be ported for v4.0.
- Yixuan Sheng
- Posts: 3
- Joined: Sat Jun 16, 2018 1:37 am
Re: Simulink error of opensim-matlab interface
Thank you for your reply.
I have changed some disabled names in C++. In Matlab script and Simulink, I try to call same functions and use another 4.0 Opensim model, but Matlab works and Simulink does not work. Is this still the problem of Opensim version or the problem of settings in Simulink? Thank you again.
I have changed some disabled names in C++. In Matlab script and Simulink, I try to call same functions and use another 4.0 Opensim model, but Matlab works and Simulink does not work. Is this still the problem of Opensim version or the problem of settings in Simulink? Thank you again.
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Simulink error of opensim-matlab interface
If the Matlab scripts provided by the project works, then the problem is in the configuration of Simulink since they just call the underlying Matlab functions.