MATLAB: Do I receive an error when I associate the outputs of a Signal Builder block to a Simulink.Signal object in Simulink 6.5 (R2006b)

simulink

As the attached model demonstrates, if I associate the outputs of a Signal Builder block (containing multiple outputs) to a Simulink.Signal object that resides in the MATLAB workspace, Simulink displays the following error message when simulating or building the model:
The Simulink signal object specified on the line originating from output port 1 of 'TestSigBld3/Signal Builder2' is invalid because it cannot be uniquely mapped to a valid signal in the model.

Best Answer

The ability to associate outputs of a Signal Builder block (containing multiple outputs) with Simulink.Signal objects is not available in Simulink.
Note that a Signal Builder block containing multiple outputs generates virtual signals. It is not possible to name, rename, or associate Simulink.Signal objects with virtual signals.
To work around this issue, convert the virtual signal to a nonvirtual signal. You can do this using any of the following:
  • Signal Conversion block
  • Data Type Conversion block
  • Gain block whose "Gain" value specifies 1
The nonvirtual signal output by these blocks can be named or associated with a Simulink.Signal object.