DIM ID Out of Tolerance in a Comment

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

  • DIM ID Out of Tolerance in a Comment

    Right now I have an operator comment that will tell me the number of dimensions out of tolerance. Is there a way to display the dimension IDs that measure out of tolerance into an operator comment?
    I'm programming on a Global S 15.30.10 with a HP-S-X1H Scanning Probe, and using 2020 R2.

  • #2
    Yes, you would have to program code for each ID to display a comment if the out of tolerance is exceeded. How many IDs are you talking about?

    Code:
    DIM [COLOR=#3498db]LOC1[/COLOR]= LOCATION OF CIRCLE CIR1 UNITS=IN ,$
    GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO
    AX NOMINAL +TOL -TOL MEAS DEV [COLOR=#3498db]OUTTOL[/COLOR]
    [COLOR=#3498db]D[/COLOR] 1.0000 0.0020 0.0020 1.0050 0.0050 0.0030 ------->
    END OF DIMENSION LOC1
    
    ASSIGN/[COLOR=#27ae60]V1[/COLOR]=[COLOR=#3498db]LOC1.D.OUTTOL[/COLOR]
    
    IF/[COLOR=#27ae60]V1[/COLOR]>0
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
    "Circle 1 ID is out of tolerance by "+[COLOR=#27ae60]V1[/COLOR]
    END_IF/
    Last edited by acgarcia; 12-31-2020, 03:30 PM.

    Comment


    • S_Cliff
      S_Cliff commented
      Editing a comment
      I've got 63 dimensions but only a certain handful are problem dims so this should work for me

  • #3
    If there are multiple locations to perform this function. I've had luck building the full structure, assigning 2-3 variables above the group command to handle the output name (Consider Positional output)
    1 assignment is the name :LOC1
    2 assignment is the AX : DF <--This is your main ID: M,X,D.... whatever the primary axis you want to check on
    3 assignment is additional AX:TP <--In the event of a second axis in 1 output requiring check

    start_group
    assign1 + "." +assign2 + "." + outtol
    Test if o/tol
    if no perform test2 for TP
    if no, do nothing and carry on
    if test1 or test2 are yes - activate comment
    end group

    close the group and give it a generic name (outtol_finder_#)
    each copy you make just be sure to update the group# your assignments will be updated (even when redundant) by the last input it has received.

    Comment


    • Kp61dude!
      Kp61dude! commented
      Editing a comment
      This is a nice suggestion though I would use a subroutine at the end of your program lead by a PROGRAM END command so that it doesn't execute without being called. So instead of multiple group commands it will be a call to the same subroutine code. Maintenance in the future will be less of a headache too.

    • S_Cliff
      S_Cliff commented
      Editing a comment
      Kp61dude! Can you show example code?

    • Kp61dude!
      Kp61dude! commented
      Editing a comment
      You've already done most of the work just copy and paste that in your subroutine and tweak whatever else is left (shouldn't be much). Don't have my dongle license on me today... I'll post something when I get it back.
      Last edited by Kp61dude!; 01-05-2021, 11:06 AM.

Related Topics

Collapse

Working...
X