Reporting measured dimensions average

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

  • Reporting measured dimensions average

    I cannot remember how to report the average dimension (toleranced) for three measured dimensions. Any help would be greatly appreciated.
    sigpic:mad:

  • #2
    Code:
    ASSIGN/V6=(SUM(ARRAY(1,2,3)))/3
    Replace 1,2,3 with the dimension info.
    "This is my word... and as such is beyond contestation."

    Comment


    • #3
      Originally posted by boats179 View Post
      i cannot remember how to report the average dimension (toleranced) for three measured dimensions. Any help would be greatly appreciated.
      Code:
      DIM LOC10= LOCATION OF POINT PNT15  UNITS=MM ,$
      GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=NONE  HALF ANGLE=NO
      AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL        MAX        MIN
      PR       9.150      0.250      0.250      9.154      0.004      0.000      9.154      9.154 #
      END OF DIMENSION LOC10
      DIM LOC11= LOCATION OF POINT PNT16  UNITS=MM ,$
      GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=NONE  HALF ANGLE=NO
      AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL        MAX        MIN
      PR       9.150      0.250      0.250      9.155      0.005      0.000      9.155      9.155 #
      END OF DIMENSION LOC11
      DIM LOC12= LOCATION OF POINT PNT17  UNITS=MM ,$
      GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=NONE  HALF ANGLE=NO
      AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL        MAX        MIN
      PR       9.150      0.250      0.250      9.155      0.005      0.000      9.155      9.155 #
      END OF DIMENSION LOC12
      
      ASSIGN/V16=(LOC10.PR.MEAS+LOC11.PR.MEAS+LOC12.PR.MEAS)/3
      
      RAD_1     =GENERIC/CIRCLE,DEPENDENT,CARTESIAN,OUT,$
                  NOM/XYZ,<V11,V11,V11>,$
                  MEAS/XYZ,<V11,V11,V11>,$
                  NOM/IJK,<V12,V11,V11>,$
                  MEAS/IJK,<V12,V11,V11>,$
                  RADIUS/9.15,V16
      This code places the average Polar Radius value of the 3 measured values into a Generic Circle. Then just dimension the generic circle radius, the dimension you get is the average of the 3. V11=0, V12=1, note the outputs are set to none in the dims. HTH.
      Last edited by Liambo734; 08-01-2014, 05:40 AM.
      3.7mr3CAD++ / 2011mr1CAD++/2012mr1CAD++/QUINDOS7

      Comment


      • #4
        VinniUSMC, could you possibly expand your code example a bit such as Liambo734's?

        Thank you !

        Originally posted by VinniUSMC View Post
        Code:
        ASSIGN/V6=(SUM(ARRAY(1,2,3)))/3
        Replace 1,2,3 with the dimension info.

        Comment


        • #5
          April,

          Yes, I meant to expand on it, but I got pulled away while I was working on it. I figured I would leave it and someone would do that part for me. lol

          Different dimension types will require slightly different textual input for the array. Of course, this also assumes that the nominal for all 3 is the same. This is finding and reporting the average of 3 distance dimensions.

          Code:
          ASSIGN/V6=SUM(ARRAY(SHORT1.MEAS,SHORT2.MEAS,SHORT3.MEAS))/3
          S_AVE      =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/SHORT1.NOM,V6
          DIM SHORT_AVE= LOCATION OF CIRCLE S_AVE  UNITS=MM ,$
          GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
          AX       MEAS    NOMINAL       +TOL       -TOL        DEV     OUTTOL
          D      361.933    361.929      0.050      0.050      0.004      0.000 ----#----
          END OF DIMENSION SHORT_AVE
          Last edited by VinniUSMC; 08-01-2014, 09:06 AM.
          "This is my word... and as such is beyond contestation."

          Comment


          • #6
            DIM [email protected]= 2D DISTANCE FROM POINT PNT23 TO POINT PNT19 PAR TO POINT PNT19,NO_RADIUS UNITS=IN,$
            GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
            AX NOMINAL +TOL -TOL MEAS DEV OUTTOL MAX MIN
            M 5.36705 0.00000 0.00000 5.33983 -0.02722 0.02722 5.33983 5.33983 <--------

            DIM [email protected]= 2D DISTANCE FROM POINT PNT22 TO POINT PNT18 PAR TO POINT PNT18,NO_RADIUS UNITS=IN,$
            GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
            AX NOMINAL +TOL -TOL MEAS DEV OUTTOL MAX MIN
            M 5.11050 0.00000 0.00000 5.16362 0.05312 0.05312 5.16362 5.16362 -------->

            ASSIGN/V3=(SUM(ARRAY([email protected][email protected] )))/2
            ASSIGN/V3=([email protected][email protected]) /2
            ASSIGN/V3=(SUM(ARRAY([email protected][email protected] R.MEAS)))/2
            ASSIGN/V3=(SUM(ARRAY([email protected],[email protected] )))/2


            Can someone please tell me how to average the 2 dimensions shown above? I have tried as lain out above, and my variable stays red, telling me I'm doing something wrong here.
            Appreciate any help...
            Last edited by brianparker; 11-21-2019, 04:37 PM.
            Brown and Sharpe Mistral---B&S Micro Excel
            PH10M / TP20
            PHC10-2
            PCDMIS MR1 2009 --- PCDMIS 2012MR1 Cad++

            Comment


            • louisd
              louisd commented
              Editing a comment
              axe the at @ symbols. it's not valid to use for feature ID's. LETTERS_NUMB3RS_UNDERSCORES_ONLY

          • #7
            It looks like your parenthesis are off, format it like my example below.

            I would do something like this to find the average between two dimensions

            Code:
                        ASSIGN/V1=AVERAGE(ARRAY(DIM1.MEAS, DIM2.MEAS))

            Comment


            • #8
              Originally posted by CodeWarrior View Post
              It looks like your parenthesis are off, format it like my example below.

              I would do something like this to find the average between two dimensions

              Code:
               ASSIGN/V1=AVERAGE(ARRAY(DIM1.MEAS, DIM2.MEAS))
              Average is in the assignments functions since a few years (2017 or 2018 ?)

              Comment


              • #9
                I'm not sure. I was going to check in 2011 MR1, but I can't get it to open currently

                Comment


                • #10
                  The @ removal, and the "average" worked, thanks!

                  ASSIGN/V3=AVERAGE(ARRAY(LIP_OD_WIDTH.MEAS,SNAP_ID_WIDTH.M EAS))

                  Now, how do I get this V3 to report out as a dimension?
                  Last edited by brianparker; 11-22-2019, 10:55 AM.
                  Brown and Sharpe Mistral---B&S Micro Excel
                  PH10M / TP20
                  PHC10-2
                  PCDMIS MR1 2009 --- PCDMIS 2012MR1 Cad++

                  Comment


                  • brianparker
                    brianparker commented
                    Editing a comment
                    Edited post, thanks Rider, had skimmed over @loisd's comment above,, thanks to both

                  • louisd
                    louisd commented
                    Editing a comment
                    Construct a generic point. use +0 at the end of each theo and meas value (except for the axis you put the reference to V3 within).
                    Dimension the axis location of that generic point, where you placed V3.

                  • brianparker
                    brianparker commented
                    Editing a comment
                    Can I get an example when you have time please?

                    ASSIGN/V3=AVERAGE(ARRAY(LIP_OD_WIDTH.MEAS,SNAP_ID_WIDTH.M EAS))

                • #11
                  Code:
                  Assign/V7=0
                  ASSIGN/V3=AVERAGE(ARRAY(LIP_OD_WIDTH.MEAS,SNAP_ID_WIDTH.M EAS))
                  
                  [B]SHLDR22_1 [/B]=GENERIC/POINT,DEPENDENT,CARTESIAN,$
                      NOM/XYZ,<V7,[B]0.300+0[/B],V7>,$ <--------[B]0.300+0[/B] is the nominal value for your average of the V3 assignment, for Y axis.
                      MEAS/XYZ,<V7,[B]V3[/B],V7>,$        <--------[B]V3[/B] is your measured value, in Y axis.
                      NOM/IJK,<V7,-1,V7>,$
                      MEAS/IJK,<V7,-1,V7>
                  
                  [B]DIM DIST_AF_1[/B]= LOCATION OF POINT [B]SHLDR22_1[/B] UNITS=IN ,$
                      GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO
                      AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
                      Y 0.3000 0.0050 0.0020 0.3012 0.0000 0.0000 --#------
                      END OF DIMENSION DIST_AF_1
                  Last edited by louisd; 11-22-2019, 12:52 PM.

                  Comment


                  • #12
                    Appreciate the time on this, I am getting zero on my "Meas" reporting dimension. Believe I'm following correctly, see anything wrong with the below?
                    Been wanting to get to this forever, seems like there would be an easier way to go about calculations output as dims to me. :-/ time and advice from all very much appreciated.

                    ASSIGN/V1=0
                    ASSIGN/V2=AVERAGE(ARRAY(SNAP_ID_UL_LR.MEAS,SNAP_ID_UR_LL. MEAS))



                    F1 =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                    NOM/XYZ,<V1,7.283+0,V1>,$
                    MEAS/XYZ,<V1,V2,V1>,$
                    NOM/IJK,<V1,-1,V1>,$
                    MEAS/IJK,<V1,-1,V1>

                    DIM SNAP_ID_AVERAGE= LOCATION OF POINT F1 UNITS=IN ,$
                    GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO
                    AX NOMINAL____+TOL____-TOL_____MEAS_______DEV______ OUTTOL_____ MAX_____ MIN
                    Y 7.28300______0.00000___0.00000___0.00000___ -7.28300____ 7.28300_____ 0.00000___ 0.00000 <--------
                    END OF DIMENSION SNAP_ID_AVERAGE
                    Last edited by brianparker; 11-22-2019, 12:50 PM.
                    Brown and Sharpe Mistral---B&S Micro Excel
                    PH10M / TP20
                    PHC10-2
                    PCDMIS MR1 2009 --- PCDMIS 2012MR1 Cad++

                    Comment


                    • louisd
                      louisd commented
                      Editing a comment
                      what types of dimensions are SNAP_ID_UL_LR and SNAP_ID_UR_LL?
                      if you see in the dim above in green, there's the Y value output. in order to reference this dimension as a value within an assign you'd have to define the Y axis. example: SNAP_ID_AVERAGE.Y.MEAS would equal the MEAS Y value of that dimension (0 at the moment, lol).

                      so if you have a distance measurement for SNAP_ID_UL_LR and SNAP_ID_UR_LL, there should be an "M" referenced within the assign
                      SNAP_ID_UL_LR.M.MEAS and SNAP_ID_UR_LL.M.MEAS

                      If it's a location in X replace the .M. with .X. and so forth (.D. for diameter, .PR. for polar radius, .A. for angle....)

                    • brianparker
                      brianparker commented
                      Editing a comment
                      It is a distance measurement. Added the M, still comes up to V2=0 when hovering, and the Dim still comes up to 0 when executed.

                    • louisd
                      louisd commented
                      Editing a comment
                      are you executing the whole routine? try that first. if still no-workey, please post more related code.

                  • #13
                    Will do, techs are now on the CMM, will get back on Monday,, appreciate the time very much!
                    Brown and Sharpe Mistral---B&S Micro Excel
                    PH10M / TP20
                    PHC10-2
                    PCDMIS MR1 2009 --- PCDMIS 2012MR1 Cad++

                    Comment


                    • #14
                      DIM SNAP_ID_UL_LR= 2D DISTANCE FROM POINT PNT16 TO POINT PNT12 PAR TO POINT PNT12,NO_RADIUS UNITS=IN,$
                      GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                      AX NOMINAL +TOL -TOL MEAS DEV OUTTOL MAX MIN
                      M 7.36847 0.00000 0.00000 7.35406 -0.01441 0.01441 7.35406 7.35406 <--------
                      DIM SNAP_ID_UR_LL= 2D DISTANCE FROM POINT PNT9 TO POINT PNT13 PAR TO POINT PNT13,NO_RADIUS UNITS=IN,$
                      GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                      AX NOMINAL +TOL -TOL MEAS DEV OUTTOL MAX MIN
                      M 7.21649 0.00000 0.00000 7.19377 -0.02273 0.02273 7.19377 7.19377 <--------

                      Above are the two dims trying to average,,,executed program, still zero on the dimension output

                      ASSIGN/V1=0
                      ASSIGN/V2=AVERAGE(ARRAY(SNAP_ID_UL_LR.M.MEAS,SNAP_ID_UR_L L.M.MEAS))
                      ASSIGN/V3=AVERAGE(ARRAY(LIP_OD_UL_LR.M.MEAS,LIP_OD_UR_LL. M.MEAS))
                      STATS/TRANSFER,DIRECTORY=C:\SPCDATA
                      F1 =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                      NOM/XYZ,<V1,7.283+0,V1>,$
                      MEAS/XYZ,<V1,V2,V1>,$
                      NOM/IJK,<V1,-1,V1>,$
                      MEAS/IJK,<V1,-1,V1>
                      DIM SNAP_ID_AVERAGE= LOCATION OF POINT F1 UNITS=IN ,$
                      GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO
                      AX NOMINAL +TOL -TOL MEAS DEV OUTTOL MAX MIN
                      Y 7.28300 0.00000 0.00000 0.00000 -7.28300 7.28300 0.00000 0.00000 <--------
                      END OF DIMENSION SNAP_ID_AVERAGE

                      Brown and Sharpe Mistral---B&S Micro Excel
                      PH10M / TP20
                      PHC10-2
                      PCDMIS MR1 2009 --- PCDMIS 2012MR1 Cad++

                      Comment


                      • louisd
                        louisd commented
                        Editing a comment
                        I see your profile says you are using 2009 and 2012, which doesn't know the command AVERAGE. we need to change the formula to something without that (later-revision) syntax.

                        ASSIGN/V2=sum(SNAP_ID_UL_LR.M.MEAS+SNAP_ID_UR_L L.M.MEAS)/2
                        ASSIGN/V3=sum(LIP_OD_UL_LR.M.MEAS+LIP_OD_UR_LL. M.MEAS)/2

                        should work. sorry, i figured you saw JEFMAN comment above about AVERAGE being new (2018-2019), and were using more recent release.

                      • AndersI
                        AndersI commented
                        Editing a comment
                        Or you could define an AVERAGE function for two arguments:

                        ASSIGN/AVG=FUNCTION((X, Y), (X+Y)/2)

                        (I couldn't call it AVERAGE in 2019 R2, as that is a reserved word)

                    • #15

                      "louisd commented
                      11-22-2019, 04:00 PM
                      I see your profile says you are using 2009 and 2012, which doesn't know the command AVERAGE. we need to change the formula to something without that (later-revision) syntax.

                      ASSIGN/V2=sum(SNAP_ID_UL_LR.M.MEAS+SNAP_ID_UR_L L.M.MEAS)/2
                      ASSIGN/V3=sum(LIP_OD_UL_LR.M.MEAS+LIP_OD_UR_LL. M.MEAS)/2

                      should work. sorry, i figured you saw JEFMAN comment above about AVERAGE being new (2018-2019), and were using more recent release."


                      Worked! Appreciate all the help guys,,,Got it working on the 2013 (was listed as 2012) , we have updated other unit, so now 2019,,,will be giving that one a try soon as well, Thanks for all the help!
                      Brown and Sharpe Mistral---B&S Micro Excel
                      PH10M / TP20
                      PHC10-2
                      PCDMIS MR1 2009 --- PCDMIS 2012MR1 Cad++

                      Comment

                      widgetinstance 190 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                      Working...
                      X