[MBDyn-users] fork & simulink & sockets

Pierangelo Masarati masarati at aero.polimi.it
Fri Oct 12 15:46:45 CEST 2007


Alessandro Fumagalli wrote:


>> The stop-time provided in the MBDyn-input file does not matter in case
>> of a Simulink-run. Stop-time seems to be determined by the setting in the
>> Simulink configuration.
>>
> You are right, but if you launch a simulink run with the mbdyn stop time
> smaller than
> the simulink one, mbdyn stops and the simulink run doesn't fails but
> produce
> unsignificant results (results are good as far as mbdyn is running).
> Maybe, an error signal should be launched...

Well, apparently either the communicators hide the SIGPIPE resulting
from MBDyn closing the sockets, or Simulink traps those SIGPIPE's and
ignore them.  In the communicators code I see they are designed to
handle error conditions by calling ssSetStopRequested(), which is
supposed to tell Simulink to stop the simulation.  Apparently, Simulink
traps the signal itself (of course, otherwise the whole Matlab could die
because of an uncaught signal!).  So the problem might be within
Simulink itself (if it is a problem at all; probably we need to set some
parameters in the communicators, things like telling Simulink the
communicators blocks could stop the simulation or so).

p.





More information about the Mbdyn-users mailing list