Random numbers?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Random numbers?

    I do a stability study each week with a program I have built. I use a 6" x 6" angle which I place in different location on the table and then run the program 5 times in that location. I would like to come up with a way to have my program chose the location randomly for me. Does anyone have a idea how I might be able to do this. I am using a RACO PLATE, with holes located from A1 to SS37 so I do have a defined group of numbers "locations".

  • #2
    Open excel
    label cells with the appropriate numbers
    put borders around the cells
    print out spreadsheet
    cut along boarder lines
    place small pieces of paper in a plastic container with lid
    place lid on container
    shake thoroughly
    close eyes pick out a number
    repeat tomorrow

    Comment


    • #3
      Originally posted by Goodluck View Post
      Open excel
      label cells with the appropriate numbers
      put borders around the cells
      print out spreadsheet
      cut along boarder lines
      place small pieces of paper in a plastic container with lid
      place lid on container
      shake thoroughly
      close eyes pick out a number
      repeat tomorrow

      NO! Simply find a good 'gamers' store, D&D, Magic, that kind of thing, and get yourself a set of percentile dice (2 10-sided dice) and use them to randomly generate a number from 1 to 100, 'grid' the machine to 100 spots, use what you roll for placement.
      sigpic
      Originally posted by AndersI
      I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

      Comment


      • #4
        Originally posted by Matthew D. Hoedeman View Post
        NO! Simply find a good 'gamers' store, D&D, Magic, that kind of thing, and get yourself a set of percentile dice (2 10-sided dice) and use them to randomly generate a number from 1 to 100, 'grid' the machine to 100 spots, use what you roll for placement.
        OH, even better and simpler and cheaper!

        Simply turn your back on the machine, grab the thing you measure, toss it over your back onto the table, measure it where it stops.
        sigpic
        Originally posted by AndersI
        I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

        Comment


        • #5
          =rand() * (1-37) + 37
          Last edited by craiger_ny; 05-18-2007, 09:40 AM.
          <internet bumper sticker goes here>

          Comment


          • #6
            Eany Meany Miney Moe
            sigpicTHE TASK AHEAD OF YOU, IS NEVER AS GREAT AS THE POWER BEHIND YOU. I Fight for Freedom and Pray For Peace..

            Comment


            • #7
              Originally posted by Tested View Post
              I do a stability study each week with a program I have built. I use a 6" x 6" angle which I place in different location on the table and then run the program 5 times in that location. I would like to come up with a way to have my program chose the location randomly for me. Does anyone have a idea how I might be able to do this. I am using a RACO PLATE, with holes located from A1 to SS37 so I do have a defined group of numbers "locations".
              Is that SS37 or AS37? So you have 37 holes in a row and 45 rows (based on AS, not SS). So, you have a total of 1665 holes in the Rayco plate?

              So, you need a random number from 1 to 1665 OR you need 2 random numbers, 1 to 37 and 1 to 45. You can do this easily in Excel and then use those results to place the detail you are checking.

              Excel formula: =RANDBETWEEN(1,37)

              Personally, I would use the 2 random number method, one for the row and one for the column. Hit F9 to get a new set of numbers.
              sigpic
              Originally posted by AndersI
              I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

              Comment


              • #8
                Originally posted by craiger_ny View Post
                =rand() * (1-37) + 37
                craiger,

                Is there a way to bring that number into a operator comment?

                Comment


                • #9
                  Originally posted by Tested View Post
                  craiger,

                  Is there a way to bring that number into a operator comment?
                  What I posted is Excel. I've never done random number generating for PCDMIS. "random" in help my get a hit.
                  <internet bumper sticker goes here>

                  Comment


                  • #10
                    try scripting

                    I've not done it in PC-DMIS either. It can be done from a BASI script though, are you familiar with that method?

                    Comment


                    • #11
                      Originally posted by Don Ruggieri View Post
                      I've not done it in PC-DMIS either. It can be done from a BASI script though, are you familiar with that method?
                      Code:
                      Sub Main()
                      
                           Dim MValue
                      
                           Randomize
                      
                           MValue = Int((37 * Rnd) + 1)
                      
                           MsgBox MValue
                      
                      End Sub
                      <internet bumper sticker goes here>

                      Comment


                      • #12
                        Aren't you going to want to have an array to store the used numbers in so that you don't run the same position twice?
                        sigpicYou're just jealous the voices talk to me.

                        Comment


                        • #13
                          From a statistical standpoint that is happening. That is what random means. Yes they will come up again but statistically speaking a random number generator should do what needs to be done in light of that.

                          But your sugestion would be cool anyway.
                          <internet bumper sticker goes here>

                          Comment

                          Related Topics

                          Collapse

                          Working...
                          X