hexagon logo

code for checking an exception

Need to calculate these from a set of 8 results
[Spacing error not to exceed 0.005,
spacing between adjacent slot 0.003, 1 place may be 0.005 max]

I am using following code to calculate spacing error within 0.005, but I'm not sure how to find " 1 place may be 0.005 max"
I would highly appreciate any guidance as I need to create similar program for 60 set of slots as well.


LOC_ADJ1, 2, 3... is the spacing between adjacent slots

ASSIGN/ZERO=0

ASSIGN/V1=LOC_ADJ1.X.MEAS
ASSIGN/V2=LOC_ADJ2.X.MEAS
ASSIGN/V3=LOC_ADJ3.X.MEAS
ASSIGN/V4=LOC_ADJ4.X.MEAS
ASSIGN/V5=LOC_ADJ5.X.MEAS
ASSIGN/V6=LOC_ADJ6.X.MEAS
ASSIGN/V7=LOC_ADJ7.X.MEAS
ASSIGN/V8=LOC_ADJ8.X.MEAS

ASSIGN/VR=ARRAY(V1,V2,V3,V4,V5,V6,V7,V8)
ASSIGN/VMAX=MAX(VR)
ASSIGN/VMIN=MIN(VR)
ASSIGN/AVG=VMAX-VMIN

F1 =GENERIC/POINT,DEPENDENT,CARTESIAN,$
NOM/XYZ,<ZERO,ZERO,ZERO>,$
MEAS/XYZ,<AVG,AVG,AVG>,$
NOM/IJK,<0,0,1>,$
MEAS/IJK,<0,0,1>

DIM LOC_ADJ9= 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
X 0.00000 0.00500 0.00500 0.00001 0.00001 0.00000 --#--
END OF DIMENSION LOC_ADJ9
Parents
  • Not sure to understand what you want...
    I would :
    Create a feature set with all the slots (SCN1)
    Then, I would calculate the deviations along X axis in two arrays:
    ASSIGN/V1=SCN1.HIT[1..(SCN1.NUMHITS-1)].X-SCN1.HIT[1..(SCN1.NUMHITS-1)].TX
    ASSIGN/V2=SCN1.HIT[2..(SCN1.NUMHITS)].X-SCN1.HIT[2..(SCN1.NUMHITS)].TX
    Then, I would subtract V2 to V1 to get the error spacing, and calculate the absolute value, to take into account the case of a spacing lower than -0.005 :
    ASSIGN/ERROR_SP=ABS(V2-V1)
    Then, I would search how many values are >= 0.005 :
    ASSIGN/SEARCH_DEFECT=SUM(INT(ERROR_SP/0.005))
    Then, it depends on what you have to decide...
    Something like :
    IF/(SEARCH_DEFECT>1) OR (MAX(ERROR_SP)>0.005)
    COMMNENT/OPERATOR
    THE PART IS OOT
    END IF

Reply
  • Not sure to understand what you want...
    I would :
    Create a feature set with all the slots (SCN1)
    Then, I would calculate the deviations along X axis in two arrays:
    ASSIGN/V1=SCN1.HIT[1..(SCN1.NUMHITS-1)].X-SCN1.HIT[1..(SCN1.NUMHITS-1)].TX
    ASSIGN/V2=SCN1.HIT[2..(SCN1.NUMHITS)].X-SCN1.HIT[2..(SCN1.NUMHITS)].TX
    Then, I would subtract V2 to V1 to get the error spacing, and calculate the absolute value, to take into account the case of a spacing lower than -0.005 :
    ASSIGN/ERROR_SP=ABS(V2-V1)
    Then, I would search how many values are >= 0.005 :
    ASSIGN/SEARCH_DEFECT=SUM(INT(ERROR_SP/0.005))
    Then, it depends on what you have to decide...
    Something like :
    IF/(SEARCH_DEFECT>1) OR (MAX(ERROR_SP)>0.005)
    COMMNENT/OPERATOR
    THE PART IS OOT
    END IF

Children