hexagon logo

MAX Point MIN Point Of a scan

Morning All,

I am having some trouble finding the max values for different linear open scans. I looked at other posts and I tried Josh's code but I could not get it to work.

Does anyone see a problem with my code or something I am doing wrong?


F1 =GENERIC/POINT,DEPENDENT,CARTESIAN,$
NOM/XYZ,<TOPSCN.HIT[MAXPTINDEX].TX,TOPSCN.HIT[MAXPTINDEX].TY,TOPSCN.HIT[MAXPTINDEX].TZ>,$
MEAS/XYZ,<TOPSCN.HIT[MAXPTINDEX].X,TOPSCN.HIT[MAXPTINDEX].Y,TOPSCN.HIT[MAXPTINDEX].Z>,$
NOM/IJK,<TOPSCN.HIT[MAXPTINDEX].TI,TOPSCN.HIT[MAXPTINDEX].TJ,TOPSCN.HIT[MAXPTINDEX].TK>,$
MEAS/IJK,<TOPSCN.HIT[MAXPTINDEX].I,TOPSCN.HIT[MAXPTINDEX].J,TOPSCN.HIT[MAXPTINDEX].K>

DIM LOC1= 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 MAX MIN
X 0.0000 0.0020 0.0020 0.0000 0.0000 0.0000 0.0000 0.0000 ----#----
Y 0.0000 0.0020 0.0020 0.0000 0.0000 0.0000 0.0000 0.0000 ----#----
Z 0.0000 0.0020 0.0020 0.0000 0.0000 0.0000 0.0000 0.0000 ----#----
END OF DIMENSION LOC1
ASSIGN/MAXPTINDEX=0

TIA
Parents
  • If you look at the left, you have to use minindex... Because of the minus Slight smile


    Maxindex gives the highest value, so if the scan goes from X-50 to X -1, it gives -1 !
    If you want to use Maxindex, you have to consider absolute value, so MAXINDEX(ABS(LEFTSCN.HIT[1..LEFTSCN.NUMHITS].X)).
    Using MININDEX gives directly the lower value (-50 in my example).
    You can also use MAXINDICES, which gives first the highest value anfd at the end (NUMHITS) the lower one (and vice versa with MININDICES)...
Reply
  • If you look at the left, you have to use minindex... Because of the minus Slight smile


    Maxindex gives the highest value, so if the scan goes from X-50 to X -1, it gives -1 !
    If you want to use Maxindex, you have to consider absolute value, so MAXINDEX(ABS(LEFTSCN.HIT[1..LEFTSCN.NUMHITS].X)).
    Using MININDEX gives directly the lower value (-50 in my example).
    You can also use MAXINDICES, which gives first the highest value anfd at the end (NUMHITS) the lower one (and vice versa with MININDICES)...
Children