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)
  • This isn't exactly what I was looking for at the moment because I want to try and get my problem worked out first completely and then tweak fully. But, I'm def going to try it! I'm really into readpoints too, because it has worked well for me in another program. All of these tips and tricks that I'm learning trying to solve my problem will only serve me to learn better skills later. Readpoints will help keep my program simple enough for other people in the shop to use the CMM if they absolutely have to if I'm gone. I intend to stay active in this community as much as I can or until I get kicked out because I really want to learn everything. Thank you sir!
  • Okay I just re-read your original post to this thread where you were trying to explain to me how to use while/end and do/until commands. I feel like this might be something I was trying to express but just didn't have enough experience to complete. 2 other users have also mentioned solutions that sounded like it was going to fix the problem with the loops in this situation: louisd and Hi-Tech Redneck. Like you mentioned, there are many ways to skin a cat. And I just want to know every way to skin them because it will come up in my job somehow. I have a fair amount of experience with programming BASIC like TI-83s and 89s, and feel like I've got a handle on alignments:manual/dcc alignments/readpoints/iterative and using the program. I apologize again for trying to run so fast before I walk, but the job is just like that. Also, I'm used to programming with a HAAS mill, and I used to do the CAD/CAM software before I switched to metrology. CAM is just so different because most cnc machines today you set the origin, usually put stock in your vices and the machine trims all the datums/around the part and you inspect it later. Having to home each part in is slightly weird to me in the order of sequences/logic. In CAM, making a tool do every hole and change is the easiest thing in the world: just load your tool, select all the holes and just do it.
  • I wrote the program exactly as you laid out, and ran into a few problems. I fixed one, but need to fix another. I made the mistake of not doing a tool change before the loop...LOL. Oopsie, I crashed a 1mm probe. :'( It wasn't that bad, I changed it out, re homed the machine and fixed my problem. (I would have gone home with a pants full of crap and prob wanting to cry 6 months ago) Then, I realized that I kept getting "Outof Tol Machine Parameter" warnings from PC-dmis. Well, it's because the program is looping and moving the alignment to the next part during the loop...that the movepoints in the program were also moving towards me, so when I told the machine to come towards me and the computer workstation (my comp is at the very bottom of Y-), it just errored out. Normally movepoints using the probes current position work, but it won't in this case. I'll just tell it to go to my sphere.
  • One more thing before I go to bed. I realize that much of my failure to comprehend what is being told to me is that I'm too used to translating my old knowledge of programming language or cad/cam use. I get more of the theory of what y'all are talking about compared to actually doing it in the program. For example, I understand the concept of loops, loop counters, offsets for x,y,z in coordinates, labels, subroutines, all that jazz. I've used it in different methods with BASIC or cad/cam, and I guess I'm trying to describe what I want without *knowing* how to do it in PC-Dmis. For me it's the little things of PC-DMIS that I wasn't taught, like each alignment needs to recall the last one. Or the Master/Main probe. The person that helps me in person every now and then from a friendly nearby company: he doesn't even use a Main/Master probe, and they are an aerospace company of around 25 people and inspects thousands of parts every year. So, I get this information from him, and he's helped me out a LOT (for real, many weekends), and then I read online what y'all are writing about which is way more complicated: and obviously it's working for you. And I'm not saying he's wrong either. I'm not trying to insult anybody here if that's what anybody thinks. I'm more or less trying to be a sponge lol. Absorb everyone's data. That's what I was complaining about before with conflicting/misinformation. I don't think I've read much misinformation here, I was talking more about with my friend and the probe loading: he told me that Hexagon said every time you do a probe change even with the magnetic holders that you had to cal after. Every time. So, I wasn't going to risk it being a noob, and I was happy finding a new "trick". But then I come on here and the information is very much different. Usually when you are getting the same results from multiple places (this forum) it's more accurate than the other sources.