hexagon logo

Do Until Pallet using Element function and Trace Fields

Do Until Pallet using Element function and Trace Fields

Here is a sample routine using the Do Until loop for a Pallet routine. I came across a post that Josh Carpenter posted a brief example of a Do Until routine.
I decided to give this a try using PC-DMIS 2022.1 with Trace Fields and the Element function. His example measurement units are in metric and I converted this sample to inches.
This example allows the routine to skip multiple pallet stations.
Josh Carpenter post link for Looping question: Unique Input for Each Part plus Skipping Stations - Starting on Post 2
Link: https://www.pcdmisforum.com/forum/pc...pping-stations

Here is the sample routine.


PART NAME  : Looping DoUntil Forum
REV NUMBER : 20220805
SER NUMBER :
STATS COUNT : 1
 
STARTUP    =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES
            ALIGNMENT/END
            MODE/MANUAL
            FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,OUTTOL, ,
            LOADPROBE/5BY50_M3_SH
            TIP/TIP1, SHANKIJK=0, 0, 1, ANGLE=0
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter Serial numbers per-part ; partSerialNo : 101,,103,104,105,,107,108,109,110,111,112,113,114,115,116
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Skip part Ex.(1) or parts Ex.(1,2,3) Enter in ascending order ; skipPartTrace : 2,6
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Report the skip part information? ; skipPartReportInfo : Yes
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter number of parts - First row X ; xCounterTrace : 4
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter number of parts - First column Y ; yCounterTrace : 4
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 1 ; xOffsetPart1 : 0
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 2 ; xOffsetPart2 : 3.937008
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 3 ; xOffsetPart3 : 7.874016
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 4 ; xOffsetPart4 : 11.81102
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First column Y Part 1 ; yOffsetPart1 : 0
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First column Y Part 2 ; yOffsetPart2 : -3.937008
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First column Y Part 3 ; yOffsetPart3 : -7.874016
            TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First column Y Part 4 ; yOffsetPart4 : -11.81102
            ASSIGN/SKIP_TRACE_CNT=1
            ASSIGN/PART_COUNT=0
            ASSIGN/Y_COUNTER=0
            ASSIGN/X_LOOP_END_COUNT=GETTRACEVALUE("xCounterTrace")
            ASSIGN/Y_LOOP_END_COUNT=GETTRACEVALUE("yCounterTrace")
            DO/
              ASSIGN/Y_COUNTER=Y_COUNTER+1
              IF/Y_COUNTER==1
                ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart1")
              END_IF/
              IF/Y_COUNTER==2
                ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart2")
              END_IF/
              IF/Y_COUNTER==3
                ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart3")
              END_IF/
              IF/Y_COUNTER==4
                ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart4")
              END_IF/
              ASSIGN/X_COUNTER=0
              DO/
                ASSIGN/PART_COUNT=PART_COUNT+1
                ASSIGN/X_COUNTER=X_COUNTER+1
                ASSIGN/SKIP_PART_TRACE=ELEMENT(SKIP_TRACE_CNT,",",GETTRACEVALUE("skipPartTrace"))
                ASSIGN/SKIP_PART=SKIP_PART_TRACE
                IF/PART_COUNT==SKIP_PART
                  ASSIGN/SER_NO_TRACE=ELEMENT(PART_COUNT,",",GETTRACEVALUE("partSerialNo"))
                  ASSIGN/SER_NO=SER_NO_TRACE
                  IF/GETTRACEVALUE("skipPartReportInfo")=="Yes"
                    COMMENT/REPT,
                    "SER_NO SKIP: "+SER_NO
                    "PART_COUNT SKIP: "+PART_COUNT
                    .
                  END_IF/
                  ASSIGN/SKIP_TRACE_CNT=SKIP_TRACE_CNT+1
                  IF_GOTO/PART_COUNT==SKIP_PART,GOTO = SKIP_PART_L1
                END_IF/
                ASSIGN/SER_NO_TRACE=ELEMENT(PART_COUNT,",",GETTRACEVALUE("partSerialNo"))
                ASSIGN/SER_NO=SER_NO_TRACE
                COMMENT/REPT,
                "SER_NO: "+SER_NO
                "PART_COUNT: "+PART_COUNT
                IF/X_COUNTER==1
                  ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart1")
                END_IF/
                IF/X_COUNTER==2
                  ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart2")
                END_IF/
                IF/X_COUNTER==3
                  ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart3")
                END_IF/
                IF/X_COUNTER==4
                  ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart4")
                END_IF/
LOOP_ORIGIN    =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0+0,0+0,0+0>,$
                MEAS/XYZ,<FIXTURE_X,FIXTURE_Y,0+0>,$
                NOM/IJK,<0+0,0+0,1+0>,$
                MEAS/IJK,<0+0,0+0,1+0>
A1             =ALIGNMENT/START,RECALL:USE_ACTIVE_ALIGNMENT(STARTUP),LIST=YES
                  ALIGNMENT/TRANS,XAXIS,LOOP_ORIGIN
                  ALIGNMENT/TRANS,YAXIS,LOOP_ORIGIN
                ALIGNMENT/END
F1             =GENERIC/CIRCLE,DEPENDENT,CARTESIAN,OUT,$
                NOM/XYZ,<0,0,0>,$
                MEAS/XYZ,<0,0,0>,$
                NOM/IJK,<0,0,1>,$
                MEAS/IJK,<0,0,1>,$
                DIAMETER/1,1
    DIM LOC1= LOCATION OF CIRCLE F1  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL
    X       0.0000     0.0020     0.0020     0.0000     0.0000     0.0000 ----#----
    Y       0.0000     0.0020     0.0020     0.0000     0.0000     0.0000 ----#----
    Z       0.0000     0.0020     0.0020     0.0000     0.0000     0.0000 ----#----
    END OF DIMENSION LOC1
                ASSIGN/DATE=SYSTEMDATE("ddMMMyyyy")
                ASSIGN/TIME=SYSTEMTIME("HHmm")
                ASSIGN/PARTNAME=STR(GETTEXT(191,1,{FILEHEDR}))
                ASSIGN/PDFNAME="C:\\Users\\Public\\Documents\\"+PARTNAME+"_"+TIME+"_"+DATE+".PDF"
SKIP_PART_L1    =LABEL/
              UNTIL/X_COUNTER==X_LOOP_END_COUNT
            UNTIL/Y_COUNTER==Y_LOOP_END_COUNT
            ASSIGN/TOTAL_PART_COUNT=PART_COUNT-(SKIP_TRACE_CNT-1)
$$ YES,
            "TOTAL PART_COUNT: "+TOTAL_PART_COUNT+" of "+PART_COUNT
            PRINT/REPORT,EXEC MODE=END,$
              TO_FILE=OFF,OVERWRITE=PDFNAME,AUTO OPEN=OFF,$
              TO_PRINTER=OFF,COPIES=1,$
              TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
              REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
              TO_EXCEL=OFF,$
              PREVIOUS_RUNS=KEEP_INSTANCES

  • I'll have to check on my PC at home, not by that one, I'll let you know later VP
  • Hi Kirby,
    It depends if the place of parts are ordered or randomized...
    If 4 parts isx0y0,x0y1,x1y0 and x1y1, it should be easy.
    Else, it must be hard !!!!!
  • No problem. Thanks for giving this a try. I will put together your sample routine as shown above and see what results I get. I am getting close to finishing other Routine Templates that I can use to build a complete Routine Template using this loop method.
  • KIRBSTER269,
    Here is the sample Pallet Routine Template with some of your changes and I removed the skip part from the routine. The number of columns multiple the number of rows will equal the number of parts in this sample routine. Is there another method you want to use the Total Parts for?

                MODE/DCC
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter Unit Numbers ; unitNumber : 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Number of Columns ; xCounterTrace : 5
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Number of Rows ; yCounterTrace : 3
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=First Part X ; xOffsetPart1 : 0
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Second Part X ; xOffsetPart2 : 2.25
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Third Part X ; xOffsetPart3 : 4.5
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Fourth Part X ; xOffsetPart4 : 6.75
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Fifth Part X ; xOffsetPart5 : 9
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=First row Y ; yOffsetPart1 : 0
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Second row Y ; yOffsetPart2 : -5
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Third row Y ; yOffsetPart3 : -10
                ASSIGN/SKIP_TRACE_CNT=1
                ASSIGN/PART_COUNT=0
                ASSIGN/Y_COUNTER=0
                ASSIGN/X_LOOP_END_COUNT=GETTRACEVALUE("xCounterTrace")
                ASSIGN/Y_LOOP_END_COUNT=GETTRACEVALUE("yCounterTrace")
                DO/
                  ASSIGN/Y_COUNTER=Y_COUNTER+1
                  IF/Y_COUNTER==1
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart1")
                  END_IF/
                  IF/Y_COUNTER==2
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart2")
                  END_IF/
                  IF/Y_COUNTER==3
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart3")
                  END_IF/
                  ASSIGN/X_COUNTER=0
                  DO/
                    ASSIGN/PART_COUNT=PART_COUNT+1
                    ASSIGN/X_COUNTER=X_COUNTER+1
                    ASSIGN/SER_NO_TRACE=ELEMENT(PART_COUNT,",",GETTRACEVALUE("unitNumber"))
                    ASSIGN/SER_NO=SER_NO_TRACE
                    COMMENT/REPT,
                    "SER_NO: "+SER_NO
                    "PART_COUNT: "+PART_COUNT
                    IF/X_COUNTER==1
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart1")
                    END_IF/
                    IF/X_COUNTER==2
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart2")
                    END_IF/
                    IF/X_COUNTER==3
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart3")
                    END_IF/
                    IF/X_COUNTER==4
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart4")
                    END_IF/
                    IF/X_COUNTER==5
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart5")
                    END_IF/
    LOOP_ORIGIN    =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                    NOM/XYZ,<0+0,0+0,0+0>,$
                    MEAS/XYZ,<FIXTURE_X,FIXTURE_Y,0+0>,$
                    NOM/IJK,<0+0,0+0,1+0>,$
                    MEAS/IJK,<0+0,0+0,1+0>
    A4             =ALIGNMENT/START,RECALL:A7,LIST=YES
                      ALIGNMENT/TRANS,XAXIS,LOOP_ORIGIN
                      ALIGNMENT/TRANS,YAXIS,LOOP_ORIGIN
                    ALIGNMENT/END
    CIR1           =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                    THEO/<0,0,0>,<0,0,1>,0.5906
                    ACTL/<0,0,0>,<0,0,1>,0.5906
                    TARG/<0,0,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=4,DEPTH=0.1969,PITCH=0
                      SAMPLE METHOD=SAMPLE_HITS
                      SAMPLE HITS=0,SPACER=0.1
                      AVOIDANCE MOVE=BOTH,DISTANCE BEFORE=0.3937,DISTANCE AFTER=0.3937,DIRECTION=ALONG TIP VECTOR
                      FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                    SHOW HITS=NO
                  UNTIL/X_COUNTER==X_LOOP_END_COUNT
                UNTIL/Y_COUNTER==Y_LOOP_END_COUNT​
    


  • I have another Palllet Routine sample that has the ability to change direction and pattern.
    Post Title: Pallet Routine Example - Loop Pattern types and Start direction options
    Link: https://www.pcdmisforum.com/forum/pc-dmis-enterprise-metrology-software/pc-dmis-code-samples/519245-pallet-routine-example-loop-pattern-types-and-start-direction-options
  • Do you want the Total Parts to be the max number of loops? Then I can add some code to end the loop after a condition of the count amount is reach.
  • Here is the sample measurement routine using the total number of parts. If the Enter Total Parts is set at 1 only one part will be measured and if 16 parts are entered, then only 15 parts will be measured with Column setting at 5 and Rows at 3.
    There is no Exit Do (VB.NET) or break; (C#) to exit the loop in PC-DMIS. I used the IF_GOTO with a true condition to jump to a label instead.

    Features Added:
    TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter Total Parts ; Parts_Total : 15
    ASSIGN/NUMBER_PARTS=GETTRACEVALUE("Parts_Total")
    IF_GOTO/(PART_COUNT-1)==NUMBER_PARTS,GOTO = EXIT_DO
    EXIT_DO =LABEL/


                MODE/DCC
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter Unit Numbers ; unitNumber : 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter Total Parts ; Parts_Total : 15
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Number of Columns ; xCounterTrace : 5
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Number of Rows ; yCounterTrace : 3
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=First Part X ; xOffsetPart1 : 0
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Second Part X ; xOffsetPart2 : 10
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Third Part X ; xOffsetPart3 : 20
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Fourth Part X ; xOffsetPart4 : 30
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Fifth Part X ; xOffsetPart5 : 40
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=First row Y ; yOffsetPart1 : -10
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Second row Y ; yOffsetPart2 : -20
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Third row Y ; yOffsetPart3 : -30
                ASSIGN/NUMBER_PARTS=GETTRACEVALUE("Parts_Total")
                ASSIGN/SKIP_TRACE_CNT=1
                ASSIGN/PART_COUNT=0
                ASSIGN/Y_COUNTER=0
                ASSIGN/X_LOOP_END_COUNT=GETTRACEVALUE("xCounterTrace")
                ASSIGN/Y_LOOP_END_COUNT=GETTRACEVALUE("yCounterTrace")
                DO/
                  ASSIGN/Y_COUNTER=Y_COUNTER+1
                  IF/Y_COUNTER==1
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart1")
                  END_IF/
                  IF/Y_COUNTER==2
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart2")
                  END_IF/
                  IF/Y_COUNTER==3
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart3")
                  END_IF/
                  ASSIGN/X_COUNTER=0
                  DO/
                    ASSIGN/PART_COUNT=PART_COUNT+1
                    IF_GOTO/(PART_COUNT-1)==NUMBER_PARTS,GOTO = EXIT_DO
                    ASSIGN/X_COUNTER=X_COUNTER+1
                    ASSIGN/SER_NO_TRACE=ELEMENT(PART_COUNT,",",GETTRACEVALUE("unitNumber"))
                    ASSIGN/SER_NO=SER_NO_TRACE
                    COMMENT/REPT,
                    "SER_NO: "+SER_NO
                    "PART_COUNT: "+PART_COUNT
                    IF/X_COUNTER==1
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart1")
                    END_IF/
                    IF/X_COUNTER==2
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart2")
                    END_IF/
                    IF/X_COUNTER==3
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart3")
                    END_IF/
                    IF/X_COUNTER==4
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart4")
                    END_IF/
                    IF/X_COUNTER==5
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart5")
                    END_IF/
    LOOP_ORIGIN    =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                    NOM/XYZ,<0+0,0+0,0+0>,$
                    MEAS/XYZ,<FIXTURE_X,FIXTURE_Y,0+0>,$
                    NOM/IJK,<0+0,0+0,1+0>,$
                    MEAS/IJK,<0+0,0+0,1+0>
    A4             =ALIGNMENT/START,RECALL:A7,LIST=YES
                      ALIGNMENT/TRANS,XAXIS,LOOP_ORIGIN
                      ALIGNMENT/TRANS,YAXIS,LOOP_ORIGIN
                    ALIGNMENT/END
    CIR1           =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                    THEO/<0,0,0>,<0,0,1>,0.5906
                    ACTL/<0,0,0>,<0,0,1>,0.5906
                    TARG/<0,0,0>,<0,0,1>
                    START ANG=0,END ANG=360
                    ANGLE VEC=<1,0,0>
                    DIRECTION=CCW
                    SHOW FEATURE PARAMETERS=NO
                    SHOW CONTACT PARAMETERS=NO
    CIR2           =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                    THEO/<2.3942,0,0>,<0,0,1>,0.5906
                    ACTL/<2.3942,0,0>,<0,0,1>,0.5906
                    TARG/<2.3942,0,0>,<0,0,1>
                    START ANG=0,END ANG=360
                    ANGLE VEC=<1,0,0>
                    DIRECTION=CCW
                    SHOW FEATURE PARAMETERS=NO
                    SHOW CONTACT PARAMETERS=NO
    CIR3           =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                    THEO/<0,-2.3942,0>,<0,0,1>,0.5906
                    ACTL/<0,-2.3942,0>,<0,0,1>,0.5906
                    TARG/<0,-2.3942,0>,<0,0,1>
                    START ANG=0,END ANG=360
                    ANGLE VEC=<1,0,0>
                    DIRECTION=CCW
                    SHOW FEATURE PARAMETERS=NO
                    SHOW CONTACT PARAMETERS=NO
    CIR4           =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                    THEO/<2.3942,-2.3942,0>,<0,0,1>,0.5906
                    ACTL/<2.3942,-2.3942,0>,<0,0,1>,0.5906
                    TARG/<2.3942,-2.3942,0>,<0,0,1>
                    START ANG=0,END ANG=360
                    ANGLE VEC=<1,0,0>
                    DIRECTION=CCW
                    SHOW FEATURE PARAMETERS=NO
                    SHOW CONTACT PARAMETERS=NO
                  UNTIL/X_COUNTER==X_LOOP_END_COUNT
                UNTIL/Y_COUNTER==Y_LOOP_END_COUNT
    EXIT_DO    =LABEL/​
    


  • Here is the updated Do Until Pallet using Element function and Trace Fields​ template sample routine shown in post number 1.
    There is no Exit Do (VB.NET) or break; (C#) to exit the loop in PC-DMIS. I used the IF_GOTO with a true condition to jump to a label instead.

    Added features:
    TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter number of Parts for Pallet ; totalParts : 7
    ASSIGN/NUMBER_PARTS_EXECUTED=GETTRACEVALUE("totalParts")
    IF_GOTO/(PART_COUNT-1)==NUMBER_PARTS_EXECUTED,GOTO = EXIT_DO
    EXIT_DO =LABEL/

                MODE/DCC
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter Serial numbers per-part ; partSerialNo : 101,102,103,104,105,,107,108,109,110,111,112,113,114,115,116
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter number of Parts for Pallet ; totalParts : 7
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Skip part Ex.(1) or parts Ex.(1,2,3) Enter in ascending order ; skipPartTrace : 2,6
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Report the skip part information? ; skipPartReportInfo : No
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter number of parts - First row X ; xCounterTrace : 4
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter number of parts - First column Y ; yCounterTrace : 4
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 1 ; xOffsetPart1 : 0
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 2 ; xOffsetPart2 : 3.937008
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 3 ; xOffsetPart3 : 7.874016
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 4 ; xOffsetPart4 : 11.81102
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First column Y Part 1 ; yOffsetPart1 : 0
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First column Y Part 2 ; yOffsetPart2 : -3.937008
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First column Y Part 3 ; yOffsetPart3 : -7.874016
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First column Y Part 4 ; yOffsetPart4 : -11.81102
                ASSIGN/NUMBER_PARTS_EXECUTED=GETTRACEVALUE("totalParts")
                ASSIGN/SKIP_TRACE_CNT=1
                ASSIGN/PART_COUNT=0
                ASSIGN/Y_COUNTER=0
                ASSIGN/X_LOOP_END_COUNT=GETTRACEVALUE("xCounterTrace")
                ASSIGN/Y_LOOP_END_COUNT=GETTRACEVALUE("yCounterTrace")
                DO/
                  ASSIGN/Y_COUNTER=Y_COUNTER+1
                  IF/Y_COUNTER==1
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart1")
                  END_IF/
                  IF/Y_COUNTER==2
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart2")
                  END_IF/
                  IF/Y_COUNTER==3
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart3")
                  END_IF/
                  IF/Y_COUNTER==4
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart4")
                  END_IF/
                  ASSIGN/X_COUNTER=0
                  DO/
                    ASSIGN/PART_COUNT=PART_COUNT+1
                    IF_GOTO/(PART_COUNT-1)==NUMBER_PARTS_EXECUTED,GOTO = EXIT_DO
                    ASSIGN/X_COUNTER=X_COUNTER+1
                    ASSIGN/SKIP_PART_TRACE=ELEMENT(SKIP_TRACE_CNT,",",GETTRACEVALUE("skipPartTrace"))
                    ASSIGN/SKIP_PART=SKIP_PART_TRACE
                    IF/PART_COUNT==SKIP_PART
                      ASSIGN/SER_NO_TRACE=ELEMENT(PART_COUNT,",",GETTRACEVALUE("partSerialNo"))
                      ASSIGN/SER_NO=SER_NO_TRACE
                      IF/GETTRACEVALUE("skipPartReportInfo")=="Yes"
                        COMMENT/REPT,
                        "SER_NO SKIP: "+SER_NO
                        "PART_COUNT SKIP: "+PART_COUNT
                        .
                      END_IF/
                      ASSIGN/SKIP_TRACE_CNT=SKIP_TRACE_CNT+1
                      IF_GOTO/PART_COUNT==SKIP_PART,GOTO = SKIP_PART_L1
                    END_IF/
                    ASSIGN/SER_NO_TRACE=ELEMENT(PART_COUNT,",",GETTRACEVALUE("partSerialNo"))
                    ASSIGN/SER_NO=SER_NO_TRACE
                    COMMENT/REPT,
                    "SER_NO: "+SER_NO
                    "PART_COUNT: "+PART_COUNT
                    IF/X_COUNTER==1
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart1")
                    END_IF/
                    IF/X_COUNTER==2
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart2")
                    END_IF/
                    IF/X_COUNTER==3
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart3")
                    END_IF/
                    IF/X_COUNTER==4
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart4")
                    END_IF/
    LOOP_ORIGIN    =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                    NOM/XYZ,<0+0,0+0,0+0>,$
                    MEAS/XYZ,<FIXTURE_X,FIXTURE_Y,0+0>,$
                    NOM/IJK,<0+0,0+0,1+0>,$
                    MEAS/IJK,<0+0,0+0,1+0>
    A4             =ALIGNMENT/START,RECALL:A7,LIST=YES
                      ALIGNMENT/TRANS,XAXIS,LOOP_ORIGIN
                      ALIGNMENT/TRANS,YAXIS,LOOP_ORIGIN
                    ALIGNMENT/END
    CIR1           =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
                    THEO/<0,0,0>,<0,0,1>,0.5906
                    ACTL/<0,0,0>,<0,0,1>,0.5906
                    TARG/<0,0,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=4,DEPTH=0.1969,PITCH=0
                      SAMPLE METHOD=SAMPLE_HITS
                      SAMPLE HITS=0,SPACER=0.1
                      AVOIDANCE MOVE=BOTH,DISTANCE BEFORE=0.3937,DISTANCE AFTER=0.3937,DIRECTION=ALONG TIP VECTOR
                      FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                    SHOW HITS=NO
    SKIP_PART_L1    =LABEL/
                  UNTIL/X_COUNTER==X_LOOP_END_COUNT
                UNTIL/Y_COUNTER==Y_LOOP_END_COUNT
    EXIT_DO    =LABEL/​
    


  • Hello folks,

    I have the problem that it doesn't jump to the second row, but stays in the first row forever...​
    Maybe someone can help Slight smile

    STARTUP    =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES
                ALIGNMENT/END
                MODE/MANUAL
                FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,OUTTOL, ,
                LOADPROBE/PRB92_DRM3_5
                TIP/TIP1, SHANKIJK=0, 0, 1, ANGLE=90
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter Serial numbers per-part ; partSerialNo : 1,2,3,4,5,6,7,8,9,10
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Skip part Ex.(1) or parts Ex.(1,2,3) Enter in ascending order ; skipPartTrace :
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter number of parts - First row X ; xCounterTrace : 5
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter number of rows ; yCounterTrace : 2
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 1 ; xOffsetPart1 : 0
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 2 ; xOffsetPart2 : 24
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 3 ; xOffsetPart3 : 48
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 4 ; xOffsetPart3 : 72
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First row X Part 5 ; xOffsetPart3 : 96
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First column Y Part 1 ; yOffsetPart1 : 0
                TRACEFIELD/DISPLAY=YES,REPORT=NO,DISPLAY MESSAGE=Enter offset distance - First column Y Part 2 ; yOffsetPart2 : -26.7
    CYL1       =FEAT/CYLINDER,CARTESIAN,IN,LEAST_SQR
                THEO/<366.1325,200.7608,94.1266>,<0,0,1>,6,7.7083
                ACTL/<366.1059,200.1466,94.5486>,<0.0008086,-0.0009008,0.9999993>,6.0089,6.2955
                MEAS/CYLINDER,6
                  HIT/BASIC,NORMAL,<365.6202,203.7167,90.3096>,<0.1707707,-0.9853108,0>,<366.0037,203.1526,91.4037>,USE THEO=YES
                  HIT/BASIC,NORMAL,<363.2076,201.4273,90.2831>,<0.9750078,-0.2221705,0>,<363.9286,198.0757,91.4541>,USE THEO=YES
                  HIT/BASIC,NORMAL,<368.8273,199.4429,90.2725>,<-0.8983379,0.4393051,0>,<369.1082,200.1378,91.4872>,USE THEO=YES
                  HIT/BASIC,NORMAL,<368.73,199.2595,97.9808>,<-0.865785,0.5004162,0>,<366.7885,203.0698,97.6984>,USE THEO=YES
                  HIT/BASIC,NORMAL,<366.1138,203.7608,97.9563>,<0.0062177,-0.9999807,0>,<363.4321,198.7796,97.5408>,USE THEO=YES
                  HIT/BASIC,NORMAL,<363.1389,200.562,97.966>,<0.997802,0.066266,0>,<368.7446,198.7039,97.4646>,USE THEO=YES
                ENDMEAS/
    LIN1       =FEAT/LINE,CARTESIAN,UNBOUNDED
                THEO/<329.1322,201.1996,42.0829>,<0,-1,0>
                ACTL/<329.1474,200.3534,42.1652>,<0.0060708,-0.9999816,0>
                MEAS/LINE,3,ZPLUS
                  HIT/BASIC,NORMAL,<329.1363,201.1996,42.0723>,<-1,0,0>,<329.1536,200.3534,42.1253>,USE THEO=YES
                  HIT/BASIC,NORMAL,<329.1243,177.2588,42.0787>,<-1,0,0>,<329.2725,178.1053,42.1635>,USE THEO=YES
                  HIT/BASIC,NORMAL,<329.1362,152.9391,42.0978>,<-1,0,0>,<329.5155,140.3268,42.2068>,USE THEO=YES
                ENDMEAS/
    PNT1       =FEAT/POINT,CARTESIAN
                THEO/<362.1447,200.8556,99.0167>,<0,0,1>
                ACTL/<362.4215,201.2952,99.0155>,<-0.0151699,-0.0103431,0.9998314>
                MEAS/POINT,1,WORKPLANE
                  HIT/BASIC,NORMAL,<362.1447,200.8556,99.0167>,<0,0,1>,<362.4215,201.2952,99.0155>,USE THEO=YES
                ENDMEAS/
    A1         =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
                  ALIGNMENT/LEVEL,ZPLUS,CYL1
                  ALIGNMENT/ROTATE,XPLUS,TO,LIN1,ABOUT,ZPLUS
                  ALIGNMENT/TRANS,XAXIS,CYL1
                  ALIGNMENT/TRANS,YAXIS,CYL1
                  ALIGNMENT/TRANS,ZAXIS,PNT1
                  ALIGNMENT/ROTATE_OFFSET,90,ABOUT,ZPLUS
                ALIGNMENT/END
                MODE/DCC
                CLEARP/ZPLUS,10,ZPLUS,0,ON
                MOVE/CLEARPLANE
                ASSIGN/SKIP_TRACE_CNT=1
                ASSIGN/PART_COUNT=0
                ASSIGN/Y_COUNTER=0
                ASSIGN/X_LOOP_END_COUNT=GETTRACEVALUE("xCounterTrace")
                ASSIGN/Y_LOOP_END_COUNT=GETTRACEVALUE("yCounterTrace")
                DO/
                  ASSIGN/Y_COUNTER=Y_COUNTER+1
                  IF/Y_COUNTER==1
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart1")
                  END_IF/
                  IF/Y_COUNTER==2
                    ASSIGN/FIXTURE_Y=GETTRACEVALUE("yOffsetPart2")
                  END_IF/
                  ASSIGN/X_COUNTER=0
                  DO/
                    ASSIGN/PART_COUNT=PART_COUNT+1
                    ASSIGN/X_COUNTER=X_COUNTER+1
                    ASSIGN/SKIP_PART_TRACE=ELEMENT(SKIP_TRACE_CNT,",",GETRACEVALUE("skipPartTrace"))
                    ASSIGN/SKIP_PART=SKIP_PART_TRACE
                    IF/PART_COUNT==SKIP_PART
                      ASSIGN/SER_NO_TRACE=ELEMENT(PART_COUNT,",",GETTRACEVALUE("partSerialNo"))
                      ASSIGN/SER_NO=SER_NO_TRACE
                      IF/GETTRACEVALUE("skipPartReportInfo")=="Yes"
                      END_IF/
                      ASSIGN/SKIP_TRACE_CNT=SKIP_TRACE_CNT+1
                      IF_GOTO/PART_COUNT==SKIP_PART,GOTO = SKIP_PART_L1
                    END_IF/
                    ASSIGN/SER_NO_TRACE=ELEMENT(PART_COUNT,",",GETTRACEVALUE("partSerialNo"))
                    ASSIGN/SER_NO=SER_NO_TRACE
                    IF/X_COUNTER==1
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart1")
                    END_IF/
                    IF/X_COUNTER==2
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart2")
                    END_IF/
                    IF/X_COUNTER==3
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart3")
                    END_IF/
                    IF/X_COUNTER==4
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart4")
                    END_IF/
                    IF/X_COUNTER==5
                      ASSIGN/FIXTURE_X=GETTRACEVALUE("xOffsetPart5")
                    END_IF/
    LOOP_ORIGIN    =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                    NOM/XYZ,<0+0,0+0,0+0>,$
                    MEAS/XYZ,<FIXTURE_X,FIXTURE_Y,0+0>,$
                    NOM/IJK,<0+0,0+0,1+0>,$
                    MEAS/IJK,<0+0,0+0,1+0>
    A2             =ALIGNMENT/START,RECALL:A1,LIST=YES
                      ALIGNMENT/TRANS,XAXIS,LOOP_ORIGIN
                      ALIGNMENT/TRANS,YAXIS,LOOP_ORIGIN
                    ALIGNMENT/END
                    MOVE/CLEARPLANE
    CYL_D6         =FEAT/CONTACT/CYLINDER/ADAPTIVE_CYLINDER_CONCENTRIC_CIRCLE_SCAN,CARTESIAN,IN,LEAST_SQR
                    THEO/<0,0,-1.4>,<0,0,1>,6,14
                    ACTL/<0,0,-1.4>,<0,0,1>,6,14
                    TARG/<0,0,-1.4>,<0,0,1>
                    START ANG=0,END ANG=0
                    ANGLE VEC=<1,0,0>
                    DIRECTION=CCW
                    SHOW FEATURE PARAMETERS=NO
                    SHOW CONTACT PARAMETERS=YES
                      NUMHITS=5,NUMLEVELS=3,DEPTH=0,END OFFSET=0,PITCH=0
                      SAMPLE METHOD=SAMPLE_HITS
                      SAMPLE HITS=0,SPACER=0
                      AVOIDANCE MOVE=NO
                      FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                    SHOW HITS=NO
                  UNTIL/X_COUNTER==X_LOOP_END_COUNT
                UNTIL/Y_COUNTER==Y_LOOP_END_COUNT​
  • Beck's,
    I will take a look at your example and see what the issue is. Currently I am running capability studies on two CMM's, building a routine and fixtures with cad software for another CMM offline and coding. Oh yeah and on the forum. I will reply back with my results asap.