Loop output values

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Loop output values

    I am running PCDMIS 2011 (soon to be MR1) and am having trouble with a loop expression in a program i wrote to check the blades on a nozzle ring (like a turbo compressor wheel). I am given the blade angle from a line created from an offset from a bolt hole. I ended up trigging out the resultant coordinates in X and Y and offset my origin to them while rotating to the given angle. The print asks for points based on 40 coordinates based on the centerline of the blade and the intersection point of the line created by the offset from the bolt hole. Here is a section of the print.
    Problem.jpg
    Long story short, my loop measures the blades with no problem but the X and Y values reported are based on the center of the part rather than my offset origin on all but the first instance of the loop. Here is a section of the working code i just wrote up real fast. As i said before.. itw orks but after the loop outputs numbers based on the center of the part rather than the origin created in "Detail B" . I need another way to do this or some help fixing whatever im doing wrong. BTW Paste with pattern crashes PCDMIS hard with this many features (722 all with XYZ coordinates)

    Code:
    ~~~~~~~~~~~~~~~~~~~ SHORTENED TO FIT POST ~~~~~~~~~~~~~~~~~~~~~
    NOZZLE FACE=FEAT/PLANE,CARTESIAN,TRIANGLE,NO
                THEO/<0,0,0.159>,<0,0,1>
                ACTL/<-0.0002,0.0002,0.1607>,<-0.0000049,-0.0000295,1>
                CONSTR/PLANE,BFRE,PNT20,PNT21,PNT22,PNT23,PNT24,PNT25,PNT26,PNT27,PNT28,PNT29,PNT30,PNT31,PNT32,PNT33,PNT34,PNT35,PNT36,PNT37,PNT38,,
                OUTLIER_REMOVAL/OFF,3
                FILTER/OFF,WAVELENGTH=0
    DIM NOZZLE HEIGHT= LOCATION OF PLANE NOZZLE FACE  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX       MEAS    NOMINAL       +TOL       -TOL        DEV     OUTTOL
    Z       0.1607     0.1590     0.0010     0.0010     0.0017     0.0007 -------->
    FL      0.0011     0.0000     0.0000     0.0000     0.0011     0.0011 -------->
    END OF DIMENSION NOZZLE HEIGHT
               =LOOP/START,ID=YES,NUMBER=19,START=1,SKIP=,
                  OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=18.9474
                PREHIT/0.025
                RETRACT/0.025
    A3         =ALIGNMENT/START,RECALL:A2,LIST=YES
                ALIGNMENT/LEVEL,ZPLUS,NOZZLE BASE
                ALIGNMENT/TRANS,XAXIS,PART ID
                ALIGNMENT/TRANS_OFFSET,XAXIS,0.641
                ALIGNMENT/TRANS,YAXIS,PART ID
                ALIGNMENT/TRANS_OFFSET,YAXIS,1.868
                ALIGNMENT/TRANS,ZAXIS,NOZZLE BASE
                ALIGNMENT/ROTATE_OFFSET,42.1323,ABOUT,ZPLUS
                ALIGNMENT/TRANS_OFFSET,YAXIS,-0.608
                ALIGNMENT/END
                MOVE/CLEARPLANE
    PNT_1      =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
                THEO/<0,0,0.0795>,<0,-1,0>
                ACTL/<0,0.0217,0.0795>,<0,-1,0>
                TARG/<0,0,0.0795>,<0,-1,0>
                SNAP=YES
                REPORT VEC=<-0.0007974,-0.0032626,0.9999944>,UPDATE VEC=<0,0,1>
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=YES
                  AVOIDANCE MOVE=NO,DISTANCE=0.1
                SHOW HITS=NO
                MOVE/CLEARPLANE
    PNT_2      =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
                THEO/<0.0083,0.05,0.0795>,<0.9868267,-0.1617812,0>
                ACTL/<0.0055,0.0505,0.0795>,<0.9868267,-0.1617812,0>
                TARG/<0.0083,0.05,0.0795>,<0.9868267,-0.1617812,0>
                SNAP=YES
                REPORT VEC=<0.0031666,-0.0011195,0.9999944>,UPDATE VEC=<0,0,1>
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=YES
                  AVOIDANCE MOVE=NO,DISTANCE=0.1
                SHOW HITS=NO
                MOVE/CLEARPLANE
    PNT_3      =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
                THEO/<0.0167,0.1,0.0795>,<0.9868267,-0.1617812,0>
                ACTL/<0.0137,0.1005,0.0795>,<0.9868267,-0.1617812,0>
                TARG/<0.0167,0.1,0.0795>,<0.9868267,-0.1617812,0>
                SNAP=YES
                REPORT VEC=<0.0031666,-0.0011195,0.9999944>,UPDATE VEC=<0,0,1>
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=YES
                  AVOIDANCE MOVE=NO,DISTANCE=0.1
                SHOW HITS=NO
                MOVE/CLEARPLANE
    PNT_4      =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
                THEO/<0.025,0.15,0.0795>,<0.9868267,-0.1617812,0>
                ACTL/<0.0216,0.1506,0.0795>,<0.9868267,-0.1617812,0>
                TARG/<0.025,0.15,0.0795>,<0.9868267,-0.1617812,0>
                SNAP=YES
                REPORT VEC=<0.0031666,-0.0011195,0.9999944>,UPDATE VEC=<0,0,1>
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=YES
                  AVOIDANCE MOVE=NO,DISTANCE=0.1
                SHOW HITS=NO
                MOVE/CLEARPLANE
    PNT_5      =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
                THEO/<0.0334,0.2,0.0795>,<0.9868267,-0.1617812,0>
                ACTL/<0.0298,0.2006,0.0795>,<0.9868267,-0.1617812,0>
                TARG/<0.0334,0.2,0.0795>,<0.9868267,-0.1617812,0>
                SNAP=YES
                REPORT VEC=<0.0031666,-0.0011195,0.9999944>,UPDATE VEC=<0,0,1>
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=YES
                  AVOIDANCE MOVE=NO,DISTANCE=0.1
                SHOW HITS=NO
                MOVE/CLEARPLANE
    PNT_6      =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
                THEO/<0.0417,0.25,0.0795>,<0.9868267,-0.1617812,0>
                ACTL/<0.0387,0.2505,0.0795>,<0.9868267,-0.1617812,0>
                TARG/<0.0417,0.25,0.0795>,<0.9868267,-0.1617812,0>
                SNAP=YES
                REPORT VEC=<0.0031666,-0.0011195,0.9999944>,UPDATE VEC=<0,0,1>
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=YES
                  AVOIDANCE MOVE=NO,DISTANCE=0.1
                SHOW HITS=NO
                MOVE/CLEARPLANE
    DIM POINT_1= LOCATION OF POINT PNT_1  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX       MEAS    NOMINAL       +TOL       -TOL        DEV     OUTTOL
    X       0.0000     0.0000     0.0020     0.0020     0.0000     0.0000 ----#----
    Y       0.0217     0.0000     0.0000     0.0000     0.0217     0.0217 -------->
    Z       0.0795     0.0795     0.0000     0.0000     0.0000     0.0000 #--------
    T      -0.0217     0.0000     0.0000     0.0000    -0.0217    -0.0217 <--------
    END OF DIMENSION POINT_1
    DIM POINT_2= LOCATION OF POINT PNT_2  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX       MEAS    NOMINAL       +TOL       -TOL        DEV     OUTTOL
    X       0.0055     0.0083     0.0020     0.0020    -0.0028    -0.0008 <--------
    Y       0.0505     0.0500     0.0000     0.0000     0.0005     0.0005 -------->
    Z       0.0795     0.0795     0.0000     0.0000     0.0000     0.0000 #--------
    T      -0.0028     0.0000     0.0000     0.0000    -0.0028    -0.0028 <--------
    END OF DIMENSION POINT_2
    DIM POINT_3= LOCATION OF POINT PNT_3  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX       MEAS    NOMINAL       +TOL       -TOL        DEV     OUTTOL
    X       0.0137     0.0167     0.0020     0.0020    -0.0030    -0.0010 <--------
    Y       0.1005     0.1000     0.0000     0.0000     0.0005     0.0005 -------->
    Z       0.0795     0.0795     0.0000     0.0000     0.0000     0.0000 #--------
    T      -0.0031     0.0000     0.0000     0.0000    -0.0031    -0.0031 <--------
    END OF DIMENSION POINT_3
    DIM POINT_4= LOCATION OF POINT PNT_4  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX       MEAS    NOMINAL       +TOL       -TOL        DEV     OUTTOL
    X       0.0216     0.0250     0.0020     0.0020    -0.0034    -0.0014 <--------
    Y       0.1506     0.1500     0.0000     0.0000     0.0006     0.0006 -------->
    Z       0.0795     0.0795     0.0000     0.0000     0.0000     0.0000 #--------
    T      -0.0034     0.0000     0.0000     0.0000    -0.0034    -0.0034 <--------
    END OF DIMENSION POINT_4
    DIM POINT_5= LOCATION OF POINT PNT_5  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX       MEAS    NOMINAL       +TOL       -TOL        DEV     OUTTOL
    X       0.0298     0.0334     0.0020     0.0020    -0.0036    -0.0016 <--------
    Y       0.2006     0.2000     0.0000     0.0000     0.0006     0.0006 -------->
    Z       0.0795     0.0795     0.0000     0.0000     0.0000     0.0000 #--------
    T      -0.0036     0.0000     0.0000     0.0000    -0.0036    -0.0036 <--------
    END OF DIMENSION POINT_5
    DIM POINT_6= LOCATION OF POINT PNT_6  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX       MEAS    NOMINAL       +TOL       -TOL        DEV     OUTTOL
    X       0.0387     0.0417     0.0020     0.0020    -0.0030    -0.0010 <--------
    Y       0.2505     0.2500     0.0000     0.0000     0.0005     0.0005 -------->
    Z       0.0795     0.0795     0.0000     0.0000     0.0000     0.0000 #--------
    T      -0.0031     0.0000     0.0000     0.0000    -0.0031    -0.0031 <--------
    END OF DIMENSION POINT_6
    ~~~~~~~~~~~~~~~~~~~ SHORTENED TO FIT POST ~~~~~~~~~~~~~~~~~~~~~
    
                LOOP/END
                COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                Please Edit Comment Text!

  • #2
    In your loop, After you measure feature, recall alignment you want to relate values to, output to report, recall align for loop, end loop?

    B&S CHAMELEON/PCDMIS CAD++ V2011

    There are no bugs, only "UNDOCUMENTED ENHANCEMENTS!"

    sigpic

    Comment


    • #3
      Thanks I tried that just now too but it had the same results. I also tried writing a program with a full separate alignment in the loop, including all aligned features. On monday ill give it another go. Maybe i did something wrong still since im all frustrated.

      Comment


      • #4
        Enjoy the weekend and rest up to fight PCDMIS next week.

        B&S CHAMELEON/PCDMIS CAD++ V2011

        There are no bugs, only "UNDOCUMENTED ENHANCEMENTS!"

        sigpic

        Comment


        • #5
          I think you might save the alignment as an external and recall at the proper point, I'm think'in that'll lock it in for you. Pretty sure it won't lose it thru the loop start / end.

          TK
          sigpicHave a homebrew

          Comment


          • #6
            I still havent been able to figure this one out. I realized though that it is not reporting from the previous alignment. Its actually reporting from the correct alignment but not rotating nominals with the loop. Its just trigging out the new nominals based on the original alignment before the loop rotation.

            Comment


            • #7
              I don’t know what A2 is, and leveled to NOZZLE BASE in A3 got me confused. Anyway, based on the picture and the code, I would create a complete alignment from center of the part before the loop, this is called “active alignment” preceding the loop.

              Use keyword “USE_ACTIVE_ALIGNMENT” and rotation inside the loop instead of in looping command, and then translate from there.

              It looks something like this:
              Code:
                          PREHIT/0.025
                          RETRACT/0.025
              [COLOR="#0000CD"]A2       (from center of the part)[/COLOR]
                         =LOOP/START,ID=YES,NUMBER=19,START=1,SKIP=,
                           OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=[COLOR="#FF0000"]0[/COLOR] 
              A3       =ALIGNMENT/START,RECALL:[COLOR="#FF0000"]USE_ACTIVE_ALIGNMENT[/COLOR],LIST=YES
                          ALIGNMENT/ROTATE_OFFSET,[COLOR="#FF0000"]18.9474[/COLOR],ZPLUS
                          ALIGNMENT/END
              [COLOR="#0000FF"]A4       =ALIGNMENT/START,RECALL:A3,LIST=YES
                          ALIGNMENT/TRANS_OFFSET,XAXIS,0.641
                          ALIGNMENT/TRANS_OFFSET,YAXIS,1.868
                          ALIGNMENT/ROTATE_OFFSET,42.1323,ABOUT,ZPLUS
                          ALIGNMENT/TRANS_OFFSET,YAXIS,-0.608
                          ALIGNMENT/END[/COLOR]
              (Not sure if it’ll work)

              Comment


              • #8
                The level in A3 to "NOZZLE BASE" was just redundancy. A2 was basically just my setup alignment in DCC. It established 0,0,0 and the centerline using the offset given in the print. A3 offset my origin to the base of blade 1 with Y rotated to the center of the blade. I really didnt need to level or origin Z again but its just force of habbit.
                I will definetly give your suggestion a shot this afternoon. Im at the point where im considering just creating each blade 1 at a time

                Comment

                Related Topics

                Collapse

                Working...
                X