You are here

Multicase Selection

26 July, 2019 - 09:47
Available under Creative Commons-ShareAlike 4.0 International License. Download for free at

Select an Integer 32 numeric input and an Integer 32 numeric output and label them Selector and Case respectively.

Figure 5.10 Multicase GUI  

In the Block Diagram window, create a case structure, select the False case and arrange the terminals as shown in Multicase.

Figure 5.11 Multicase  

Wire the Selector numeric control to the case selector on the case structure. The selector label reflects the diagram update.

Figure 5.12 Multicase Selector 

In the0, Default case, add a numeric constant and leave its value as 0.

Figure 5.13 Default Case 

Using the selector label, select case 1. Add a numeric constant, enter 1 and wire it to the case tunnel. The resulting diagram is shown in Case 1.

Figure 5.14 Case 1 

Right click anywhere in the case structure and selectAdd Case After from the pop-up menu.

Figure 5.15 Adding Cases 

Case 2 is added after case 1. Add a numeric constant, enter2 and wire it to the case structure tunnel.

Figure 5.16 Case 2 

Multicase Selection Program shows the results of running this simple case selection programs for Selector set to 0, 1, 2 and 3 respectively.

Figure 5.17 Multicase Selection Program