I have got a simple Simscape model with Connection Ports exposed out of it.
If I try to generate an S-function from it, I get the following error:
The selected system expresses connection ports. Subsystem based code generation is not supported for portions of physical models. In order to generate code, the physical model must exist entirely within a subsystem.
If I instead try to generate a protected model and create a harness from it, I get a model reference with missing connection ports.
How can I correctly create a protected Simscape subsystem/model ?
Best Answer