You are here

Boolean Selection

26 July, 2019 - 09:47
Available under Creative Commons-ShareAlike 4.0 International License. Download for free at http://cnx.org/contents/5b6e61df-b830-48cb-9764-94696cb47c80@1.3

In the Front Panel window, select a Boolean control and an output string.

media/image2.png
Figure 5.2 Case Selection User Interface  

Arrange the diagram to look as in Case Selection G Diagram.

media/image3.png
Figure 5.3 Case Selection G Diagram 

In theTrue case, add a string constant containing True Case.

media/image4.png
Figure 5.4 True Case Diagram 

To select the False case, click on the selector label down arrow and select False from the pop-up menu. You can also cycle through the cases by clicking the next (right) or previous (left) arrows.

Selecting False Case media/image5.png

In the False case, add a string constant containing False Case.

media/image6.png
Figure 5.5 False Case Diagram 

Wire the string constant in the case structure to the output string terminal.

media/image7.png
Figure 5.6 Wiring Case Structures 

Select theTrue case and wire the string constant to the case structure tunnel. Complete the diagram as shown in Completed Case Diagram.

media/image8.png
Figure 5.7 Completed Case Diagram 

It is important to note that all instances in a case structure must be wired to enable data to flow from thecase structure.

In the Front Panel window, toggle the Boolean input control and run the program.

media/image9.png
Figure 5.8 False Selection 
media/image10.png
Figure 5.9 True Selection