Yet another Looping thread

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

  • Yet another Looping thread

    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 program. I already have the program to measure 1 part. All the 4 parts are in the fixture at the same distance apart from each other.

    Is casing is what I need?

    or just move the orgin, then loop the original code?
    Last edited by WolfMan; 08-09-2017, 10:54 AM.
    B&S One
    PC-DMIS CAD v2014

    Romer Infinity

  • #2
    With a fixture you can just use a loop with offset

    Comment


    • dph51
      dph51 commented
      Editing a comment
      Are you sure he doesn't need

      Code:
       loopo 
      loopo
      
      Code
      
      end/loopo
      end/loopo
      for loopoing?

    • WolfMan
      WolfMan commented
      Editing a comment
      I do need that. He did say that i need it in the next post

    • Kp61dude!
      Kp61dude! commented
      Editing a comment
      Double edged sword dph51...loopo, loopoing hehehe.

  • #3
    So I believe you will need two loops and two loop end.
    One loop will be for the X axis moves and the other for the Y axis moves between parts.
    V1 =LOOP/START,ID=YES,NUMBER=2,START=1,SKIP=, OFFSET:XAXIS=0,YAXIS=11,ZAXIS=0,ANGLE=0 V2 =LOOP/START,ID=YES,NUMBER=2,START=1,SKIP=, OFFSET:XAXIS=9,YAXIS=0,ZAXIS=0,ANGLE=0 $$ NO, A BUNCH OF CODE LOOP/END LOOP/END I just copied this for an example

    Comment


    • WolfMan
      WolfMan commented
      Editing a comment
      So I would put the Loop before the code, and end look after the code?

  • #4
    Well that didn't save how I had it.

    Comment


    • WolfMan
      WolfMan commented
      Editing a comment
      Yes, 4 parts are 8.12 apart in each direction, so Yes its a square pattern

    • Mikeg
      Mikeg commented
      Editing a comment
      You said it..

    • Mikeg
      Mikeg commented
      Editing a comment
      I know what to do just haven't used enough to know why. That's why I said it

  • #5
    Code:
    loadprobe/1x30
                tip/t1a0b0, shankijk=0, 0, 1, angle=0
                displayprecision/4
    pln1       =feat/plane,cartesian,triangle
                theo/<8.4737,-0.0307,0>,<0,0,1>
                actl/<19.5828,-0.4314,-22.3464>,<-0.0000475,-0.0025507,0.9999967>
                meas/plane,3
                  hit/basic,normal,<7.3232,1.2468,0>,<0,0,1>,<19.4629,-0.5266,-22.3467>,use theo=yes
                  hit/basic,normal,<7.2808,-1.6252,0>,<0,0,1>,<19.6427,-0.3102,-22.3461>,use theo=yes
                  hit/basic,normal,<10.8169,0.2861,0>,<0,0,1>,<19.6427,-0.4574,-22.3465>,use theo=yes
                endmeas/
    cir1       =feat/circle,cartesian,in,least_sqr
                theo/<8.8129,0,-0.1215>,<0,0,1>,2.5325
                actl/<19.1943,-2.0975,-22.4074>,<0,0,1>,2.533
                meas/circle,3,zplus
                  hit/basic,normal,<7.5481,0.0602,-0.0986>,<0.9988689,-0.0475489,0>,<19.2096,-0.8311,-22.4074>,use theo=yes
                  hit/basic,normal,<8.6241,1.2521,-0.1187>,<0.1490856,-0.9888243,0>,<20.4422,-1.8813,-22.4074>,use theo=yes
                  hit/basic,normal,<9.051,-1.2437,-0.1473>,<-0.1880504,0.9821594,0>,<19.7485,-3.2363,-22.4074>,use theo=yes
                endmeas/
    cir2       =feat/circle,cartesian,in,least_sqr
                theo/<8.8129,1.6,-0.1424>,<0,0,1>,0.3906
                actl/<19.1843,-0.4993,-22.4016>,<0,0,1>,0.3908
                meas/circle,3,zplus
                  hit/basic,normal,<8.7867,1.4065,-0.1029>,<0.1343068,0.9909398,0>,<19.3497,-0.3952,-22.4015>,use theo=yes
                  hit/basic,normal,<8.6366,1.684,-0.1769>,<0.9026903,-0.4302909,0>,<19.2147,-0.3063,-22.4016>,use theo=yes
                  hit/basic,normal,<9.0082,1.5955,-0.1474>,<-0.9997346,0.0230374,0>,<19.0044,-0.423,-22.4015>,use theo=yes
                endmeas/
    a1         =alignment/start,recall:startup,list=yes
                  alignment/level,zplus,pln1
                  alignment/trans,zaxis,pln1
                  alignment/trans,xaxis,cir1
                  alignment/trans,yaxis,cir1
                  alignment/rotate_circle,yplus,to,cir1,and,cir2,about,zplus
                alignment/end
    [B][COLOR=#FF0000] mode/dcc[/COLOR][/B]
    [B][COLOR=#0000cd]v1         =loop/start,id=yes,number=2,start=1,skip=,
                  offset:xaxis=-8.12,yaxis=0,zaxis=0,angle=0
    v2           =loop/start,id=yes,number=2,start=1,skip=,
                    offset:xaxis=0,yaxis=8.12,zaxis=0,angle=0[/COLOR][/B]
                    clearp/zplus,0.5,zplus,0,on
    pln1_datum_a    =feat/plane,cartesian,triangle
                    theo/<7.7808,-8.1507,0>,<0,0,1>
                    actl/<7.7299,-8.2014,0.025>,<-0.0001541,0.0024145,0.9999971>
                    meas/plane,3
                      move/clearplane
                      hit/basic,normal,<6.6303,-6.8732,0>,<0,0,1>,<6.5794,-6.9239,0.0217>,use theo=yes
                      hit/basic,normal,<6.588,-9.7452,0>,<0,0,1>,<6.5371,-9.7958,0.0286>,use theo=yes
                      hit/basic,normal,<10.1241,-7.8338,0>,<0,0,1>,<10.0732,-7.8845,0.0246>,use theo=yes
                    endmeas/
    cir1_datum_b    =feat/circle,cartesian,in,least_sqr
                    theo/<8.12,-8.12,-0.09>,<0,0,1>,2.5325
                    actl/<8.0693,-8.1705,-0.0697>,<0,0,1>,2.5332
                    meas/circle,4,zplus
                      move/clearplane
                      hit/basic,normal,<9.3863,-8.12,-0.09>,<-1,0,0>,<9.336,-8.1706,-0.0697>,use theo=yes
                      hit/basic,normal,<8.12,-6.8537,-0.09>,<0,-1,0>,<8.0691,-6.9041,-0.0697>,use theo=yes
                      hit/basic,normal,<6.8538,-8.12,-0.09>,<1,0,0>,<6.8026,-8.1706,-0.0697>,use theo=yes
                      hit/basic,normal,<8.12,-9.3862,-0.09>,<0,1,0>,<8.0691,-9.437,-0.0696>,use theo=yes
                    endmeas/
    cir2_datum_c    =feat/circle,cartesian,in,least_sqr
                    theo/<8.12,-6.52,-0.142>,<0,0,1>,0.391
                    actl/<8.0691,-6.5725,-0.1217>,<0,0,1>,0.3911
                    meas/circle,4,zplus
                      move/clearplane
                      hit/basic,normal,<8.3155,-6.52,-0.142>,<-1,0,0>,<8.2647,-6.5704,-0.1217>,use theo=yes
                      hit/basic,normal,<8.12,-6.3245,-0.142>,<0,-1,0>,<8.0691,-6.377,-0.1217>,use theo=yes
                      hit/basic,normal,<7.9245,-6.52,-0.142>,<1,0,0>,<7.8736,-6.5704,-0.1217>,use theo=yes
                      hit/basic,normal,<8.12,-6.7155,-0.142>,<0,1,0>,<8.0691,-6.768,-0.1216>,use theo=yes
                    endmeas/
    a2             =alignment/start,recall:a1,list=yes
                      alignment/level,zplus,pln1_datum_a
                      alignment/trans,zaxis,pln1_datum_a
                      alignment/trans,xaxis,cir1_datum_b
                      alignment/trans,yaxis,cir1_datum_b
                      alignment/rotate_circle,yplus,to,cir1_datum_b,and,cir2_datum_c,about,zplus
                    alignment/end
    cir3_od        =feat/circle,cartesian,out,least_sqr
                    theo/<0,0,-0.5>,<0,0,1>,7.074,0
                    actl/<-8.0689,8.1711,-0.4993>,<0.0000048,-0.0000007,1>,7.0735,0
                    meas/circle,4,zplus
                      move/clearplane
                      hit/basic,normal,<3.537,0,-0.5>,<1,0,0>,<-4.532,8.1702,-0.4993>,use theo=yes
                      move/circular
                      hit/basic,normal,<0,3.537,-0.5>,<0,1,0>,<-8.068,11.7078,-0.4993>,use theo=yes
                      move/circular
                      hit/basic,normal,<-3.537,0,-0.5>,<-1,0,0>,<-11.6057,8.172,-0.4993>,use theo=yes
                      move/circular
                      hit/basic,normal,<0,-3.537,-0.5>,<0,-1,0>,<-8.0698,4.6344,-0.4993>,use theo=yes
                    endmeas/
    cir4_decal_od    =feat/circle,cartesian,out,least_sqr
                    theo/<0,0,-0.037>,<0,0,1>,4.75,0
                    actl/<-8.0688,8.1712,-0.0363>,<0.0000048,-0.0000007,1>,4.7494,0
                    meas/circle,4,zplus
                      move/clearplane
                      hit/basic,normal,<2.375,0,-0.037>,<1,0,0>,<-5.6941,8.1706,-0.0363>,use theo=yes
                      move/circular
                      hit/basic,normal,<0,2.375,-0.037>,<0,1,0>,<-8.0683,10.5459,-0.0363>,use theo=yes
                      move/circular
                      hit/basic,normal,<-2.375,0,-0.037>,<-1,0,0>,<-10.4435,8.1717,-0.0363>,use theo=yes
                      move/circular
                      hit/basic,normal,<0,-2.375,-0.037>,<0,-1,0>,<-8.0695,5.7965,-0.0363>,use theo=yes
                    endmeas/
    pnt1_decal_step    =feat/point,cartesian
                    theo/<0.3357,-2.7537,-0.1>,<0,0,1>
                    actl/<-7.734,5.4173,-0.1037>,<0.0000048,-0.0000007,1>
                    meas/point,1,workplane
                      move/clearplane
                      hit/basic,normal,<0.3357,-2.7537,-0.1>,<0,0,1>,<-7.734,5.4173,-0.1037>,use theo=yes
                    endmeas/
    
    cir16          =feat/circle,cartesian,in,least_sqr
                    theo/<0,1.6,-0.142>,<0,0,1>,0.391
                    actl/<-8.0685,9.7694,-0.1413>,<0.0000048,-0.0000007,1>,0.391
                    meas/circle,4,zplus
                      move/clearplane
                      hit/basic,normal,<0.1955,1.6,-0.142>,<-1,0,0>,<-7.873,9.7711,-0.1413>,use theo=yes
                      hit/basic,normal,<0,1.7955,-0.142>,<0,-1,0>,<-8.0685,9.9649,-0.1414>,use theo=yes
                      hit/basic,normal,<-0.1955,1.6,-0.142>,<1,0,0>,<-8.264,9.7712,-0.1413>,use theo=yes
                      hit/basic,normal,<0,1.4045,-0.142>,<0,1,0>,<-8.0685,9.5739,-0.1413>,use theo=yes
                    endmeas/
    cir19          =feat/circle,cartesian,in,least_sqr
                    theo/<-0.8125,-1.4073,-0.149>,<0,0,1>,0.328
                    actl/<-8.8825,6.7633,-0.1486>,<0.0000048,-0.0000007,1>,0.3285
                    meas/circle,3,zplus
                      move/clearplane
                      hit/basic,normal,<-0.9595,-1.4802,-0.1633>,<0.8958536,0.4443494,0>,<-9.0299,6.6908,-0.1626>,use theo=yes
                      hit/basic,normal,<-0.6982,-1.525,-0.161>,<-0.6965228,0.7175346,0>,<-8.7674,6.6461,-0.1603>,use theo=yes
                      hit/basic,normal,<-0.829,-1.2441,-0.1236>,<0.1006986,-0.994917,0>,<-8.8982,6.9268,-0.1229>,use theo=yes
                    endmeas/
    
    cir23          =feat/circle,cartesian,in,least_sqr
                    theo/<-0.8125,1.4073,-0.149>,<0,0,1>,0.328
                    actl/<-8.8803,9.5764,-0.1486>,<0.0000048,-0.0000007,1>,0.3283
                    meas/circle,3,zplus
                      move/clearplane
                      hit/basic,normal,<-0.8022,1.571,-0.1633>,<-0.0631089,-0.9980066,0>,<-8.8708,9.7402,-0.1626>,use theo=yes
                      hit/basic,normal,<-0.9716,1.3672,-0.161>,<0.9696646,0.2444391,0>,<-9.04,9.5386,-0.1603>,use theo=yes
                      hit/basic,normal,<-0.6629,1.34,-0.1236>,<-0.9119727,0.4102509,0>,<-8.7299,9.5106,-0.1229>,use theo=yes
                    endmeas/
    cir24_328      =feat/circle,cartesian,in,least_sqr
                    theo/<-1.625,0,-0.149>,<0,0,1>,0.328
                    actl/<-9.6945,8.1711,-0.1486>,<0.0000048,-0.0000007,1>,0.328
                    meas/circle,3,zplus
                      move/clearplane
                      hit/basic,normal,<-1.7616,0.0908,-0.1633>,<0.8327446,-0.5536573,0>,<-9.8307,8.2624,-0.1626>,use theo=yes
                      hit/basic,normal,<-1.6698,-0.1578,-0.161>,<0.2731418,0.9619738,0>,<-9.7389,8.0132,-0.1603>,use theo=yes
                      hit/basic,normal,<-1.4919,0.0959,-0.1236>,<-0.811274,-0.5846661,0>,<-9.5614,8.267,-0.1229>,use theo=yes
                    endmeas/
    cir24          =feat/circle,cartesian,in,least_sqr
                    theo/<0,-1.6,-0.136>,<0,0,1>,0.315
                    actl/<-8.0702,6.57,-0.1353>,<0.0000048,-0.0000007,1>,0.3153
                    meas/circle,4,zplus
                      move/clearplane
                      hit/basic,normal,<0.1575,-1.6,-0.136>,<-1,0,0>,<-7.9126,6.5711,-0.1353>,use theo=yes
                      hit/basic,normal,<0,-1.4425,-0.136>,<0,-1,0>,<-8.0693,6.7277,-0.1353>,use theo=yes
                      hit/basic,normal,<-0.1575,-1.6,-0.136>,<1,0,0>,<-8.2278,6.5711,-0.1353>,use theo=yes
                      hit/basic,normal,<0,-1.7575,-0.136>,<0,1,0>,<-8.0694,6.4123,-0.1353>,use theo=yes
                    endmeas/
    
    
    [B][COLOR=#ff0000] loop/end
                loop/end [/COLOR][/B]
    Last edited by WolfMan; 08-09-2017, 11:58 AM.
    B&S One
    PC-DMIS CAD v2014

    Romer Infinity

    Comment


    • #6
      its strange, my first loop is in the X-8.12, yet the probe is going towards the part in the Y 8.12
      B&S One
      PC-DMIS CAD v2014

      Romer Infinity

      Comment


      • Kp61dude!
        Kp61dude! commented
        Editing a comment
        The "inside" loop runs first (V2) and then the "outer" second (V1) just switch your number around and that should work.

      • WolfMan
        WolfMan commented
        Editing a comment
        why v 2 first?

      • Kp61dude!
        Kp61dude! commented
        Editing a comment
        Pay attention to it....

        Program flow is from top to bottom anything inside a loop will....well loop. So when the flow is going from top to bottom and sees V1 it knows to loop that but what is in V1? Your V2. It sees V2 next so it has to complete that loop before it can loop V1. I doubt that made much sense I'm really a hand motion and sound effects talker for this type of stuff.

    • #7
      Your manual alignment aligns to Cir1 and Cir2 and uses Cir1 for XY origin but then your DCC has Cir1 at X8.12 and Y-8.12, shouldn't that be X0 and Y0 to start if they are the same hole used in manual alignment?

      Comment


      • WolfMan
        WolfMan commented
        Editing a comment
        fk really... crap

      • WolfMan
        WolfMan commented
        Editing a comment
        so, thats it, now I have wrong Nom, I have to rewrite the darn thing?

      • WolfMan
        WolfMan commented
        Editing a comment
        its almost not worth it to use a loop, I better off just copy and pate the darn thing

    • #8
      I believe its the alignment after looping trying to recall to A1. I think you want to recall_USE_ACTIVE_ALIGNMENT

      Comment


      • WolfMan
        WolfMan commented
        Editing a comment
        I dont follow.. why? Everything is working as it should. It does checks out of the sequence I thought it would, but who cares.

    • #9
      Paste with Pattern?

      Comment


      • #10
        Looping woks off the alignment where loop begins
        Your axis moves the offset looping based on this alignment...from origin along rotation axis

        I found it better to repeat the alignment in DCC then go into a loop and at times depending on size / length of rotation feature used in rotation I have used fixture or edge
        If you have a rotation control that is a short distance---the amount of error can be inches off when you get further away from alignment origin (first part)
        a manual alignment most likely has a fair amount of error

        Comment


        • Mikeg
          Mikeg commented
          Editing a comment
          I save a backup as soon as I complete the program and put it in a separate folder, just in case.
          Thanks for the information Rich P.

        • WolfMan
          WolfMan commented
          Editing a comment
          i understand .. I have DCC before and with in the loop, so it does DCC Align before each part
          Last edited by WolfMan; 08-10-2017, 11:38 AM.

        • Rich P
          Rich P commented
          Editing a comment
          code posted above I see the following logic....

          a1 align (<--- this alignment is basis for looping jump in X and or Y direction)
          dcc command
          loop1
          loop2
          a2 align ----measured features in dcc.......
          end loop 1
          end loop 2
          as posted alignment that is being used for the loop offsets is coming from manual a1 alignment

          ....suggestion from my experience is
          man align
          dcc command line
          dcc align (<--- this alignment is basis for looping jump in X and or Y direction)
          loop1
          loop1
          part align (inside loop so each part align is on that part)
          measure features etc
          end loop1
          end loop 2

      • #11
        I ended up using paste with pattern
        B&S One
        PC-DMIS CAD v2014

        Romer Infinity

        Comment


        • #12
          Originally posted by WolfMan View Post
          I ended up using paste with pattern
          Don't give up!!! I spent 3 months trying to get, people would help but I still wouldn't get. Managers would breathe down my neck to get parts done but I kept beating them around the bush to buy me experimenting time and in the end it paid off for both managers and myself! Do it HOMBRE!
          PcDmis 2015.1 SP10 CAD++
          Global 7-10-7 DC800S

          Comment

          Related Topics

          Collapse

          • DeWain Hodge
            Looping question
            by DeWain Hodge
            I was asked a question but one of our new inspectors when we were discussing looping. Say you have five parts you want to setup and measures all five....
            09-15-2016, 03:37 PM
          • Kingkrab
            Attention Loop Masters
            by Kingkrab
            So I have 16 parts I need to measure in a 4 rows of 4 pattern. It's a simple 5 hole bolt pattern concentric to the I.D. Plane on the flange and level...
            10-10-2014, 06:10 AM
          • Donny Wallbanger
            Looping a Loop?
            by Donny Wallbanger
            Good morning all I hope you are all having a good day, I have a program that contains a simple loop to check multiple pockets on a valve rotator body,...
            01-13-2017, 04:37 AM
          • JBELL
            Another Loop Question
            by JBELL
            I have searched with no luck for an answer. I am very new to looping and have some questions. Right now, I am doing a Man align then loop commands then...
            11-04-2015, 02:58 PM
          • bhska
            Looping Question?
            by bhska
            I have a program to check multiple features on these parts for inspection. I have looped 1-3 with one loop command that translates along X. My question...
            06-15-2006, 04:07 PM
          Working...
          X