MATLAB: Do I not see Simscape inports and outports from the test harness

harnessinportinputoutportoutputSimscapetest

I have a Simscape model with input and output ports but when I create a test harness I cannot see these ports.

Best Answer

In the Simscape documentation we find that model referencing is supported, with some restrictions:
  • All Physical connection lines must be contained within the referenced model. Such lines cannot cross the boundary of the referenced model subsystem in the referencing model.
  • The referencing model and the referenced model must use the same solver.
For more details please refer to the following link to the documentation:
A possible workaround is to use Simulink ports at the interface between the Simscape model and the test harness.
Within the referenced model, the Simulink signals that interfaces with the test harness can be directly transformed to/from Simscape signals (pressure, tempetature, etc).