hexagon logo

Extracting T-values From Advanced Scan from within a loop.

Greetings to all. I am new to PC-DMIS. My company bought a CMM in March of 2021, Has Version 2020 R2. It is a Global 05.07.05

Our company makes spherical washers ranging in OD size from ≈1 inches to 3 inches.

Currently I can use a linear closed scan from the ID to OD and have ≈40-60 hits generated.

What I want to do after the scan is loop through the the number of hits and report the T-values from that scan.

Unfortunately, what I've come across during the loop is that ≈10 iterations in, the T-values don't match and are rising when creating the dimension.

If code will help let me know.

Additionally, are there any other sites/ pages to look at to get a better understand of how the functions are supposed to work.
  • That's a fun question, and I'm looking forward to hear how some people may handle reporting T-values, but if you are just looking to see all the T-values on a report you can use a legacy profile dimension of the scan and turn on the textual analysis. The DEV column will show the T-values of each point in the scan and you also get a nice summary at the top that lets you know if any of the points are out of tolerance.



  • T_value is the projection of the vector between theo and measured hit along the theo vector.
    If the scan has theo values, then just :
    ASSIGN/V1=DOT(SCN1.HIT[1..SCN1.NUMHITS].XYZ-SCN1.HIT[1..SCN1.NUMHITS].TXYZ,SCN1.HIT[1..SCN1.NUMHITS].TIJK)
    Then loop on SCN1.NUMHITS :

    V2 =LOOP/START,ID=YES,NUMBER=SCN1.NUMHITS,START=1,SKIP=,
    OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=0
    COMMENT,RPT(...)
    V1[V2]
    LOOP/END
  • Nice! Thanks JEFMAN, I was hoping you would chime in on this one.
  • Thank you for the help.

    Would I need to adjust the scan code specifically if between ID and OD I only want a specific number of hits to be reported or can I adjust the loop code to only report specific hit numbers (i.e. 5, 10, 15 etc.)?

    Additionally how would this data be seen by datapage+? (I've been informed by my company's Dir of Quality and department manager to start pushing all data into datapage+)
  • I would try something like this :

    ASSIGN/V1=DOT(SCN1.HIT[1..SCN1.NUMHITS].XYZ-SCN1.HIT[1..SCN1.NUMHITS].TXYZ,SCN1.HIT[1..SCN1.NUMHITS].TIJK)
    ASSIGN/COUNTER=0
    V2 =LOOP/START,ID=YES,NUMBER=SCN1.NUMHITS,START=1,SKIP=,
    OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=0
    IF/(5*ROUND(V2/5))==V2
    ASSIGN/COUNTER=COUNTER+1
    ASSIGN/V3="SCN1.HIT["+V2+"]"
    PNT_SCN =GENERIC/POINT,DEPENDENT,RECT,$
    NOM/XYZ,V3.TX,V3.TY,V3.TZ,$
    MEAS/XYZ,V3.X,V3.Y,V3.Z,$
    NOM/IJK,V3.TI,V3.TJ,V3.TK,$
    MEAS/IJK,V3.I,V3.J,V3.K,$
    ASSIGN/TVAL[COUNTER]=V1[V2]
    END IF/
    LOOP/END
    SCN2 =FEAT/SET,CARTESIAN
    THEO/<0,0,0>,<0,0,1>
    ACTL/<0,0,0>,<0,0,1>
    CONSTR/SET,BASIC,PNT_SCN[1..COUNTER],,
    COMMENT/REPT,
    TVAL


    Then, you can also dimension SCN2, and use it with datapage, or just extract TVAL.
    I'm not at the cmm, if generic point doesn't calculate the T_value, then use an offset point from origin with the same assignments.

  • Thank you again for the advice. I'll give it a try...
  • What I got to work is this:

    {PREDEFINED LINEAR CLOSED SCAN UP HERE}
    ...
    ASSIGN/CTR=0
    LP1 =LOOP/START.ID=YES,NUMBER=SCN_LC1.NUMHITS,START=5,SKIP=,
    OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=0
    IF/(5*ROUND(LP1/5))=LP1
    ASSIGN/CTR=CTR+1
    ASSIGN/V2="SCN_LC1"+LP1+"]"
    GNRC_PT =GENERIC/POINT,DEPENDENT,CARTESIAN,$
    NOM/XYZ<V2.TX,V2.TY,V2.TZ>,$
    MEAS/XYS<V2.X,V2.Y,V2.Z>,$
    NOM/IJK<V2.TI, V2.TJ, V2.TK>,$
    MEAS/IJK<V2.I,V2.J,V2.K>
    DM LOC1 =LOCATION OF POINT GNRC_PT UNITS=MM,$
    GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO
    AX NOMINAL MEAS +TOL -TOL DEV OUTTOL
    T 0.000 -0.146 0.125 0.125 -0.146 0.021 <--------
    END OF DIMENSION LOC1
    END_IF/
    LOOP/END
    EXCEL_FORM1=.....

    I also created a cast point of the first hit before the loop at SCN_LC1.HIT[1], oddly though on the excel report it listed it 5 times and am not sure why.
    Since I see how the IF statement works, I'm going to start at 1 and use an if statement there then with what is above as well.....

    Thank you gain JEFMAN for your help.
  • I am presently not at the CMM.

    To compound things a little further. is it possible to tell a subsequent scan where to start without having to adjust the alignment?

    That is I want to make sure that all my scans start at the same XYZ/IJK and am wondering if I can create variable assignments to the following scans...i.e.

    ASSIGN/V_X2START = {formula base on angle of rotation & first scans TX value}
    ASSIGN/V_I2START = Same as above except TI
    ...


    Then code these variables where the SHOWALLPARAMS=NO section is for the scan?

    I know rotating the alignment is definitely easier; however, one of my companies customers tends to be rather anal about technicalities and may force where I work to not rotate the alignment..


    Thanks for the help (again!)