looping??

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

  • looping??

    Trying to figure out this looping.... I got as far as taking the first feature of the alignment on the second part! Then it went way over in space and came back not sure what happened. As far as I know you set a loop command after your code for dcc mode and then end/loop at the end of the program.

  • #2
    What are you trying to loop?
    A loop does something as many times as you tell it.
    I would imagine you would need to have your alignment in there at the start (and that's definitely an assumption)
    Are you trying to loop specific features, or the whole program, or..?

    Comment


    • #3
      Can you post the code of what you have done so far?

      Comment


    • #4
      Im trying to loop and entire program

      Comment


      • #5
        =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
        ALIGNMENT/LEVEL,ZPLUS,PLN5
        ALIGNMENT/ROTATE,XMINUS,TO,PLN6,ABOUT,ZPLUS
        ALIGNMENT/TRANS,ZAXIS,PLN5
        ALIGNMENT/TRANS,XAXIS,PLN6
        ALIGNMENT/TRANS,YAXIS,LIN14
        ALIGNMENT/END
        MODE/DCC
        V1 =LOOP/START,ID=YES,NUMBER=3,START=1,SKIP=,
        OFFSET:XAXIS=2,YAXIS=0,ZAXIS=0,ANGLE=0
        PLN3 =FEAT/PLANE,CARTESIAN,TRIANGLE
        THEO/<0.5774,1.1747,0>,<0,0,1>
        ACTL/<0.5774,1.1747,-0.0025>,<-0.0004137,-0.000231,0.9999999>
        MEAS/PLANE,4
        HIT/BASIC,NORMAL,<0.8718,1.8356,0>,<0,0,1>,<0.8719,1.8 355,-0.0021>,USE THEO=YES
        HIT/BASIC,NORMAL,<0.926,0.6539,0>,<0,0,1>,<0.926,0.653 9,-0.0026>,USE THEO=YES
        HIT/BASIC,NORMAL,<0.2628,0.6566,0>,<0,0,1>,<0.2627,0.6 566,-0.0026>,USE THEO=YES
        HIT/BASIC,NORMAL,<0.249,1.5528,0>,<0,0,1>,<0.2491,1.55 27,-0.0027>,USE THEO=YES
        ENDMEAS/
        PLN4 =FEAT/PLANE,CARTESIAN,TRIANGLE
        THEO/<0,0.38,0.0083>,<-1,0,0>
        ACTL/<0.0009,0.3799,0.0082>,<-0.9999999,0.0003435,0.0003419>
        MEAS/PLANE,4
        MOVE/POINT,NORMAL,PART,<0.1872,1.3435,0.6227>
        MOVE/POINT,NORMAL,PART,<-0.0368,0.5564,0.7590>
        HIT/BASIC,NORMAL,<0,0.2592,0.1201>,<-1,0,0>,<0.0009,0.2591,0.12>,USE THEO=YES
        HIT/BASIC,NORMAL,<0,0.4939,0.1104>,<-1,0,0>,<0.001,0.4938,0.1102>,USE THEO=YES
        HIT/BASIC,NORMAL,<0,0.5148,-0.1088>,<-1,0,0>,<0.0009,0.5148,-0.109>,USE THEO=YES
        HIT/BASIC,NORMAL,<0,0.252,-0.0886>,<-1,0,0>,<0.0008,0.2519,-0.0886>,USE THEO=YES
        ENDMEAS/

        blah blah
        loop/end

        Comment


        • #6
          so I also just discovered that it registered that the plane was there and there is pln3[2] in my graphics display window but not in my edit window??

          Comment


          • InspectorJester
            InspectorJester commented
            Editing a comment
            I've had this issue as well. Your profile says you're running 2011,and I saw it in 2013MR1.
            Try shelling the program to see if that fixes it

        • #7
          Originally posted by arock View Post
          so I also just discovered that it registered that the plane was there and there is pln3[2] in my graphics display window but not in my edit window??

          pln3[2] is the second instance of pln3. It won't appear in your edit window.


          The loop command in Pc-Dmis can be a bit rubbish. I've seen/heard of similar, where features get offset but move points don't etc.

          My preferred technique is simply to loop, and use external alignments (and recalling external alignments) to achieve the offset.
          Automettech - Automated Metrology Technology

          Comment


          • #8
            In order to loop without much fuss, you should only "recall current alignment" on all alignments just before, and within the loop.
            You should also restore the exact same alignment structure at the start of your alignment, just before the end of your loop.

            Comment


            • #9
              can you guys break it down barney style... I am not sure so I cant just write a program and add a loop command ... what do you mean add align to loops ... there is a loop start just after my manual align and end loop after all the features have ben measured.

              Comment


              • #10
                arock , still depends on what you are trying to loop. You want to loop your entire program. OK. is your part in a fixture? Do you want to check a part and replace it with another part and replace it with another part and so on? Do you want to check the same part over and over? Do you want to check multiples of the same part spend out onto the table?
                PCDMIS 2015, 4.5.4 SF CMM, Datapage+5.0

                Comment


                • arock
                  arock commented
                  Editing a comment
                  I have a block with three identical parts on standoffs so I want to make offset and run entire program

              • #11
                If you're looping just to measure another part in the same place the Multiexecute Wizard (toolbar Wizards) will do the job without you having to do anything extra with the program. If that is the case, it's very suspect that you have an X offset of 2 in your code??

                Aha, you're in inches and the parts are quite small? Ignore me, sorry!
                AndersI
                SW support - Hexagon Metrology Nordic AB

                Comment


                • #12
                  arock, since you are not posting all the code, we aren't able to lock down a definitive answer for you.

                  Barney mode of post #8:

                  A1=ALIGNMENT/START,RECALL:STARTUP RECALL ACTIVE ALIGNMENT,LIST=YES
                  ALIGNMENT/LEVEL,ZPLUS,PLN5
                  ALIGNMENT/ROTATE,XMINUS,TO,PLN6,ABOUT,ZPLUS
                  ALIGNMENT/TRANS,ZAXIS,PLN5
                  ALIGNMENT/TRANS,XAXIS,PLN6
                  ALIGNMENT/TRANS,YAXIS,LIN14
                  ALIGNMENT/END
                  MODE/DCC
                  V1 =LOOP/START,ID=YES,NUMBER=3,START=1,SKIP=,
                  OFFSET:XAXIS=2,YAXIS=0,ZAXIS=0,ANGLE=0
                  A2=ALIGNMENT/START,RECALL: RECALL ACTIVE ALIGNMENT,LIST=YES
                  PLN3 =FEAT/PLANE,CARTESIAN,TRIANGLE
                  THEO/<0.5774,1.1747,0>,<0,0,1>
                  ACTL/<0.5774,1.1747,-0.0025>,<-0.0004137,-0.000231,0.9999999>
                  MEAS/PLANE,4
                  HIT/BASIC,NORMAL,<0.8718,1.8356,0>,<0,0,1>,<0.8719,1.8 355,-0.0021>,USE THEO=YES
                  HIT/BASIC,NORMAL,<0.926,0.6539,0>,<0,0,1>,<0.926,0.653 9,-0.0026>,USE THEO=YES
                  HIT/BASIC,NORMAL,<0.2628,0.6566,0>,<0,0,1>,<0.2627,0.6 566,-0.0026>,USE THEO=YES
                  HIT/BASIC,NORMAL,<0.249,1.5528,0>,<0,0,1>,<0.2491,1.55 27,-0.0027>,USE THEO=YES
                  ENDMEAS/
                  PLN4 =FEAT/PLANE,CARTESIAN,TRIANGLE
                  THEO/<0,0.38,0.0083>,<-1,0,0>
                  ACTL/<0.0009,0.3799,0.0082>,<-0.9999999,0.0003435,0.0003419>
                  MEAS/PLANE,4
                  MOVE/POINT,NORMAL,PART,<0.1872,1.3435,0.6227>
                  MOVE/POINT,NORMAL,PART,<-0.0368,0.5564,0.7590>
                  HIT/BASIC,NORMAL,<0,0.2592,0.1201>,<-1,0,0>,<0.0009,0.2591,0.12>,USE THEO=YES
                  HIT/BASIC,NORMAL,<0,0.4939,0.1104>,<-1,0,0>,<0.001,0.4938,0.1102>,USE THEO=YES
                  HIT/BASIC,NORMAL,<0,0.5148,-0.1088>,<-1,0,0>,<0.0009,0.5148,-0.109>,USE THEO=YES
                  HIT/BASIC,NORMAL,<0,0.252,-0.0886>,<-1,0,0>,<0.0008,0.2519,-0.0886>,USE THEO=YES
                  ENDMEAS/
                  A3=ALIGNMENT/START,RECALL: RECALL ACTIVE ALIGNMENT,LIST=YES
                  ANY OTHER ALIGNMENT BETWEEN THIS SNIP AND THE "blah blah" MUST RECALL ACTIVE ALIGNMENT.

                  blah blah

                  A4=ALIGNMENT/START,RECALL: RECALL ACTIVE ALIGNMENT,LIST=YES
                  (recall exact same alignment as A1)

                  ALIGNMENT/LEVEL,ZPLUS,PLN5
                  ALIGNMENT/ROTATE,XMINUS,TO,PLN6,ABOUT,ZPLUS
                  ALIGNMENT/TRANS,ZAXIS,PLN5
                  ALIGNMENT/TRANS,XAXIS,PLN6
                  ALIGNMENT/TRANS,YAXIS,LIN14
                  ALIGNMENT/END

                  loop/end

                  Comment


                  • #13
                    Originally posted by louisd View Post
                    arock, since you are not posting all the code, we aren't able to lock down a definitive answer for you.

                    Barney mode of post #8:

                    A1=ALIGNMENT/START,RECALL:STARTUP RECALL ACTIVE ALIGNMENT,LIST=YES
                    ALIGNMENT/LEVEL,ZPLUS,PLN5
                    ALIGNMENT/ROTATE,XMINUS,TO,PLN6,ABOUT,ZPLUS
                    ALIGNMENT/TRANS,ZAXIS,PLN5
                    ALIGNMENT/TRANS,XAXIS,PLN6
                    ALIGNMENT/TRANS,YAXIS,LIN14
                    ALIGNMENT/END
                    MODE/DCC
                    V1 =LOOP/START,ID=YES,NUMBER=3,START=1,SKIP=,
                    OFFSET:XAXIS=2,YAXIS=0,ZAXIS=0,ANGLE=0
                    A2=ALIGNMENT/START,RECALL: RECALL ACTIVE ALIGNMENT,LIST=YES
                    PLN3 =FEAT/PLANE,CARTESIAN,TRIANGLE
                    THEO/<0.5774,1.1747,0>,<0,0,1>
                    ACTL/<0.5774,1.1747,-0.0025>,<-0.0004137,-0.000231,0.9999999>
                    MEAS/PLANE,4
                    HIT/BASIC,NORMAL,<0.8718,1.8356,0>,<0,0,1>,<0.8719,1.8 355,-0.0021>,USE THEO=YES
                    HIT/BASIC,NORMAL,<0.926,0.6539,0>,<0,0,1>,<0.926,0.653 9,-0.0026>,USE THEO=YES
                    HIT/BASIC,NORMAL,<0.2628,0.6566,0>,<0,0,1>,<0.2627,0.6 566,-0.0026>,USE THEO=YES
                    HIT/BASIC,NORMAL,<0.249,1.5528,0>,<0,0,1>,<0.2491,1.55 27,-0.0027>,USE THEO=YES
                    ENDMEAS/
                    PLN4 =FEAT/PLANE,CARTESIAN,TRIANGLE
                    THEO/<0,0.38,0.0083>,<-1,0,0>
                    ACTL/<0.0009,0.3799,0.0082>,<-0.9999999,0.0003435,0.0003419>
                    MEAS/PLANE,4
                    MOVE/POINT,NORMAL,PART,<0.1872,1.3435,0.6227>
                    MOVE/POINT,NORMAL,PART,<-0.0368,0.5564,0.7590>
                    HIT/BASIC,NORMAL,<0,0.2592,0.1201>,<-1,0,0>,<0.0009,0.2591,0.12>,USE THEO=YES
                    HIT/BASIC,NORMAL,<0,0.4939,0.1104>,<-1,0,0>,<0.001,0.4938,0.1102>,USE THEO=YES
                    HIT/BASIC,NORMAL,<0,0.5148,-0.1088>,<-1,0,0>,<0.0009,0.5148,-0.109>,USE THEO=YES
                    HIT/BASIC,NORMAL,<0,0.252,-0.0886>,<-1,0,0>,<0.0008,0.2519,-0.0886>,USE THEO=YES
                    ENDMEAS/
                    A3=ALIGNMENT/START,RECALL: RECALL ACTIVE ALIGNMENT,LIST=YES
                    ANY OTHER ALIGNMENT BETWEEN THIS SNIP AND THE "blah blah" MUST RECALL ACTIVE ALIGNMENT.

                    blah blah

                    A4=ALIGNMENT/START,RECALL: RECALL ACTIVE ALIGNMENT,LIST=YES
                    (recall exact same alignment as A1)
                    ]ALIGNMENT/LEVEL,ZPLUS,PLN5
                    ALIGNMENT/ROTATE,XMINUS,TO,PLN6,ABOUT,ZPLUS
                    ALIGNMENT/TRANS,ZAXIS,PLN5
                    ALIGNMENT/TRANS,XAXIS,PLN6
                    ALIGNMENT/TRANS,YAXIS,LIN14 <<<<<<<<<<<<<<<This alignment isn't necessary it doesn't do anything.
                    ALIGNMENT/END

                    loop/end
                    That doesn't carry back to the beginning of the loop. Once the program reaches LOOP/END. It's starts over makes the move in the X direction, it doesn't carry it back
                    Last edited by KIRBSTER269; 06-14-2018, 04:23 PM.
                    (In Memory of my Loving wife, "Ronda" who I lost March 7, 2016. I love you baby.)
                    They say "Nobody's Perfect." I must be Nobody.

                    Comment


                    • #14
                      Code:
                      V1 =LOOP/START,ID=YES,NUMBER=C1.INPUT,START=1,SKIP=,
                      OFFSET:XAXIS=-0.75,YAXIS=76,ZAXIS=0,ANGLE=0
                      CHECK/3,1
                      STATS/ON,DATAPAGE+,,OFFLINE=YES
                      RECORD=DIMENSION,TRACE,FCF PROFILE,
                      ASSIGN/STARTTIME=INT(SYSTEMTIME("HH")*3600)+INT(SYSTEMTIM E("mm")*60)+INT(SYSTEMTIME("ss"))
                      A3 =ALIGNMENT/START,RECALL:USE_ACTIVE_ALIGNMENT(A2),LIST=YES <<< The only time you have to use active alignment pulling something from outside the loop
                      ALIGNMENT/LEVEL,ZPLUS,PLN1
                      ALIGNMENT/ROTATE,YPLUS,TO,LIN2,ABOUT,ZPLUS
                      ALIGNMENT/TRANS,ZAXIS,PLN1
                      ALIGNMENT/TRANS,YAXIS,LIN1
                      ALIGNMENT/TRANS,XAXIS,LIN2
                      ALIGNMENT/END
                      
                      ********************************
                      
                      Program
                      
                      4 =ALIGNMENT/START,RECALL:A3,LIST=YES <<<<<<<<<<<<<normal inside the loop
                      ALIGNMENT/LEVEL,XMINUS,DATUM_A
                      ALIGNMENT/TRANS,XAXIS,DATUM_A
                      ALIGNMENT/END
                      
                      *********************************
                      
                      LOOP/END
                      You need to re-establish each part at the beginning of your program, move X,Y,and Z then continue from there. There not perfectly 2 inches away from each other.
                      Last edited by KIRBSTER269; 06-14-2018, 04:55 PM.
                      (In Memory of my Loving wife, "Ronda" who I lost March 7, 2016. I love you baby.)
                      They say "Nobody's Perfect." I must be Nobody.

                      Comment


                      • #15
                        so I got it to loop for second part but how would I loop for a third ... the x distance is that incremental distance from part two or straight distance from first align I assume straight distance due to recall of startup align? I will post my code for what I think is what to do.

                        Comment


                        • louisd
                          louisd commented
                          Editing a comment
                          V1 =LOOP/START,ID=YES,NUMBER=3,START=1,SKIP=,
                          OFFSET:XAXIS=2,YAXIS=0,ZAXIS=0,ANGLE=0

                          this means I want to run 3 parts, which are relatively equal-spaced on a grid style fixture, with a pattern that makes the parts 2" apart from each other (only on the X axis)

                          if you want the routine to be more robust/adaptable to the "relatively equal spacing" set your prehit and retract values to a super high amount like .25" and take a couple hits to "find the part" (align to them) before measuring any actual features.
                      Working...
                      X