Logic

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

  • Logic

    Hey guys I was wondering if anyone had a quick line of code they could throw my way
    for dmis to re-run a feature if it was out of tolerance.

    Was thinking about adding it to my A0B0 calibration if it read anything above .0002
    To automatically just re-run that tool until it got within the 0.000-.0002 range.
    Also to add it to certain programs that if it read it out as it was measuring that it would
    at least ask if i wanted to re-measure because it was out.

    Thanks

  • #2
    I would try something like this :

    Code:
    ASSIGN/V1=0
    DO/
    IF V1>0
    COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
                    CLEAN THE TIP AND THE SPHERE !
    END IF/
    AUTOCALIBRATE/PROBE, PARAMETER_SET=A0B0, QUALTOOL_MOVED=NO,
            SHOW_SUMMARY=NO, OVERWRITE_RESULTSFILE=NO
    ASSIGN/V2=PROBEDATA("STANDARDDEVIATION")
    ASSIGN/V1=V1+1
    UNTIL/V2<0.0002

    Comment


    • Ekneel28@gmail.com
      [email protected] commented
      Editing a comment
      Do you happen to know the format used for using dimensioning box data?
      Example: Like I take a circle then dimension that circle with tolerance.
      say I named the dimensioned circle "whatever"
      How can I write it out to prompt me if I want to re-meas the circle if the deviation box is triggered?
      I've exhausted all my ideas on the logic.

  • #3
    JEFMAN Thank you! I will give this a try today.

    Comment


    • #4
      So what do u want to do, if the dimension is out to tolerance, go calibrate the probe?

      i would create a parameter set in the beginning of the program and calibrate the probe, then measure and dimension the feature. If the feature is out of tolerance, go re calibrate the probe, re measure the part and if it’s still out of tolerance, end the program

      Comment


      • Ekneel28@gmail.com
        [email protected] commented
        Editing a comment
        I want it to prompt me that if a dimension is out of tolerance then ask if I want to re-measure it.
        No re-calibration.

    • #5
      try this

      Code:
      MEASURE_CIR_1=LABEL/
      CIR_1      =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
                  THEO/<0,0,0>,<0,0,1>,2,0
                  ACTL/<0,0,0>,<0,0,1>,2,0
                  TARG/<0,0,0>,<0,0,1>
                  START ANG=0,END ANG=180
                  ANGLE VEC=<0,1,0>
                  DIRECTION=CCW
                  SHOW FEATURE PARAMETERS=NO
                  SHOW CONTACT PARAMETERS=YES
                    NUMHITS=4,DEPTH=0,PITCH=0
                    SAMPLE METHOD=SAMPLE_HITS
                    SAMPLE HITS=0,SPACER=0
                    AVOIDANCE MOVE=NO,DISTANCE=0.3937
                    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                  SHOW HITS=NO
      DIM LOC1= LOCATION OF CIRCLE CIR_1  UNITS=IN ,$
      GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
      AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL
      D       2.0000     0.0020     0.0020     2.0000     0.0000     0.0000 ---#----
      END OF DIMENSION LOC1
                  ASSIGN/CIR_OOT=LOC1.D.OUTTOL
                  IF_GOTO/CIR_OOT>0,GOTO = BAD
      GOOD       =LABEL/
                  GOTO/END_PROG
      BAD        =LABEL/
                  COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                  "CIR_1 IS OUT OF TOLERACNE BY " +CIR_OOT
      C1         =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                  DO YOU WANT TO RE MEASURE?
                  IF_GOTO/C1.INPUT=="YES",GOTO = MEASURE_CIR_1
      END_PROG   =LABEL/
      FYI, type {code}, return to the next line and paste your code, then return again to the next line and type {/code}, except us straight brackets instead of curly ones

      Comment


      • Ekneel28@gmail.com
        [email protected] commented
        Editing a comment
        AWESOME!
        Thank you
        I will give it a go.

    • #6
      This code however will automatically remeasure the feature if its out of tolerance. once it remeasures the feature a second time, it will move on to continue the program.

      Code:
      ASSIGN/MEASURE_COUNT=0
      MEASURE_CIR_1=LABEL/
      CIR_1      =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
                  THEO/<0,0,0>,<0,0,1>,2,0
                  ACTL/<0,0,0>,<0,0,1>,2,0
                  TARG/<0,0,0>,<0,0,1>
                  START ANG=0,END ANG=180
                  ANGLE VEC=<0,1,0>
                  DIRECTION=CCW
                  SHOW FEATURE PARAMETERS=NO
                  SHOW CONTACT PARAMETERS=YES
                    NUMHITS=4,DEPTH=0,PITCH=0
                    SAMPLE METHOD=SAMPLE_HITS
                    SAMPLE HITS=0,SPACER=0
                    AVOIDANCE MOVE=NO,DISTANCE=0.3937
                    FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                  SHOW HITS=NO
      DIM LOC1= LOCATION OF CIRCLE CIR_1  UNITS=IN ,$
      GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
      AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL
      D       2.0000     0.0020     0.0020     2.0000     0.0000     0.0000 ---#----
      END OF DIMENSION LOC1
                  ASSIGN/CIR_OOT=LOC1.D.OUTTOL
                  ASSIGN/MEASURE_COUNT=MEASURE_COUNT+1
                  IF_GOTO/MEASURE_COUNT==2,GOTO = END_PROG <-----------change this number to remeasure that part X times
                  IF_GOTO/CIR_OOT>0,GOTO = MEASURE_CIR_1
      END_PROG   =LABEL/

      Comment


      • Ekneel28@gmail.com
        [email protected] commented
        Editing a comment
        Just tried it out and it works like a CHAMP!
        I really appreciate it.

    • #7
      No problem, glad I could help.

      Comment

      Related Topics

      Collapse

      Working...
      X