hexagon logo

Questions about DCC Alignment and looping correct procedure

So, maybe this is a stupid question, or I'm thinking too much into it, idk. So, I'm still using that same program that I was tinkering with in my last post. I have 2 parts on the 2 table, and I am using 2 probes to inspect them both. Probe 1 inspects part 1, when it's finished it comes down in Y -11.5 inches, and then does the same exact routine on the second part. It goes up in Z+, changes probes, then inspects part 1 for smaller holes, goes up, then back down in Y -11.5 inches to catch the holes on the second part. My question is.... should the DCC part of the program be extended for the second probe as well? What I'm trying to say, is after the probe changes to start inspecting holes, do I need to do another DCC alignment on the first part again to make sure the comp isn't using the second parts variables? I haven't used looping at all so I'm worried that some of the data from part 1 will get screwed up or transposed onto part 2. Also, with looping, you just set the offsets in x,y, z, or rotate it or whatever you want to do.... Does it create another alignment for the second part?? It's own separate alignment? Or does the second part literally just drive off of the first parts coordinates, just shifting it down or over or whatever (which imo is SUPPPPPPPER risky) because all you are doing is just shifting the movements down without actually accounting for where the second part really is. You might be able to get away with that if you are using a perfect setup/ground pins, yadda yadda...but...??? I must be thinking too hard about this problem. But I really do want to know the *why* and what is under the hood of the machine, not just accepting "that's the way it is" just because. Thank you for your time!
Parents
  • Rather than dissect this let's go to the heart of your question. From there you can decide what you need to do to suit your needs.
    "Does it create another alignment for the second part?? It's own separate alignment?" No, not unless you tell it to
    " Or does the second part literally just drive off of the first parts coordinates, just shifting it down or over or whatever" Yes
Reply
  • Rather than dissect this let's go to the heart of your question. From there you can decide what you need to do to suit your needs.
    "Does it create another alignment for the second part?? It's own separate alignment?" No, not unless you tell it to
    " Or does the second part literally just drive off of the first parts coordinates, just shifting it down or over or whatever" Yes
Children
  • Okay! Thank you for helping me understand better! :-) So, my question is: is that not a potential for extremely bad readings/bad data? It is just shifting the Alignment, not taking a true alignment off of the second part. So, if I do it that way, I must always assume their will be error because of setup, correct? The program that I describe (am working on currently) does have 2 DCC alignments after the initial manual alignment. I put a loop in FRONT of the DCC alignments, so it does do the alignment on both parts (touching off plane, line point). I guess I'm confused/have another question. If I put the loop in front of the DCC alignments, would that not create a second alignment on the second part? Or do they still "share an alignment" even though it does the DCC sequence twice on each part? Now...when the program tell the machine to change probes after the first probe got done working on the second part...my question is, what shifts the alignment back from the second part to the first when it's time for the second probe to inspect the first part? Even though I'm using a machine with a gridded setup plate with holes every 1/2" and a precise setup, those 2 parts are still in different x and y coordinates and should have 2 different alignments. I'm getting strange results where I think the second probe might be getting some weird data.
  • Maybe I misunderstood earlier. Whatever code is inside the loop start and end command is what will be looped. If your DCC alignment is inside the loop then the DCC alignment will be performed when looped.
    Loop start
    dcc align part 1
    measure part one
    loop end
    offset 11.5" in Y
    repeat (alignment is performed on 2nd part)

    but if you...
    Alignment part 1
    loop start
    measure part 1
    loop end
    offset 11.5" in Y
    repeat (part 2 is working off part 1's alignment)
  • OMG THANK YOU!!! Yes, my program is using the first example you provided!!!!! def NOT the second. The loop is def before the DCC. The only problem I'm having is that later in the program when it does a probe change for the second probe....should I then go back to the first part and do another DCC with the second probe to establish that hey, we are going back to the first part with a new alignment? Or...do I just recall that alignment and it's as simple as that??? just recalling it should work....but then again how would i recall the second parts alignment since it doesn't 'create' another alignment, just offsets the first one?
  • Also....to expand on your original 2 examples that you just gave me...that first example (which I said is how my program is laid out)...in the second part when it goes to do the second parts alignment, where is the second parts alignment "stored"...like, where does the data go? it's def not called A2 or even A1 {2}, which I would have expected. The inability of me to recall the second parts alignment (or lack of knowledge how to) slightly worries me
  • I feel I'm getting more confused as we go. I went to your older post, the one with the code, but it didn't help a lot because I don't see where your loop ends. It looked like your tip change was inside the loop but if that's the case then what you've described in post one of this thread doesn't make sense to me.
    You say probe 1 aligns the part, measures the part then goes to part two and performs the same routine. If you're using the loop to get the offset then at the end of the second part how are you continuing the program? You change to tip 2 but then what? Is there another loop? And if so, I dunno how you would correlate them.
    The very few programs where I have used loops and nested loops and also required a tip change mid-program, I completed one part then looped that routine. In other words, I would:
    Loop/start
    Align
    measure
    loadprobe
    measure
    report
    loop/end
    At this point it would offset the amount stated in the loop command, move to the next part and do it all again.
    Sorry I'm no more help than I am. I honestly have two or three programs where I utilized loops.
  • , ok I'm super sorry for being overly confusing, I'll try to describe the part without talking too much because a lot of it really doesn't matter, this has something to do with loops or parameter settings or something I'm not thinking of. So, basically, this program that I've got hashed out came from a program where I was just running one part. I then wanted it to come down in Y -11.5 inches and identically inspect another part of the same part number. (the final program will have who-knows-how-many, I will have to just adapt to our situations at the time) It starts with a 4mmx20 probe, I do a basic manual alignment the first time I've opened this program from another part number. I then turn a loop on, start at 1, end at 2, shift down in y -11.5 inches. Then, I do 2 DCC alignments on the first part a rough one, then a finer one. Then, it's measuring time. I measure all the features of part 1 with the 4mm x 20 mm probe. It then does what I tell it to: go down in -Y by 11.5 inches and perform the exact routine it just did. Awesome, that works fine! After the second part is done, it goes up maybe 3 or 4 inches in Z+, goes over in X+ and then to me the operator so I can change probes to a 1MMx40MM probe that I have to use to measure super small holes (.100 in diameter, and I have to change probes out manually with the magnetic lock until we get a tool changer). The program then does an auto-cal probe routine that I have set up with some parameter settings to just probe one tip : A0,B0. It then, goes up and over to the first part again to do it's thing with the second probe, measuring small holes basically. After the first part, it goes up in Z a small amount, perhaps 1 or 2 inches, then goes down in Y- 11.5 inches once again. It inspects the second parts tiny holes, and then goes up, over in X+, and back to me so I can change it back to the original probe. At that time, I swap probes, and it does an automatic recalibration with the first probe. The reason for that is so if I want to take the two parts off the table and throw 2 new parts up there, all I have to do is just start it from the DCC point again. I hope this helps because I feel like I'm getting so close to a solution. This forum and you people really help out!!! Btw, the reason I'm asking all of this is because I'm getting the looping to work right....it's measuring the first part with probe 1, the second part with probe 1, doing a tool change and recalibration, then inspecting parts 1 and 2 with the second probe. Changing, recalibrating and ending.. Just find, there are no crashes. It's just that when I run one part by itself, the part is perfect, and when I put two up there, it's throwing some of my holes OT.... I can't write a program that is going to throw good parts out as OT. That's why I'm inquiring about the alignment changing because of looping or in general just the parameters.
  • .....I found some interesting information!!! So, the problem I've been having is that when I run this part in a program designed for 1 single part, it checks perfect, and the total positioning is really dead nuts on. My micro-hite agrees very much. But when I've been looping it trying to run 2 parts it keeps messing up. I'm new to looping (I've been using this forum to teach me basically from y'alls help and examples), so I just assumed it was something I was doing something wrong in looping. But these past 2 days every time I had a problem with the looping, just looking at it and moving the loop start or end up or down a few spaces in the proper order fixed the problem. So, I really don't think it can be the loop. The loop doesn't mess with data or actual numbers...then I started thinking about it and checked out the alignments... The first 2 alignments (the first manual alignment and the first DCC alignment) are aligned on the first part in the bottom left hand corner which is perfect...the Third alignment (the second, finer DCC alignment) is aligned in the bottom left hand corner of the SECOND PART!!!!!!!! somehow the alignment got moved to the second part, or I need to do another 3rd DCC alignment on the first part after the second part is done??