hexagon logo

Looping alignments

Im currently writing a program to inspect 4 parts on a fixture. Im looking for some help with creating a loop that has multiple alignments to reference to, but only loops 1 measurement routine (hole locations, planes, etc) and updates those theoretical locations based on which part is being measured. I have a input comment to the operator to say how many parts are being inspected, and made an assignment to that value. That value is then driving how many times the loop will cycle through. I just cant figure out how to make different alignments active, and update the features theoretical values.
  • When you do a Loopty-Loop you need an alignment inside the loop that will change with the next part, so in other words,

    Manual Alignment

    DCC/MODE

    LOOP Start Moving in X or Y Direction

    DCC Alignment

    Program

    (Maybe a Print Command)

    LOOP/END
  • when you do a loopty-loop you need an alignment inside the loop that will change with the next part, so in other words,

    manual alignment

    dcc/mode

    loop start moving in x or y direction

    dcc alignment

    program

    (maybe a print command)

    loop/end


    ^^^ this!
  • Im not very far along in trying to get this to work... Disregard the last circle, as i was going to attempt to get that circle to loop to the 4 parts after i define the 4 separate alignments. Aside from that - hopefully the code is helpful, see below:

    C2 =COMMENT/INPUT,NO,FULL SCREEN=NO,
    How many parts will be inspected? (Populate stations 1, 2, 3, and 4 in ascending order)
    ASSIGN/V1=C2.INPUT
    MODE/DCC
    MOVE/POINT,NORMAL,<0,0,10>
    TIP/TIP5, SHANKIJK=0, 1, 0, ANGLE=0
    STATION 1 A DATUM=FEAT/CONTACT/PLANE/DEFAULT,CARTESIAN,NONE,LEAST_SQR
    THEO/<-2.8309,-1.4295,3.1196>,<0,1,0>
    ACTL/<-2.8309,-1.4492,3.1195>,<-0.0005285,0.9999991,0.0012164>
    TARG/<-2.8309,-1.4295,3.1196>,<0,1,0>
    ANGLE VEC=<-1,0,0>,SQUARE
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=YES
    NUMHITS=4,NUMROWS=5
    SPACER=0
    AVOIDANCE MOVE=BOTH,DISTANCE BEFORE=0.3937,DISTANCE AFTER=0.3937
    USE BOUNDARY OFFSET=YES,OFFSET=0.0625
    SHOW HITS=NO
    TIP/TIP2, SHANKIJK=-1, 0, 0, ANGLE=0
    MOVE/POINT,NORMAL,<-3.5,0,4>
    MOVE/POINT,NORMAL,<-3.5,-1.75,4>
    STATION 1 C DATUM LEFT=GROUP/SHOWALLPARAMS=NO
    ENDGROUP/ID=STATION 1 C DATUM LEFT
    STATION 1 C DATUM LEFT PLANE=FEAT/PLANE,CARTESIAN,TRIANGLE,NO,LEAST_SQR
    THEO/<-2.475,-1.8713,2.8962>,<-1,0,0>
    ACTL/<-2.4698,-1.8712,2.8961>,<-0.9999984,-0.0016009,0.0008006>
    CONSTR/PLANE,BFRE,PNT2,PNT3,PNT4,PNT5,PNT6,PNT7,PNT8,PNT9,PNT10,PNT11,PNT12,PNT13,PNT14,,
    OUTLIER_REMOVAL/OFF,3
    FILTER/OFF,WAVELENGTH=0
    MOVE/POINT,NORMAL,<-2.875,-2.125,4.625>
    TIP/TIP4, SHANKIJK=1, 0, 0, ANGLE=0
    MOVE/POINT,NORMAL,<-1.25,-2.125,4.625>
    STATION 1 C DATUM RIGHT=GROUP/SHOWALLPARAMS=NO
    ENDGROUP/ID=STATION 1 C DATUM RIGHT
    STATION 1 C DATUM RIGHT PLANE=FEAT/PLANE,CARTESIAN,TRIANGLE,NO,LEAST_SQR
    THEO/<-1.585,-1.8198,2.9006>,<1,0,0>
    ACTL/<-1.5803,-1.8199,2.9006>,<0.9999982,0.001846,-0.0004031>
    CONSTR/PLANE,BFRE,PNT15,PNT16,PNT17,PNT18,PNT19,PNT20,PNT21,PNT22,PNT23,PNT24,PNT25,PNT26,PNT27,,
    OUTLIER_REMOVAL/OFF,3
    FILTER/OFF,WAVELENGTH=0
    STATION 1 C DATUM=FEAT/PLANE,CARTESIAN,TRIANGLE,NO
    THEO/<-2.03,-1.8456,2.8984>,<-1,0,0>
    ACTL/<-2.025,-1.8456,2.8984>,<-0.9999983,-0.0017235,0.0006019>
    CONSTR/PLANE,MID,STATION 1 C DATUM LEFT PLANE,STATION 1 C DATUM RIGHT PLANE
    MOVE/INCREMENT,<0,0,3.5>
    TIP/TIP1, SHANKIJK=0, 0, 1, ANGLE=0
    STATION 1 B DATUM=GROUP/SHOWALLPARAMS=NO
    ENDGROUP/ID=STATION 1 B DATUM
    STATION 1 B DATUM PLANE=FEAT/PLANE,CARTESIAN,TRIANGLE,NO,LEAST_SQR
    THEO/<-2.0306,-1.5393,4.345>,<0,0,1>
    ACTL/<-2.0306,-1.5392,4.3538>,<0.0010918,-0.0019127,0.9999976>
    CONSTR/PLANE,BFRE,PNT28,PNT29,PNT30,PNT31,PNT32,PNT33,,
    OUTLIER_REMOVAL/OFF,3
    FILTER/OFF,WAVELENGTH=0
    DATDEF/S1A,FEATURES=STATION 1 A DATUM,,
    DATDEF/S1B,FEATURES=STATION 1 B DATUM PLANE,,
    DATDEF/S1C,FEATURES=STATION 1 C DATUM,,
    STATION 1 ALIGNMENT=ALIGNMENT/START,RECALL:STARTUP,LIST=YES
    ALIGNMENT/LEVEL,YPLUS,STATION 1 A DATUM
    ALIGNMENT/TRANS,YAXIS,STATION 1 A DATUM
    ALIGNMENT/ROTATE,ZPLUS,TO,STATION 1 B DATUM PLANE,ABOUT,YPLUS
    ALIGNMENT/TRANS,ZAXIS,STATION 1 B DATUM PLANE
    ALIGNMENT/TRANS,XAXIS,STATION 1 C DATUM
    ALIGNMENT/END
    V2 =LOOP/START,ID=YES,NUMBER=V1,START=1,SKIP=,
    OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=0
    TIP/TIP5, SHANKIJK=0.0005, 1, -0.0012, ANGLE=-0.0628
    MOVE/INCREMENT,<0,1.5,0>
    CIR1 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
    THEO/<-0.87,0,-0.325>,<0,1,0>,0.221
    ACTL/<-0.8697,0,-0.3249>,<0,1,0>,0.2212
    TARG/<-0.87,0,-0.325>,<0,1,0>
    START ANG=0,END ANG=0
    ANGLE VEC=<-1,0,0>
    DIRECTION=CCW
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=YES
    NUMHITS=5,DEPTH=-0.04,PITCH=0
    SAMPLE METHOD=SAMPLE_HITS
    SAMPLE HITS=0,SPACER=0
    AVOIDANCE MOVE=BOTH,DISTANCE BEFORE=0.3937,DISTANCE AFTER=0.3937
    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
    SHOW HITS=NO
    LOOP/END

    The 4 parts dont move the same distance each time the loop needs to repeat. Currently the fixture layout would start at the first parts alignment, then the next alignment (part 2) coordinate deviation would be x 0, y 4.75, z 0. Then after that, the 3rd part alignment would go from the 2nd part to x 4.06, y 0, z zero. 4th part alignment would go from part 3 x 0, y -4.75, z 0. Hope all that gibberish makes a little sense

    Thank you for the reply.
  • Wow what a mess, Well you don't have your loop going in any directions after I finally found it in that hot Mess. Do as I showed above I will pull up some ol thread that you can look at.


  • Comments on your code:

    1) Do you have a manual alignment?
    2) In a loop, if you want the part to switch to the next part in a different location, you need to put your offsets in the X Y Z areas of the loop code
    3) With the offsets you have, it's doable but probably not the best method

    I think this method better for looping, see Josh's post: https://www.pcdmisforum.com/forum/pc...pping-stations

    4) Don't put spaces, special characters, or hyphens in your naming convention. Can create issues.

  • C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
    How Many Parts Do You Want To Run?

    A1 =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
    ALIGNMENT/LEVEL,ZPLUS,PLN1
    ALIGNMENT/ROTATE,XPLUS,TO,LIN1,ABOUT,ZPLUS <<<<<<<<<<<manual alignment
    ALIGNMENT/TRANS,ZAXIS,PLN1
    ALIGNMENT/TRANS,YAXIS,LIN1
    ALIGNMENT/TRANS,XAXIS,PNT1
    ALIGNMENT/END

    V1 =LOOP/START,ID=YES,NUMBER= C1.INPUT,START=1,SKIP=, <<<<<<<<<<<<<<You can simply put C1.input in the number spot instead of assigning it to a variable
    OFFSET:XAXIS= 0,YAXIS= 4.75,ZAXIS= 0,ANGLE=0 <<<<<<<<<<<<<You need to offset it in some direction You said Y


    PLN2
    LIN2 <<<<<<<<<<<<<<Maybe auto features or something
    PNT2

    A2 =ALIGNMENT/START,RECALL: (USE_ACTIVE_ALIGNMENT),LIST=YES
    ALIGNMENT/LEVEL,ZPLUS,PLN2
    ALIGNMENT/ROTATE,XPLUS,TO,LIN2,ABOUT,ZPLUS <<<<<<<<<<<DCC alignment
    ALIGNMENT/TRANS,ZAXIS,PLN2
    ALIGNMENT/TRANS,YAXIS,LIN2
    ALIGNMENT/TRANS,XAXIS,PNT2
    ALIGNMENT/END



    ************************************************

    Program

    ************************************************

    LOOP/END
  • I have a fixture that has a center alignment hole, where the operator jogs the probe to it and creates a read point. Read point is made into a manual alignment. after that, DCC mode is activated and the features for the first parts alignment is measured.

    Seems like theres a lot of good info in that post - ill be sure to read up on it and give it a shot. Thank you for the feedback!