hexagon logo

Looping With A Twist

My boss unilaterally designed this fixture … for 13 pc sample. Parts are aprox 4.3X4.3 inch.
My plan – start by selecting 1 or 6 parts. Read point on first part. Start loop with offsets and 180° rotation. At end of loop X and Y offsets are updated in a case statement using a counter initialized before the loop and incremented at end of loop.
Then a rough DCC align with BIG prehit/retract (did I mention there is a lot of slop in this fixture?). Followed by 2 full DCC alignments to lock everything up.
Now probe, dimension and report. Report consists of PDF automatically saved (with option to print), CSV file and DataPage+ (if I ever get it set up).
Finally the case statement, update counter and loop/end.
I like it – the demon don’t.
Seems to be an offset problem. Run offline, rotation seems fine but X/Y translation is not as expected. Online is the same?
Am going to play with it more and can post code later. Does anyone see obvious error in my logic?

Attached Files
  • I try avoid offsets in loops, instead try recalling external alignments based on loop number - seems to work much better in terms of keeping CAD and move points in sync with the rest of the program.
  • If your gonna run that many parts. I would highly suggest putting a print command at the end, so you can delete instances. I was informed PC-DMIS has a small buffer. To much and your program will most likely crash during or at the end of the program.


    Yes Sir you are correct!

    Program starts with a script to create folders and sub folders (Accept, Reject, CSV folder, etc...). 2 print commands inside the loop one if part is good (Accept folder) other if part is bad (Reject folder).

    The most Ive managed to run in a single loop is 36pcs and I'm yet to encounter any issues. Thanks, for the heads up I'll be on the look for any errors/crashes. I did come across issues with TruPos dimensions but found a solution.
  • I have a 50 piece program, 3 on one side and 2 on the other, which is looped 10 times. I have not experienced problems.

    As for OP, are the pivot points the same? Rotating in a loop, offsets and pivots need to be spot on. Maybe an option would be to program a loop with one rotation then program another loop with the rotated parts.
  • edit: 14pc program


    This is the only loop that does it all for me you see it only takes care of the rotation...
    V1         =LOOP/START,ID=YES,NUMBER=14,START=1,SKIP=,
                  OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=180


    Offset located at the end of the program. It drives the probe to the next origin or pivot point followed by a read point alignment. This will later be converted to a Select...Case Statement instead of IF's/ELSE IF's

    IF/COUNTER==0 OR COUNTER==2 OR COUNTER==4
                    MOVE/INCREMENT,<2.955,0,0>
                    MOVE/INCREMENT,<0,0,-0.25>
                  END_IF/
                  IF/COUNTER==1 OR COUNTER==3 OR COUNTER==5
                    MOVE/INCREMENT,<2.565,0,0>
                    MOVE/INCREMENT,<0,0,-0.25>
                  END_IF/
                  ELSE_IF/COUNTER==6
                    MOVE/INCREMENT,<0,6.9,0>
                    MOVE/INCREMENT,<0,0,-0.25>
                  END_ELSEIF/
                  ELSE_IF/COUNTER==7 OR COUNTER==9 OR COUNTER==11
                    MOVE/INCREMENT,<-2.955,0,0>
                    MOVE/INCREMENT,<0,0,-0.25>
                  END_ELSEIF/
                  ELSE_IF/COUNTER==8 OR COUNTER==10 OR COUNTER==12
                    MOVE/INCREMENT,<-2.565,0,0>
                    MOVE/INCREMENT,<0,0,-0.25>
                  END_ELSEIF/
                  ELSE_IF/COUNTER==13
                    MOVE/INCREMENT,<0,0,1>
                  END_ELSEIF/

    and so on........
  • haha. That program only runs once every couple of weeks. Each part only takes about 1.5 minutes, so the program takes about 1 hour and 15 minutes. AND...I don't run the program. The machine operator comes in and does it.
  • "I did come across issues with TruPos dimensions but found a solution"

    What is the solution? I have the same issue, but I can not find the solution.
  • I have to dig up my notes to be exact. From memory: I used GETSETTING("NUMOOT") to determine report output location, NUMOOT was stacking up from previous loop iterations and causing false red flags. And there were some other things too that I can't remember right now, I'll take a look at the program. What are you experiencing?

    Update: First issue. Wasn't calculating bonus tolerance correctly for a perpendicularity call out causing GETSETTING("NUMOOT") = 1 which is false.