hexagon logo

True Position inside a Loop-2

I'm runing 2014.1 (Service Pack 4)
I set over a big magnet 30 parts in a equally spaced grid 25 mm X = 5 parts and Y = 6 parts (see loop code)
Problem: True position part # 1 measure 0,0. Part # 2 measure 50.0. Part # 3 measure 100 so on.
Can anyone help me to figure what i'm missing. Thanks
START        =LABEL/
VLOOP        =LOOP/START,ID=NO,NUMBER=5,START=1,SKIP=,
                OFFSET:XAXIS=25,YAXIS=0,ZAXIS=0,ANGLE=0
VLOOP          =LOOP/START,ID=NO,NUMBER=6,START=1,SKIP=,
                  OFFSET:XAXIS=0,YAXIS=25,ZAXIS=0,ANGLE=0
                  TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0
                  MODE/DCC
                  WORKPLANE/ZPLUS
                  CLEARP/ZPLUS,20,ZPLUS,0,ON
                  MOVE/CLEARPLANE
CIRC_5.9         =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
                  THEO/<0,0,-5.7>,<0,0,1>,5.9,0
                  ACTL/<0.089,-0.079,-5.7>,<0,0,1>,5.873,0
                  TARG/<0,0,-5.7>,<0,0,1>
                  START ANG=0,END ANG=360
                  ANGLE VEC=<1,0,0>
                  DIRECTION=CCW
                  SHOW FEATURE PARAMETERS=NO
                  SHOW CONTACT PARAMETERS=NO
ALIGN2           =ALIGNMENT/START,RECALL:READPOINT_ALIGN,LIST=YES
                    ALIGNMENT/TRANS,XAXIS,CIRC_5.9
                    ALIGNMENT/TRANS,YAXIS,CIRC_5.9
                  ALIGNMENT/END
                  MOVE/CLEARPLANE
POINT_3          =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
                  THEO/<4.1,-25,-11.5>,<0,0,1>
                  ACTL/<4.1,-25,-12.623>,<0,0,1>
                  TARG/<4.1,-25,-11.5>,<0,0,1>
                  SNAP=NO
                  SHOW FEATURE PARAMETERS=NO
                  SHOW CONTACT PARAMETERS=NO
PLANE-A-         =FEAT/CONTACT/PLANE/DEFAULT,CARTESIAN,OUTLINE
                  THEO/<0,-25,-11.5>,<0,0,1>
                  ACTL/<0.001,-24.996,-12.633>,<-0.0006207,-0.0059684,0.999982>
                  TARG/<0,-25,-11.5>,<0,0,1>
                  ANGLE VEC=<1,0,0>,RADIAL
                  SHOW FEATURE PARAMETERS=NO
                  SHOW CONTACT PARAMETERS=YES
                    NUMHITS=4,NUMRINGS=1
                    SPACER=4.5
                    AVOIDANCE MOVE=NO,DISTANCE=0
                  SHOW HITS=NO
ALIGN3           =ALIGNMENT/START,RECALL:ALIGN2,LIST=YES
                    ALIGNMENT/LEVEL,ZPLUS,PLANE-A-
                    ALIGNMENT/ROTATE_CIRCLE,XPLUS,TO,CIRC_5.9,AND,POINT_3,ABOUT,ZPLUS
                    ALIGNMENT/TRANS,ZAXIS,PLANE-A-
                  ALIGNMENT/END
CIRC_-B2-        =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
                  THEO/<0,-25,-0.3>,<0,0,-1>,10,0
                  ACTL/<0.246,-25.037,-0.151>,<0,0,-1>,9.98,0
                  TARG/<0,-25,-0.3>,<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=4,DEPTH=0,PITCH=0
                    SAMPLE METHOD=SAMPLE_HITS
                    SAMPLE HITS=0,SPACER=0
                    AVOIDANCE MOVE=NO,DISTANCE=2
                    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                  SHOW HITS=NO
PLANE1           =FEAT/CONTACT/PLANE/DEFAULT,CARTESIAN,OUTLINE
                  THEO/<0,-25,-3.7>,<0,0,1>
                  ACTL/<0.253,-25.005,-3.622>,<0.0016589,0.0065264,0.9999773>
                  TARG/<0,-25,-3.7>,<0,0,1>
                  ANGLE VEC=<1,0,0>,RADIAL
                  SHOW FEATURE PARAMETERS=NO
                  SHOW CONTACT PARAMETERS=YES
                    NUMHITS=4,NUMRINGS=1
                    SPACER=10
                    AVOIDANCE MOVE=NO,DISTANCE=0
                  SHOW HITS=NO
                  MOVE/CLEARPLANE
ALIGN_A_B        =ALIGNMENT/START,RECALL:ALIGN3,LIST=YES
                    ALIGNMENT/LEVEL,ZPLUS,PLANE-A-
                    ALIGNMENT/TRANS,ZAXIS,PLANE-A-
                    ALIGNMENT/ROTATE_CIRCLE,XPLUS,TO,CIRC_-B2-,AND,POINT_3,ABOUT,ZPLUS
                    ALIGNMENT/TRANS,XAXIS,CIRC_-B2-
                    ALIGNMENT/TRANS,YAXIS,CIRC_-B2-
                  ALIGNMENT/END
                  DATDEF/FEATURE=PLANE-A-,A
                  DATDEF/FEATURE=CIRC_-B2-,B
      BALL_03_GET_TP =POSITION : CIRC_5.9
                  FEATCTRLFRAME/SHOWNOMS=NO,SHOWPARAMS=YES,SHOWEXPANDED=YES
                  CADGRAPH=OFF,REPORTGRAPH=OFF,TEXT=OFF,MULT=10.00,ARROWDENSITY=100,OUTPUT=BOTH,UNITS=MM
                  COMPOSITE=NO,FIT TO DATUMS=YES,DEV PERPEN CENTERLINE=ON,OUTPUT ALIGNMENT=Datum Reference Frame
                  CUSTOMIZED DRF=NO
                  STANDARDTYPE=ASME_Y14_5
                    SIZE TOLERANCES/1,DIAMETER,5.9,0.1,0.1
                    PRIMARY DIMENSION/POSITION,DIAMETER,0.05,MMC,A,B,MMC,<size>,<dat>
                    SECONDARY DIMENSION/<Dim>,<tol>,<MC>,<dat>,<dat>,<dat>
                    NOTE/BALL_03_GET_TP
                  FEATURES/CIRC_5.9,,
      $$ NO,
                  * EXPORT-MAKE DIRECTORY-PATH-CREATE PDF REPORT-DELETE INSTANCES *
                  ASSIGN/PATH="C:\CMM\REPORTS\\"+OPERATOR+"\\"+JOB_NO+"\\"+JOB_NO+"_"+LOT_NO+"_SAMPLE_"+SAMPLE + ".PDF"
                  PRINT/REPORT,EXEC MODE=END,$
                    TO_FILE=ON,OVERWRITE=C:\CMM\PROGRAMS\005929-XX\PATH.PDF,AUTO OPEN REPORT=OFF,$
                    TO_PRINTER=OFF,COPIES=1,$
                    TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
                    REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                    TO_EXCEL_OUTPUT=OFF,
                    PREVIOUS_RUNS=DELETE_INSTANCES
      $$ NO,
                  * NEXT SAMPLE-LOOP WAIT *
                  ASSIGN/SAMPLE=SAMPLE+1
                  MOVESPEED/ 300
                LOOP/END
              LOOP/END
              RECALL/ALIGNMENT,INTERNAL,READPOINT_ALIGN
              MOVE/POINT,NORMAL,<0.000,300.000,200.000>
Parents
  • ngasve,
    #1 - Please stop what you are doing right now and edit every name of every feature and dimension in your program to replace all special characters with nothing but letters, numbers, and underscores. Special characters in names usually corrupt the program. Decimal points are especially troubling, as they are used to trigger special operations within PC-DMIS.

    #2- As Bfire pointed out, we have been experiencing problems with Xactmeasure and PC-DMIS's canned looping function.
    One of my tasks is to help with troubleshooting that, but for now what we're going to do is a good old fashioned Work Around.

    Choice A: Easy Work Around
    Delete the Xactmeasure stuff and replace with a Legacy Position that does NOT have the MMC on the B datum (Legacy does not compute that correctly, not even close).
    This will have the unfortunate side effect of denying your parts the Datum Shift that the B being over minimum size would give them, making it harder to pass the dimension. FYI... some of our very successful customers do this on purpose, denying themselves the MMC datum shift to leave a little margin of error on the table so their customer never sees a bad part.

    Choice B: Hard Work Around
    This is a rather involved "Level 3 Wizardry" solution. Proceed with caution - by which I mean Save As a new version, don't mess up your original program. We're going to replace the canned Loops with a full custom Flow Control setup.


    $$ NO,
                ~~~ At The Start: ~~~
                ASSIGN/VAR_X=-25
                ASSIGN/VAR_Y=-25
                ASSIGN/XCOUNT=0
                ASSIGN/YCOUNT=0
    $$ NO,
                  
    BEGIN      =LABEL/
    $$ NO,
                  
                ASSIGN/XCOUNT=XCOUNT+1
                ASSIGN/VAR_X=VAR_X+25
                IF/XCOUNT==1
                  ASSIGN/VAR_Y=VAR_Y+25
                  ASSIGN/YCOUNT=YCOUNT+1
                END_IF/
    $$ NO,
                  
                COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                "FOR TESTING"
                "   XCOUNT: "+XCOUNT
                "   YCOUNT: "+YCOUNT
                "CURRENT X: "+VAR_X
                "CURRENT Y: "+VAR_Y
                "Change from OPER to $$ when testing is complete."
    $$ NO,
                  
    FAKE_ORIGIN=GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0+0,0+0,0+0>,$
                MEAS/XYZ,<VAR_X,VAR_Y,0+0>,$
                NOM/IJK,<0+0,0+0,1+0>,$
                MEAS/IJK,<0+0,0+0,1+0>
    TEMP_ALIGN =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
                  ALIGNMENT/TRANS,XAXIS,FAKE_ORIGIN
                  ALIGNMENT/TRANS,YAXIS,FAKE_ORIGIN
                ALIGNMENT/END
    $$ NO,
                  Use Planes and Cylinders (full 3D features)
                  to make a single ALL-6-DEGREES-OF-FREEDOM
                  alignment in a single step.
                  If the holes aren't deep enough for cylinders
                  then use 3 sample hits on each circle.
                   
    $$ NO,
                  Features, datum defs, dims, print command.
    $$ NO,
                  ~~~ At The End: ~~~
                IF_GOTO/YCOUNT==6 AND XCOUNT==5,GOTO = END_OF_LOOPING
    $$ NO,
                  
                IF/XCOUNT==5
                  ASSIGN/VAR_X=-25
                  ASSIGN/XCOUNT=0
                END_IF/
    $$ NO,
                  
                GOTO/BEGIN
    $$ NO,
                  
    END_OF_LOOPING=LABEL/
    
Reply
  • ngasve,
    #1 - Please stop what you are doing right now and edit every name of every feature and dimension in your program to replace all special characters with nothing but letters, numbers, and underscores. Special characters in names usually corrupt the program. Decimal points are especially troubling, as they are used to trigger special operations within PC-DMIS.

    #2- As Bfire pointed out, we have been experiencing problems with Xactmeasure and PC-DMIS's canned looping function.
    One of my tasks is to help with troubleshooting that, but for now what we're going to do is a good old fashioned Work Around.

    Choice A: Easy Work Around
    Delete the Xactmeasure stuff and replace with a Legacy Position that does NOT have the MMC on the B datum (Legacy does not compute that correctly, not even close).
    This will have the unfortunate side effect of denying your parts the Datum Shift that the B being over minimum size would give them, making it harder to pass the dimension. FYI... some of our very successful customers do this on purpose, denying themselves the MMC datum shift to leave a little margin of error on the table so their customer never sees a bad part.

    Choice B: Hard Work Around
    This is a rather involved "Level 3 Wizardry" solution. Proceed with caution - by which I mean Save As a new version, don't mess up your original program. We're going to replace the canned Loops with a full custom Flow Control setup.


    $$ NO,
                ~~~ At The Start: ~~~
                ASSIGN/VAR_X=-25
                ASSIGN/VAR_Y=-25
                ASSIGN/XCOUNT=0
                ASSIGN/YCOUNT=0
    $$ NO,
                  
    BEGIN      =LABEL/
    $$ NO,
                  
                ASSIGN/XCOUNT=XCOUNT+1
                ASSIGN/VAR_X=VAR_X+25
                IF/XCOUNT==1
                  ASSIGN/VAR_Y=VAR_Y+25
                  ASSIGN/YCOUNT=YCOUNT+1
                END_IF/
    $$ NO,
                  
                COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                "FOR TESTING"
                "   XCOUNT: "+XCOUNT
                "   YCOUNT: "+YCOUNT
                "CURRENT X: "+VAR_X
                "CURRENT Y: "+VAR_Y
                "Change from OPER to $$ when testing is complete."
    $$ NO,
                  
    FAKE_ORIGIN=GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0+0,0+0,0+0>,$
                MEAS/XYZ,<VAR_X,VAR_Y,0+0>,$
                NOM/IJK,<0+0,0+0,1+0>,$
                MEAS/IJK,<0+0,0+0,1+0>
    TEMP_ALIGN =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
                  ALIGNMENT/TRANS,XAXIS,FAKE_ORIGIN
                  ALIGNMENT/TRANS,YAXIS,FAKE_ORIGIN
                ALIGNMENT/END
    $$ NO,
                  Use Planes and Cylinders (full 3D features)
                  to make a single ALL-6-DEGREES-OF-FREEDOM
                  alignment in a single step.
                  If the holes aren't deep enough for cylinders
                  then use 3 sample hits on each circle.
                   
    $$ NO,
                  Features, datum defs, dims, print command.
    $$ NO,
                  ~~~ At The End: ~~~
                IF_GOTO/YCOUNT==6 AND XCOUNT==5,GOTO = END_OF_LOOPING
    $$ NO,
                  
                IF/XCOUNT==5
                  ASSIGN/VAR_X=-25
                  ASSIGN/XCOUNT=0
                END_IF/
    $$ NO,
                  
                GOTO/BEGIN
    $$ NO,
                  
    END_OF_LOOPING=LABEL/
    
Children
No Data