Trick 1: use Mux block
Use the Mux block from the Signal Routing palette:

to merge two signals in one and connect them to Scope. Here is an example scheme:

Trick 2: use Vector concatenate block
Another solution is to use the Vector Concatenate block from the Signal Routing palette:

This trick will collect all the signals to be displayed, and then to connect the output from the vector concatenate block to the one input port of the Scope. In matrix case, of course, use Matrix concatenate. The example of schematics is presented below:

The result
Simulink will automatically highlight each signal by a different colour, as shown below:

No comments:
Post a Comment