1.4.2 - Dice Throws

  • Create a VI to count the frequency of 2-12 with two dice throws
  • Use a for loop, connected to a numeric control to throw a user-defined number of throws
  • Initialise an array of 13 elements to 0
  • In the Loop
    • Throw two dice:
    • Screen Shot 2012-03-31 at 00.15.48Random x 5 rounded + 1
    • Add them together. At this index position of the array, you must add 1 to count the throw
  • Connect the array out of the For Loop to a Waveform Graph
    • Remember to use a shift register
    • You will need the elements to the right to create the VI
  • Format the "Waveform Graph" as below
  • You can use the flowchart below as inspiration
  • Save your VI ad DiceThrows1.vi
Slide1


Created by Samuel Thrysøe © 2013