LabVIEW for Everyone: Graphical Programming Made Easy and Fun (3rd Edition)

Here's some more practice for you. If you get really stuck, look in EVERYONE\CH05 for the solutions.

Activity 5-3: Find the Average

Create a subVI that averages three input numbers and outputs the result (see Figure 5.33). Remember to create both the icon and connector for the subVI. Save the VI as Find the Average.vi.

Figure 5.33. Find the Average.vi front panel

Activity 5-4: Divide by Zero (Who Says You Can't?)

Build a VI that generates a random number between zero and ten, and then divides it by an input number and displays the result on the front panel (see Figure 5.34). If the input number is zero, the VI lights an LED to flag a "divide by zero" error. Save the VI as Divide by Zero.vi.

Figure 5.34. Divide by Zero.vi front panel

Use the Equal? Function found in the Comparison subpalette of the Functions palette.

Категории