hexagon logo

Using external alignment to run multiple parts instead of looping.

I'm really close to ditching any attempt to use looping in my program to try and run multiple parts on my CMM table (I would like to run maybe 6 max). I'm trying to use 1 probe to inspect all the parts features (measuring on part, then going down in -Y 11.5" and doing the same measurement, go down in -Y again etc), then change probes, and measure all parts the same way (measuring all necessary features of one part, and then going down 11.5 inches in Y). The alignment keeps changing on me from the first part to the second...and when I post the data, 1 part will have the alignment from the second part. So, everything will dimensionally be okay, but because the origin is shifted down in Y by 11.5 inches, everything is screwed up on the total positioning (even though I know these parts will pass). How can I save one alignment/ do an external alignment, and then just shift it down 11.5 inches? I am sick of using looping, I feel like looping is really only for like bolt hole patterns, and waffle grid patterns in holes. Measuring whole parts in different locations is giving me a nightmare. It's something about the tool change and multiple parts. Because the second part doesn't get it's own alignment (like if your DCC alignment was A3, the second part should get A3-2 or something like that, but no. It just drives off the first parts alignment. I need multiple alignments just like the first part, just in different locations. I'll post the code just for giggles.
STARTUP =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES
ALIGNMENT/END
MODE/MANUAL
FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,OUTTOL, ,
LOADPROBE/4MM X 20MM
TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0
PLN1 =FEAT/PLANE,CARTESIAN,TRIANGLE
THEO/<3.4829,-0.1456,0>,<0,0,1>
ACTL/<12.1376,32.7697,-26.1905>,<0.0005222,-0.0003643,0.9999998>
MEAS/PLANE,3
HIT/BASIC,NORMAL,<1.9889,-0.5175,0>,<0,0,1>,<10.5594,32.265,-26.1899>,USE THEO=YES
HIT/BASIC,NORMAL,<4.0258,0.8213,0>,<0,0,1>,<12.1295,33 .9516,-26.1901>,USE THEO=YES
HIT/BASIC,NORMAL,<4.434,-0.7405,0>,<0,0,1>,<13.7238,32.0923,-26.1916>,USE THEO=YES
ENDMEAS/
LIN1 =FEAT/LINE,CARTESIAN,UNBOUNDED
THEO/<-2.1728,-2.295,-0.6305>,<1,0,0>
ACTL/<6.7011,30.8644,-26.6467>,<1,-0.0003111,0>
MEAS/LINE,2,ZPLUS
HIT/BASIC,NORMAL,<-2.1728,-2.295,-0.629>,<0,-1,0>,<6.7011,30.8644,-26.6468>,USE THEO=YES
HIT/BASIC,NORMAL,<6.84,-2.295,-0.632>,<0,-1,0>,<15.6711,30.8616,-26.6467>,USE THEO=YES
ENDMEAS/
PNT1 =FEAT/POINT,CARTESIAN
THEO/<-2.275,0.0718,-0.3763>,<-1,0,0>
ACTL/<6.3863,31.8955,-26.567>,<-0.9999996,-0.0009195,0>
MEAS/POINT,1,WORKPLANE
HIT/BASIC,NORMAL,<-2.275,0.0718,-0.3763>,<-1,0,0>,<6.3863,31.8955,-26.567>,USE THEO=YES
ENDMEAS/
A1 =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
ALIGNMENT/LEVEL,ZPLUS,PLN1
ALIGNMENT/TRANS,ZAXIS,PLN1
ALIGNMENT/ROTATE,XPLUS,TO,LIN1,ABOUT,ZPLUS
ALIGNMENT/TRANS,YAXIS,LIN1
ALIGNMENT/TRANS,XAXIS,PNT1
ALIGNMENT/END
MODE/DCC
FLY/ON
MOVESPEED/ 250
MOVE/POINT,NORMAL,<4.5328,1.9318,1.0961>
PLN2 =FEAT/PLANE,CARTESIAN,TRIANGLE
THEO/<5.7549,2.0759,0>,<0,0,1>
ACTL/<5.755,2.0756,-0.0033>,<0.0000146,-0.0000177,1>
MEAS/PLANE,3
MOVE/POINT,NORMAL,<7.0084,1.6156,0.8147>
(CODE CUT TO FIT, JUST MOVE POINTS)
HIT/BASIC,NORMAL,<4.2265,1.4394,0>,<0,0,1>,<4.2264,1.4 389,-0.0033>,USE THEO=YES
HIT/BASIC,NORMAL,<6.0296,3.0913,0>,<0,0,1>,<6.0298,3.0 911,-0.0033>,USE THEO=YES
HIT/BASIC,NORMAL,<7.0084,1.6972,0>,<0,0,1>,<7.0086,1.6 967,-0.0033>,USE THEO=YES
ENDMEAS/
MOVE/POINT,NORMAL,<6.9272,2.3614,1.4628>
MOVE/POINT,NORMAL,<6.8272,-0.616,0.8246>
MOVE/POINT,NORMAL,<0.1955,-0.616,1.1066>
MOVE/POINT,NORMAL,<0.1955,-0.3262,-0.6042>
LIN2 =FEAT/LINE,CARTESIAN,UNBOUNDED
THEO/<0.2769,0,-0.6506>,<1,0,0>
ACTL/<0.2769,0.0045,-0.6505>,<1,-0.0000029,0>
MEAS/LINE,2,ZPLUS
HIT/BASIC,NORMAL,<0.2769,0,-0.6573>,<0,-1,0>,<0.2769,0.0045,-0.6573>,USE THEO=YES
HIT/BASIC,NORMAL,<8.968,0,-0.6438>,<0,-1,0>,<8.9682,0.0045,-0.6437>,USE THEO=YES
ENDMEAS/
MOVE/POINT,NORMAL,<8.968,-0.4155,1.3796>
MOVE/POINT,NORMAL,<-0.591,-0.4155,1.5577>
MOVE/POINT,NORMAL,<-0.6887,-0.4155,-0.3356>
PNT2 =FEAT/POINT,CARTESIAN
THEO/<0,2.1944,-0.3618>,<-1,0,0>
ACTL/<0.0011,2.1942,-0.3618>,<-1,0,0>
MEAS/POINT,1,WORKPLANE
HIT/BASIC,NORMAL,<0,2.1944,-0.3618>,<-1,0,0>,<0.0011,2.1942,-0.3618>,USE THEO=YES
ENDMEAS/
MOVE/POINT,NORMAL,<-0.4913,2.1944,1.5459>
A2 =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
ALIGNMENT/LEVEL,ZPLUS,PLN2
ALIGNMENT/TRANS,ZAXIS,PLN2
ALIGNMENT/ROTATE,XPLUS,TO,LIN2,ABOUT,ZPLUS
ALIGNMENT/TRANS,YAXIS,LIN2
ALIGNMENT/TRANS,XAXIS,PNT2
ALIGNMENT/END
V1 =LOOP/START,ID=YES,NUMBER=2,START=1,SKIP=,
OFFSET:XAXIS=0,YAXIS=-11.5,ZAXIS=0,ANGLE=0
MOVE/POINT,NORMAL,<3.9146,2.1944,2.4398>
PLN3-DATUM A =FEAT/PLANE,CARTESIAN,TRIANGLE
THEO/<5.9086,2.2725,0>,<0,0,1>
ACTL/<5.9087,2.2722,0.0033>,<0.0004246,-0.0001787,0.9999999>
MEAS/PLANE,7
HIT/BASIC,NORMAL,<4.3281,3.3546,0>,<0,0,1>,<4.3283,3.3 544,0.0044>,USE THEO=YES
HIT/BASIC,NORMAL,<4.0306,1.4526,0>,<0,0,1>,<4.0305,1.4 522,0.0041>,USE THEO=YES
HIT/BASIC,NORMAL,<5.7436,3.0695,0>,<0,0,1>,<5.7437,3.0 693,0.0031>,USE THEO=YES
HIT/BASIC,NORMAL,<5.8434,1.4538,0>,<0,0,1>,<5.8436,1.4 534,0.0029>,USE THEO=YES
HIT/BASIC,NORMAL,<7.2594,3.4126,0>,<0,0,1>,<7.2596,3.4 124,0.0031>,USE THEO=YES
HIT/BASIC,NORMAL,<6.8504,2.1411,0>,<0,0,1>,<6.8502,2.1 408,0.0029>,USE THEO=YES
HIT/BASIC,NORMAL,<7.3046,1.0234,0>,<0,0,1>,<7.3047,1.0 23,0.0027>,USE THEO=YES
ENDMEAS/
MOVE/POINT,NORMAL,<7.3046,0.3131,1.0796>
MOVE/POINT,NORMAL,<7.3046,-0.5902,-0.3132>
PLN4-DATUM B =FEAT/PLANE,CARTESIAN,TRIANGLE
THEO/<4.6859,0,-0.7652>,<0,-1,0>
ACTL/<4.6858,0.0045,-0.7651>,<0.0000139,-0.9999988,-0.0015266>
MEAS/PLANE,8
HIT/BASIC,NORMAL,<9.0292,0,-0.683>,<0,-1,0>,<9.0294,0.0044,-0.683>,USE THEO=YES
(CODE CUT TO FIT)
ENDMEAS/
MOVE/POINT,NORMAL,<0.1156,-0.5425,2.3897>
MOVE/POINT,NORMAL,<0.1156,4.8792,2.1768>
MOVE/POINT,NORMAL,<10.7453,4.8792,2.63>
MOVE/POINT,NORMAL,<10.7453,5.1562,-0.4423>
PLN5-BACKSIDE COMPARATIVE =FEAT/PLANE,CARTESIAN,TRIANGLE
THEO/<6.3431,4.59,-0.7871>,<0,1,0>
ACTL/<6.343,4.5968,-0.7869>,<-0.0000426,0.9999986,-0.0016886>
MEAS/PLANE,8
HIT/BASIC,NORMAL,<11.4177,4.59,-0.638>,<0,1,0>,<11.4179,4.5971,-0.6379>,USE THEO=YES
(CODE CUT TO FIT)
ENDMEAS/
MOVE/POINT,NORMAL,<0.1326,4.774,0.2651>
MOVE/POINT,NORMAL,<-0.331,4.774,0.0903>
PLN6-DATUM C =FEAT/PLANE,CARTESIAN,TRIANGLE
THEO/<0,2.3748,-0.5079>,<-1,0,0>
ACTL/<0.011,2.3744,-0.508>,<-0.9999993,0.0000425,0.0011476>
MEAS/PLANE,9
HIT/BASIC,NORMAL,<0,4.5184,-0.7714>,<-1,0,0>,<0.0103,4.518,-0.7715>,USE THEO=YES
(CODE CUT TO FIT/MEASURING A PLANE)
ENDMEAS/
MOVE/POINT,NORMAL,<-0.7644,0.0617,1.8962>
MOVE/POINT,NORMAL,<2.0946,0.0617,2.4491>
A3 =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
ALIGNMENT/LEVEL,ZPLUS,PLN3-DATUM A
ALIGNMENT/TRANS,ZAXIS,PLN3-DATUM A
ALIGNMENT/ROTATE,YMINUS,TO,PLN4-DATUM B,ABOUT,ZPLUS
ALIGNMENT/TRANS,YAXIS,PLN4-DATUM B
ALIGNMENT/TRANS,XAXIS,PLN6-DATUM C
ALIGNMENT/END
A4 =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
ALIGNMENT/LEVEL,ZPLUS,PLN3-DATUM A
ALIGNMENT/TRANS,ZAXIS,PLN3-DATUM A
ALIGNMENT/ROTATE,YMINUS,TO,PLN4-DATUM B,ABOUT,ZPLUS
ALIGNMENT/TRANS,YAXIS,PLN4-DATUM B
ALIGNMENT/TRANS,XAXIS,PLN6-DATUM C
ALIGNMENT/END
RECALL/ALIGNMENT,INTERNAL,A3
CIR1 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<2.27,13.795,0.4>,<0,0,1>,2.62
ACTL/<2.272,13.7962,0.3979>,<0,0,1>,2.6191
TARG/<2.27,13.795,0.4>,<0,0,1>
START ANG=0,END ANG=361.2
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=8,DEPTH=0.065,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=0
AVOIDANCE MOVE=BOTH,DISTANCE=1
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
CIR2 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<9.235,13.795,0.4>,<0,0,1>,2.62
ACTL/<9.235,13.7961,0.3979>,<0,0,1>,2.6192
TARG/<9.235,13.795,0.4>,<0,0,1>
START ANG=0,END ANG=360
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=8,DEPTH=0.065,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=0
AVOIDANCE MOVE=BOTH,DISTANCE=1
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
MOVE/INCREMENT,<0,0,2>
LOOP/END
MOVE/INCREMENT,<6,0,0>
MOVE/INCREMENT,<0,0,4>
MOVE/POINT,NORMAL,<15.241,-20.3018,9.4919>
LOADPROBE/SUXING PROBE 1MM X 40MM
TIP/T1A0B0, SHANKIJK=-0.0007, 0.0006, 1, ANGLE=0.0216
AUTOCALIBRATE/PROBE, PARAMETER_SET=SUXING PROBE 1MMx40MM 0-0, QUALTOOL_MOVED=NO,
CHECK COLLISION=NO, SHOW_SUMMARY=NO, OVERWRITE_RESULTSFILE=NO
MOVE/INCREMENT,<0,0,2>
TOUCHSPEED/ 1
MOVE/POINT,NORMAL,<0.9019,-1.9748,7.5298>
MOVE/POINT,NORMAL,<0.49,0.3912,3.3834>
MOVE/POINT,NORMAL,<6.9268,2.6651,2.9921>
V2 =LOOP/START,ID=YES,NUMBER=2,START=1,SKIP=,
OFFSET:XAXIS=0,YAXIS=-11.5,ZAXIS=0,ANGLE=0
CIR3 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<7.0004,14.8936,0>,<0,0,1>,0.1005
ACTL/<7.0016,14.8947,0>,<0,0,1>,0.1008
TARG/<7.0004,14.8936,0>,<0,0,1>
START ANG=0,END ANG=360
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=8,DEPTH=0.04,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=0
AVOIDANCE MOVE=BOTH,DISTANCE=1
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
CIR4 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<7.7076,14.8936,0>,<0,0,1>,0.1005
ACTL/<7.7077,14.8953,0>,<0,0,1>,0.1008
TARG/<7.7076,14.8936,0>,<0,0,1>
START ANG=0,END ANG=360
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=8,DEPTH=0.04,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=0
AVOIDANCE MOVE=BOTH,DISTANCE=1
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
CIR5 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<7.354,14.54,0>,<0,0,1>,0.283
ACTL/<7.355,14.5412,0>,<0,0,1>,0.2843
TARG/<7.354,14.54,0>,<0,0,1>
START ANG=0,END ANG=360
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=8,DEPTH=0.04,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=0
AVOIDANCE MOVE=BOTH,DISTANCE=1
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
CIR6 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<7.354,13.04,0>,<0,0,1>,0.283


(TRIMMED SOME CODE AT END)
Parents
  • I've seen your threads pop up but haven't really had time to chip in yet.

    Can I ask why exactly you want to do away with the probe change mid program?

    Unless the cycle time is really critical your just adding (imho) unnecessary complexity.


    That said, if you go want to do it, the best option would be to use either a while/end while our a do/until loop, using external alignments to recall the correct starting positions, however, as you'll be looping twice (once with the first probe and once with the second, you're also going to have to save any alignments you generate within the first loop to recall in the second loop.

    These will have to have a unique name i.e ALN_ABC_1, and ALN_ABC_2, you would do this by creating a counter for each loop..

    ASSIGN/V1=1

    then
    ASSIGN/ALN_NAME="ALN_ABC"+V1

    then save the alignment with ALN_NAME.

    You would then have to recall those using the same method within the second loop.


  • ahhh, just learned something invaluable!!! So...pc-dmis DOES automatically make the next alignment you add recall the previous one...but...I'm using auto align! Which for some odd reason calls up startup. I use auto-align almost exclusively on simple squarish parts....so..that's why the program sucks! (or at least part of the reason). If I do auto-alignment and recall the previous alignment and hit okay, it does work though. I thought PC-DMIS was gonna stroke out and blue screen me haha.
Reply
  • ahhh, just learned something invaluable!!! So...pc-dmis DOES automatically make the next alignment you add recall the previous one...but...I'm using auto align! Which for some odd reason calls up startup. I use auto-align almost exclusively on simple squarish parts....so..that's why the program sucks! (or at least part of the reason). If I do auto-alignment and recall the previous alignment and hit okay, it does work though. I thought PC-DMIS was gonna stroke out and blue screen me haha.
Children
No Data