Page 1 of 1

Simulink error of opensim-matlab interface

Posted: Sun Jun 09, 2019 7:24 pm
by ssyx
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.

Re: Simulink error of opensim-matlab interface

Posted: Mon Jun 10, 2019 1:12 am
by mitkof6
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.

Re: Simulink error of opensim-matlab interface

Posted: Mon Jun 10, 2019 11:19 pm
by ssyx
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.

Re: Simulink error of opensim-matlab interface

Posted: Tue Jun 11, 2019 12:09 am
by mitkof6
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.