Noncontiguous Values for Data Port Indices of Multiport Switch Block
This example shows how to use a Multiport Switch block that specifies noncontiguous integer values for data ports. The values of the indices are visible on the data port labels. You do not have to open the block dialog box to determine which value maps to each data port.
When you set Data port for default case to Additional data port
, an extra port with a *
label appears. This port corresponds to the default case, which applies when the control input does not match the data port indices 3, 5, 0, or 18. When that happens in this example, the Multiport Switch block outputs a value of 1
.