expressions and variables

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

  • expressions and variables

    Okay, I've been avoiding this long enough, I need to learn to calculate and report a value using the value from measured feature in one axis and then applying a formula to that value (ie + or - material thickness) I would like to be able to enter the value for the material thickness. I have no clue where to start. If any of you have time, I would like a step by step procedure. these are the steps I need:
    • Create a variable which uses a value entered by the operator
      Create a variable using the measured value for one axis of a feature
      Create a formula which adds or subtracts one variable from the other
      Output the result in the report page as a measured dimension

    TIA
    Jonathan S
    pcdmis 2009
    G&L CORDAX RS-150 DCC
    B&S global 15-30-10
    DEA Delta Slant 30-100-15

  • #2
    5 similar threads on variables, have you checked those first
    See below.
    Links to my utilities for PCDMIS

    Comment


    • #3
      I know how you feel, but there comes a time in every young programmers life.... No really - it's not that hard!!

      STEP 1 - Measure your feature...


      PLN1 =AUTO/PLANE,SHOWALLPARAMS = YES,SHOWHITS = NO
      THEO/0,0,5,0,0,1
      ACTL/0,0,5,0,0,1
      TARG/0,0,5,0,0,1
      THEO_THICKNESS = 0,RECT,TRIANGLE,$
      AUTO MOVE = NO,DISTANCE = 0,RMEAS = None,None,None,$
      NUMHITS = 2,NUMROWS = 2,SPACER = 10,SQUARE,$
      ANGLE VEC = 1,0,0


      then assign a variable name to axis value that you want to use.

      ASSIGN/ZAXIS_VAL = PLN1.Z

      Step 2 - Use an input comment to collect a value from the operator...

      CMT1 =COMMENT/INPUT,NO,'Please enter material thickness'

      then assign a variable name to the comment input.

      ASSIGN/MAT_THICK = CMT1.INPUT

      Step 3 - Use the variable names in a formula and assign a variable name to the result of your formula.

      ASSIGN/FORMULA1 = ZAXIS_VAL-MAT_THICK

      Step 4 - Create a generic feature using the variable name as a measured value...

      FEAT1 =GENERIC/NONE,DEPENDENT,RECT,OUT,$
      NOM/XYZ,0,0,4,$
      MEAS/XYZ,0,0,FORMULA1,$
      NOM/IJK,0,0,1,$
      MEAS/IJK,0,0,1,$
      RADIUS/0,0,$
      ANGLE/0,0,$
      DISTANCE/0,0


      then dimension your generic feature in the usual way.

      DIM DIM1= LOCATION OF PLANE FEAT1 UNITS=MM ,$
      GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
      AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
      Z 4.500 4.000 0.000 0.000 0.500 0.500 -------->
      END OF DIMENSION DIM1


      Ta da!!

      Comment


      • #4
        If you are trying to adjust a thickness on a measured point by hand entered thickness, this is another option.

        C1 =COMMENT/INPUT,NO,'Metal thickness?'
        ASSIGN/V1 = C1.INPUT*-1
        PNT1 =AUTO/VECTOR POINT,SHOWALLPARAMS = YES
        THEO/1284.422,-670.349,95.2,0,0,1
        ACTL/1284.422,-670.349,95.2,0,0,1
        TARG/1284.422,-670.349,93.2,0,0,1
        ACTL_THICKNESS = V1,RECT,SNAP = NO,$
        AUTO MOVE = BOTH,DISTANCE = 3
        DIM D1= LOCATION OF POINT PNT1 UNITS=MM ,$
        GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
        AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
        X 1284.422 0.000 0.000 1284.422 0.000 0.000 ----#----
        Y -670.349 0.000 0.000 -670.349 0.000 0.000 ----#----
        Z 95.200 0.000 0.000 95.200 0.000 0.000 ----#----
        T 0.000 0.000 0.000 0.000 0.000 0.000 ----#----
        END OF DIMENSION D1


        Note, to get the nominals to change, you would need to change the ACT thickness of the point to THEO.

        The number that comes with the feature is replaced by the variable in the edit window, not the autofeature window.


        Just another perspective.
        http://baggy3.info/signani3.gif
        Excercise your mind,..... muscle works better than fat!!

        Comment


        • #5
          Thanks
          Jonathan S
          pcdmis 2009
          G&L CORDAX RS-150 DCC
          B&S global 15-30-10
          DEA Delta Slant 30-100-15

          Comment

          Related Topics

          Collapse

          Working...
          X