Assigning variables?????

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

  • Assigning variables?????

    I am using 3.5 MR2. I have two diameters(same size) at different heights on a drawn shell. I dimension both diameters out and are good, but there is a note on the print the two diameters must be less than or equal to 1 mm. So I would like to report this with PC-Dimis instead of doing it manually. So, I go to assignment window, and then the expression builder and build what I need and I get the expression value what I need but how do you get that value to show on the report. I am new at this assigning variables stuff, but I have seen several of you have been using it. Thanks for the help. RL.
    Global Status 12-22-10
    Global Performance 9-15-8
    CAD++ 2015.1_SP7

  • #2
    Make a generic feature (circle?) and use your variable in that for the actual.
    Then dim the gen. Feature....
    Kev
    RFS Means Really Fussy Stuff

    When all you have is a hammer - everything looks like a nail....
    sigpic

    Comment


    • #3
      Can you give me more details. An example of what the code would look like. I have never dealt with assigning variables. Thank you.
      Global Status 12-22-10
      Global Performance 9-15-8
      CAD++ 2015.1_SP7

      Comment


      • #4
        Make a generic feature (circle?) and use your variable in that for the actual.
        Then dim the gen. Feature....
        YEP, Thats how I do it......

        Doberman

        Comment


        • #5
          If you don't need it as a feature you can also send it to the report as a text string i.e. comment/rept "Circle Diameter = "+V1
          V1 being the variable that contains the answer you are looking for it comes out looking like
          Circle Diameter = 1.023
          James Temmen

          There is no job so simple that it can't be done wrong.

          Comment


          • #6
            MOVE/CLEARPLANE
            FEAT33_1 =AUTO/CIRCLE, SHOWALLPARAMS=NO, SHOWHITS=NO
            THEO/255.8,-3.495,-0.727,0,0,1,89.551,75.001
            ACTL/255.584,-3.079,-0.727,0,0,1,89.557,75.001
            TARG/255.8,-3.495,-0.727,0,0,1
            MOVE/CLEARPLANE
            FEAT33_2 =AUTO/CIRCLE, SHOWALLPARAMS=NO, SHOWHITS=NO
            THEO/255.8,-3.495,-0.727,0,0,1,102.449
            ACTL/255.604,-3.049,-0.727,0,0,1,102.137
            TARG/255.8,-3.495,-0.727,0,0,1
            MOVE/CLEARPLANE
            PREHIT/ 2
            RETRACT/ 2
            FEAT33_3 =AUTO/CIRCLE, SHOWALLPARAMS=NO, SHOWHITS=NO
            THEO/255.8,927.45,0,0,0,1,102.449
            ACTL/255.077,925.579,0,0,0,1,103.102
            TARG/255.8,927.45,0,0,0,1
            MOVE/CLEARPLANE
            FEAT33_4 =AUTO/CIRCLE, SHOWALLPARAMS=NO, SHOWHITS=NO
            THEO/255.8,927.45,0,0,0,1,89.551,75.001
            ACTL/255.266,925.788,0,0,0,1,89.852,75.001
            TARG/255.8,927.45,0,0,0,1
            ASSIGN/V2 = (FEAT33_1.RADIUS.MEAS+FEAT33_2.RADIUS.MEAS)/2
            FEAT33_5 =GENERIC/CIRCLE,DEPENDENT,RECT,OUT,$
            NOM/XYZ,64,-34.5,-0.003,$
            MEAS/XYZ,64,-34.5,-0.003,$
            NOM/IJK,0,0,-1,$
            MEAS/IJK,0,0,-1,$
            RADIUS/48,V2
            DIM ITEM32_2= LOCATION OF CIRCLE FEAT33_5 UNITS=MM ,$
            GRAPH=OFF TEXT=OFF MULT=1.00 OUTPUT=BOTH
            AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
            R 47.923 48.000 0.000 0.000 -0.077 0.077 <--------
            END OF DIMENSION ITEM32_2
            ASSIGN/V5 = (FEAT33_3.RADIUS.MEAS+FEAT33_4.RADIUS.MEAS)/2
            FEAT33_6 =GENERIC/CIRCLE,DEPENDENT,RECT,OUT,$
            NOM/XYZ,64,-34.5,-0.003,$
            MEAS/XYZ,64,-34.5,-0.003,$
            NOM/IJK,0,0,-1,$
            MEAS/IJK,0,0,-1,$
            RADIUS/48,V5
            DIM ITEM32_3= LOCATION OF CIRCLE FEAT33_6 UNITS=MM ,$
            GRAPH=OFF TEXT=OFF MULT=1.00 OUTPUT=BOTH
            AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
            R 48.238 48.000 0.000 0.000 0.238 0.238 -------->
            END OF DIMENSION ITEM32_3

            Note,
            Please take notice of the _ for the feature names. If you were to use something like this FEAT33-1,PC-DMIS could see this as a subtraction in your assignment. Hence, I always use the _ .


            sigpic

            James Mannes

            Comment


            • #7
              LittleSteve here from Tempel Steel Company, Chicago IL

              Easier said than done. I'm having problems getting the expressions correct. I have four distance dimentions. I'm trying to get the Min of all four dimesions subtracted from the max of all four dimension. I'm having difficulties

              ASSIGN/V1=MAX(dim1,dim2,dim3,dim4)-MIN(dim1,dim2,dim3,dim4)

              The above expression doesn't seem to be accepted by PCDMIS. It returns an error message of invalad expression.

              Can I please get some help with this issue? Calgon take me away.

              Comment


              • #8
                Originally posted by LittleSteve
                LittleSteve here from Tempel Steel Company, Chicago IL

                Easier said than done. I'm having problems getting the expressions correct. I have four distance dimentions. I'm trying to get the Min of all four dimesions subtracted from the max of all four dimension. I'm having difficulties

                ASSIGN/V1=MAX(dim1,dim2,dim3,dim4)-MIN(dim1,dim2,dim3,dim4)

                The above expression doesn't seem to be accepted by PCDMIS. It returns an error message of invalad expression.

                Can I please get some help with this issue? Calgon take me away.
                You neeed to tell PC-DMIS what you want to extract from the dimensions ,
                ASSIGN/V1 = MAX(ARRAY(DIM1.X.MEAS,DIM2.X.MEAS,DIM3.X.MEAS)), and so on.
                Dimension label, period as a seperator, axis, period as a seperator ,What of that axis
                James Temmen

                There is no job so simple that it can't be done wrong.

                Comment


                • #9
                  DIM THRU_1= LOCATION OF POINT TOP_1 UNITS=MM ,$
                  GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                  AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
                  T -0.28 0.00 0.00 0.00 -0.28 0.28 <--------
                  END OF DIMENSION THRU_1
                  DIM THRU_2= LOCATION OF POINT TOP_2 UNITS=MM ,$
                  GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                  AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
                  T -0.26 0.00 0.00 0.00 -0.26 0.26 <--------
                  END OF DIMENSION THRU_2
                  DIM THRU_3= LOCATION OF POINT TOP_3 UNITS=MM ,$
                  GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                  AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
                  T -0.28 0.00 0.00 0.00 -0.28 0.28 <--------
                  END OF DIMENSION THRU_3
                  DIM THRU_4= LOCATION OF POINT TOP_4 UNITS=MM ,$
                  GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                  AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
                  T -0.27 0.00 0.00 0.00 -0.27 0.27 <--------
                  END OF DIMENSION THRU_4
                  DIM THRU_5= LOCATION OF POINT TOP_5 UNITS=MM ,$
                  GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                  AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
                  T -0.25 0.00 0.00 0.00 -0.25 0.25 <--------
                  END OF DIMENSION THRU_5
                  ASSIGN/V1 = ARRAY(THRU_1.T.MEAS,THRU_2.T.MEAS,THRU_3.T.MEAS)
                  ASSIGN/V2 = MAX(V1)
                  ASSIGN/V3 = MIN(V1)
                  COMMENT/REPT,"MAXIMUM PROFILE FOR STATOR IS " + V2
                  COMMENT/REPT,"MINIMUM PROFILE FOR STATOR IS " + V3
                  sigpic

                  James Mannes

                  Comment


                  • #10
                    Originally posted by J Temmen
                    You neeed to tell PC-DMIS what you want to extract from the dimensions ,
                    ASSIGN/V1 = MAX(ARRAY(DIM1.X.MEAS,DIM2.X.MEAS,DIM3.X.MEAS)), and so on.
                    Dimension label, period as a seperator, axis, period as a seperator ,What of that axis
                    WOW! It works!! Thanks James your the Greatest.

                    The four Dimensions are Point to Point Measurements of Constructed Intersection Points/Pierce Points not neccessarilly Parrallel or Perpendicular to any Axis. The Engineering department here needs new Engineers. The Drawing of one specific part I'm measuring was calling for the Total Runout of a Square OD (????) to a Diameter ID. This practice is not even considered Proper Geometric Dimensioning and Tolerancing. The worse argument is that I can not even get the Engineer that drafted the drawing or thier boss to change the drawing to proper Geometric Dimensioning by means of True Posision to the Datum. OOps they did not even specify a Datum.This is so stupid I can't believe I'm actually looking at such a Drawing. This person needs to go back to preschool and learn how to put the balls in the round holes and the cubes in the square holes again. Venting out of embarrasement for even working here. It's time to go home now.

                    Thanks for the help with the expression! In this case your quote is exactly correct.

                    Comment


                    • #11
                      Originally posted by JamesMannes
                      DIM THRU_1= LOCATION OF POINT TOP_1 UNITS=MM ,$
                      GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                      AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
                      T -0.28 0.00 0.00 0.00 -0.28 0.28 <--------
                      END OF DIMENSION THRU_1
                      DIM THRU_2= LOCATION OF POINT TOP_2 UNITS=MM ,$
                      GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                      AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
                      T -0.26 0.00 0.00 0.00 -0.26 0.26 <--------
                      END OF DIMENSION THRU_2
                      DIM THRU_3= LOCATION OF POINT TOP_3 UNITS=MM ,$
                      GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                      AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
                      T -0.28 0.00 0.00 0.00 -0.28 0.28 <--------
                      END OF DIMENSION THRU_3
                      DIM THRU_4= LOCATION OF POINT TOP_4 UNITS=MM ,$
                      GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                      AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
                      T -0.27 0.00 0.00 0.00 -0.27 0.27 <--------
                      END OF DIMENSION THRU_4
                      DIM THRU_5= LOCATION OF POINT TOP_5 UNITS=MM ,$
                      GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
                      AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
                      T -0.25 0.00 0.00 0.00 -0.25 0.25 <--------
                      END OF DIMENSION THRU_5
                      ASSIGN/V1 = ARRAY(THRU_1.T.MEAS,THRU_2.T.MEAS,THRU_3.T.MEAS)
                      ASSIGN/V2 = MAX(V1)
                      ASSIGN/V3 = MIN(V1)
                      COMMENT/REPT,"MAXIMUM PROFILE FOR STATOR IS " + V2
                      COMMENT/REPT,"MINIMUM PROFILE FOR STATOR IS " + V3
                      Hey thanks for your help buddy. The problem is now solved. However I cannot output the results as a COMMENT/REPT. The actual result needs to output as a dimension for a PCDMIS-INFINITY Data Aqusition Utility to transfer the data for further Analysis of Statistical Process Control Charts.

                      Thanks man I'm outta here. Have a great Evening!

                      Comment


                      • #12
                        Originally posted by LittleSteve
                        This person needs to go back to preschool and learn how to put the balls in the round holes and the cubes in the square holes again. Venting out of embarrasement for even working here.
                        Are you telling us your engineers actually went to preschool??!!!!!!!!!!

                        We all vent here. A lot. This is an amazing site to get info, and share knowledge with people in the same predicament as you ( meant to say same job).

                        PS I didn't answer your question as the other answers are what I do.
                        When in doubt, post code. A second set of eyes might see something you missed.
                        sigpic

                        Comment


                        • #13
                          Glad I could help, good luck, it sounds like you need it.
                          James Temmen

                          There is no job so simple that it can't be done wrong.

                          Comment


                          • #14
                            Use the GENERIC FEATURE for with math calculations

                            CIR1 =AUTO/CYLINDER, SHOWALLPARAMS=YES, SHOWHITS=NO
                            THEO/2181.554,389.47,1212.474,-0.2979256,-0.0041595,0.95458,5,0
                            ACTL/2181.554,389.47,1212.474,-0.2979256,-0.0041595,0.95458,5,2
                            TARG/2181.554,389.47,1212.474,-0.2979256,-0.0041595,0.95458
                            THEO_THICKNESS = 0, RECT, IN, STRAIGHT, LEAST_SQR, ONERROR = NO ,$
                            AUTO MOVE = YES, DISTANCE = 10, RMEAS = None, READ POS = NO, FIND HOLE = CENTER, REMEASURE = NO, USE THEO = YES ,$
                            NUMHITS = 3, NUMROWS = 2, INIT = 3, PERM = 3, SPACER = 1, PITCH = 0 ,$
                            START ANG = 0, END ANG = 360, DEPTH = 1 ,$
                            ANGLE VEC = 0,-1,0

                            CIR1_NOMINAL =GENERIC/CIRCLE,DEPENDENT,RECT,IN,$
                            NOM/XYZ,2179.599+0,387.999+0,1217.299+0,$
                            MEAS/XYZ,2179.599+0,387.999+0,1217.299+0,$
                            NOM/IJK,0.295,0,-0.955,$
                            MEAS/IJK,0.295,0,-0.955,$
                            DIAMETER/5+0,5+0

                            CIR1_GEN =GENERIC/CIRCLE,DEPENDENT,RECT,IN,$
                            NOM/XYZ,CIR1_NOMINAL .X,CIR1_NOMINAL,CIR1_NOMINAL .Y,CIR1_NOMINAL .Z,$
                            MEAS/XYZ,CIR1.X,CIR1.Y,CIR1.Z,$
                            NOM/IJK,CIR1_NOMINAL .I,CIR1_NOMINAL .J,CIR1_NOMINAL .K,$
                            MEAS/IJK,CIR1.I,CIR1.J,CIR1.K,$
                            DIAMETER/CIR1_NOMINAL .D,CIR1.D
                            If everybody focused on the more inportant things in life, there would be a shortage of fishing poles!

                            Comment


                            • #15
                              Thanks again for the help, I got it to work.
                              Global Status 12-22-10
                              Global Performance 9-15-8
                              CAD++ 2015.1_SP7

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X