Additional Activities


Activity 7-6: Reversing the Order Challenge

Build a VI that reverses the order of an array containing 100 random numbers. For example, array[0] becomes array[99], array[1] becomes array[98], and so on. Name the VI Reverse Random Array.vi.

Activity 7-7: Taking a Subset

Build a VI that generates an array containing 100 random numbers and displays a portion of the array; for example, from index 10 to index 50. Name the VI Subset Random Array.vi.

Use the Array Subset function (Programming>>Array palette) to extract the portion of the array.


Activity 7-8: Dice! Challenge

Build a VI that simulates the roll of a die (possible values 16) and keeps track of the number of times that the die rolls each value. Your input is the number of times to roll the die, and the outputs include (for each possible value) the number of times the die fell on that value. Name the VI Die Roller.vi.

You will need to use a shift register in order to keep track of values from one iteration of a loop to the next.


Activity 7-9: Multiplying Array Elements

Build a VI that takes an input ID array, and then multiplies pairs of elements together (starting with elements 0 and 1) and outputs the resulting array. For example, the input array with values 1, 23, 10, 5, 7, 11 will result in the output array 23, 50, 77. Name the VI Array Pair Multiplier.vi.




LabVIEW for Everyone. Graphical Programming Made Easy and Fun
LabVIEW for Everyone: Graphical Programming Made Easy and Fun (3rd Edition)
ISBN: 0131856723
EAN: 2147483647
Year: 2006
Pages: 294

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net