Looping issues...

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

  • Looping issues...

    Wanted to know if anyone could help with this:

    (PC-DMIS 3.7 MR3)

    I have a fixture that is holding three parts. I can write the program to inspect all three parts, or I can write the program to inspect one part and then loop that program twice to get the next two. The problem I encounter is that the next two parts are not offset by the same dimensions and angle. So I cannot use the same loop command for all three parts because they are not spaced the same on the fixture. The second part is offset from the first by 3.500, 3.160, 0, 180degrees. The thrid part is offset from the first by -8.520, 0.906, 0, 270degrees.

    I tried to run two loops, one with the first offset, the other with the second offset. But the program wants to inspect the first two only, or the first and third only, or all three and than a fourth that doesn't exist. I cannot get it to do the three parts and then stop.

    Can anyone assist me with how I should configure the loop command?

    Thanks,

  • #2
    Well, you could do 3 alignments, one for each position in the fixture, then have the loop call up the correct (external) alignment for that position.
    sigpic
    Originally posted by AndersI
    I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

    Comment


    • #3
      I've never tried this so it may not work perhaps someone else has experience with this. Perhaps you could (if posible) nest a loop inside your loop and use the nested loop to set a variable that you would use as your offset value.
      <internet bumper sticker goes here>

      Comment


      • #4
        what matt said, yea thats the ticket
        Links to my utilities for PCDMIS

        Comment


        • #5
          I did try the "nested loop" idea. I had a loop inside the first loop. I played around with the start number, end number. But I couldn't get the loops to work in the correct order, or the correct number of times. It would only do the first two, or the first and the third, or it wanted to do more than 3.

          Comment


          • #6
            make sure that you loops are nested correctly.

            post just the loop code...
            Links to my utilities for PCDMIS

            Comment


            • #7
              Could you copy and paste with pattern 2 times for the differing offsets?
              Perry
              B&S Mistral
              3.207 Beta on XP

              Older'n dirt

              Comment


              • #8
                you could copy / paste the features but would be hard to debug. I would do what matt said.
                I used to be high on life but I built up a tolerance.

                Brown & Sharpe Global Advantage
                PCDMIS CAD++ v2011mr2
                PH10MQ/SP600M


                sigpic

                Comment


                • #9
                  Here is the loop code:

                  V1 =LOOP/START, ID = YES, NUMBER = 2, START = 1, SKIP = ,
                  OFFSET: XAXIS = 3.5002, YAXIS = 3.1605, ZAXIS = 0, ANGLE = 180
                  V2 =LOOP/START, ID = YES, NUMBER = 1, START = 1, SKIP = ,
                  OFFSET: XAXIS = -8.542, YAXIS = 0.9062, ZAXIS = 0, ANGLE = 270

                  Comment


                  • #10
                    You could make the offsets variables and have the variable dependant upon the loop count. I loop # this then offset that.

                    Haven't done this in PCDMIS yet but if it can be done in MM4 I'm sure you can do it with PCDMIS.

                    TK
                    sigpicHave a homebrew

                    Comment


                    • #11
                      Tater,
                      what order are the end loops in? I forget does pcdmis care?
                      Links to my utilities for PCDMIS

                      Comment


                      • #12
                        Guys, here is an update as to my looping issues. And to why this is a problem for me:

                        I have a fixture that holds three parts. They are not offset by the same distances, or angle. There are 5 dimensions on each part that I am sending to my SPC software (SPC Light). When PC-DMIS saves these 5 dimensions from the 3 parts, it saves them as 15 different variables, and that is how my SPC software reads it in the XSTATS11.tmp file. This is the problem. I want it to be read as 3 samples of 5 dimensions so that it will be saved as a subgroup of three parts. I have tried to name the dimensions the same name, but PC-DMIS says they “must be unique” names.

                        Is there a certain way that I must name them? Or is there a way to tell PC-DMIS that these are the same variables, and not 15 different variables?


                        I have found a way to use the loop command to inspect the parts. This will save the dimensions correctly for my SPC software to read them. But my parts are offset by different distances, and angle. The loop only allows me to enter in 1 offset. When I nest my loops, the naming of the dimensions messes up how SPC Light reads them. I think that the only way it will work is with 1 loop, not 2. This takes me back to the "nameing" problem.

                        I am getting frustrated with this. Any ideas or insight would be helpful

                        Thanks,

                        Comment


                        • #13
                          I have no experience with looping of the type you need, but I do have a suggestion. Seeing as you have 3.7MR3 can I assume that you also have an SMA? If so this is the perfect time to utilize the SMA. That is what the Application Engineers are there for. Just a thought.
                          sigpic

                          James Mannes

                          Comment


                          • #14
                            I'd go with Matt Hoedeman's recommendation of flow control. I would not have recommended looping if I had known I'd put you through this. Sorry man, but I think Matt's idea should work well for you. I'll see if I can write up a code snip of what Matt is talking about in case you need ideas (if I get some extra time today).

                            Craig
                            <internet bumper sticker goes here>

                            Comment


                            • #15
                              Loop alternative

                              Loops are great for simple repetition. Once I want to go beyond that, and avoid the implications that PC-DMIS offers, I write my own logic in may cases. Here is an example (pseudocode) of what I mean -

                              Initial alignment
                              Save Alignment externally => A1

                              Label => L1
                              Recall alignment A1
                              measure features
                              move alignment (translate, rotate, etc)
                              Save alignment => A1
                              Go to Label L1

                              So you see, every time it branches back to the Label again, it recalls the alignment of the same name. BUT, what is inside the alignment is different every time.

                              In your case, you can do your translation and rotation (based on variables) at the end of each cycle, and save it again to the extgernal alignment file. When it branches back up, it knows where the next part is, and runs the same measurement process.

                              As I said, I've used this sort of operation many times, and it never fails me.

                              Comment

                              Related Topics

                              Collapse

                              • generic_user
                                Looping and keeping the numbers
                                by generic_user
                                I have a fixture that holds 10 parts. Let's say I have to run 50. How do I have the report continue with the eleventh part? Meaning once all 10 have run....
                                04-04-2015, 04:52 PM
                              • towers
                                Looping in multiple axis'
                                by towers
                                We are having fixtures made for several of our parts. I’ve attached a picture of the fixture. I know how to loop within a program and offset within...
                                07-10-2013, 01:07 PM
                              • IDR_jt
                                Alignment in a loop
                                by IDR_jt
                                We are working with our loop to measure 4 parts with offsets. We must to align each part separately in the fixture but we don’t know how to do that....
                                09-18-2012, 01:23 PM
                              • JamesMannes
                                Looping
                                by JamesMannes
                                Hi folks,
                                New to looping and having a problem. What I have is 4 parts in a row going left to right. I first tried to use my original alignment and...
                                04-12-2007, 08:43 PM
                              • WolfMan
                                Yet another Looping thread
                                by WolfMan
                                I have not done this in a very long time, can someone suggest the best way to loop. I have 4 identical cylindrical parts that I want to measure in one...
                                08-09-2017, 11:49 AM
                              Working...
                              X