MATLAB: Is it possible to split a SimMechanics model (first or second generation) for concurrent execution on a multi core system

Simscape Multibody

I tried to split a SimMechanics model (first generation) into two models. I would like to make a top level model and then use model blocks in the design and reference each SimMechanics model in a separate model block. When I try this I am unable to see the SimMechanics Ports.

Best Answer

It is not be possible to split a SimMechanics model (1st or 2nd generation) for concurrent execution in the way that you intend. The SimMechanics ports do not become directly visible as Inports/Outports of the referenced model. The reason for this is that the SimMechanics system has to be contained within the model. When simulated, the SimMechanics model is converted into a MEX executable and at this point the only ports that are supported are Simulink ports.
One workaround is to modify the sections such that the input and output ports are just Physical signals (no body connections etc.). Then ‘PS-Simulink Converter’ and the ‘Simulink-PS Converter’ blocks may be used to convert the physical signals to Simulink signals which may then be connected to Simulink Inports/Outports.