对于PC DMIS软件可以使用“表达式构造器”,对于点集可以构造特征组,赋值,最大,最小函数,进行评价!这种对于数量较多的很方便,也可以使用IF语句循环找最大值,最小值!
或者使用数组函数和最大最小函数配合,这个对于数量较少点实用性更强。
零件名: 山涧果子
修订号:
序列号:
统计计数: 1
启动 =坐标系/开始,回调:使用_零件_设置,列表=是
坐标系/终止
模式/自动
飞行/开
格式/文本,选项, ,标题,符号, ;标称值,公差,测定值,偏差,超差, ,
加载测头/LENOVO
测尖/T1A0B0, 支撑方向 IJK=0, 0, 1, 角度=0
点1 =特征/触测/矢量点/默认,直角坐标
理论值/<10.973,72.505,35>,<0,0,1>
实际值/<10.973,72.505,35>,<0,0,1>
目标值/<10.973,72.505,35>,<0,0,1>
显示特征参数=否
显示相关参数=是
自动移动=否,距离=10
显示触测=否
点2 =特征/触测/矢量点/默认,直角坐标
理论值/<7.85,33.279,35>,<0,0,1>
实际值/<7.85,33.279,35>,<0,0,1>
目标值/<7.85,33.279,35>,<0,0,1>
显示特征参数=否
显示相关参数=是
自动移动=否,距离=10
显示触测=否
点3 =特征/触测/矢量点/默认,直角坐标
理论值/<38.555,23.715,35>,<0,0,1>
实际值/<38.555,23.715,35>,<0,0,1>
目标值/<38.555,23.715,35>,<0,0,1>
显示特征参数=否
显示相关参数=是
自动移动=否,距离=10
显示触测=否
点4 =特征/触测/矢量点/默认,直角坐标
理论值/<79.234,20.758,35>,<0,0,1>
实际值/<79.234,20.758,35>,<0,0,1>
目标值/<79.234,20.758,35>,<0,0,1>
显示特征参数=否
显示相关参数=是
自动移动=否,距离=10
显示触测=否
点5 =特征/触测/矢量点/默认,直角坐标
理论值/<95.363,24.18,35>,<0,0,1>
实际值/<95.363,24.18,35>,<0,0,1>
目标值/<95.363,24.18,35>,<0,0,1>
显示特征参数=否
显示相关参数=是
自动移动=否,距离=10
显示触测=否
点6 =特征/触测/矢量点/默认,直角坐标
理论值/<116.943,47.448,35>,<0,0,1>
实际值/<116.943,47.448,35>,<0,0,1>
目标值/<116.943,47.448,35>,<0,0,1>
显示特征参数=否
显示相关参数=是
自动移动=否,距离=10
显示触测=否
点7 =特征/触测/矢量点/默认,直角坐标
理论值/<86.214,47.739,35>,<0,0,1>
实际值/<86.214,47.739,35>,<0,0,1>
目标值/<86.214,47.739,35>,<0,0,1>
显示特征参数=否
显示相关参数=是
自动移动=否,距离=10
显示触测=否
点8 =特征/触测/矢量点/默认,直角坐标
理论值/<97.581,83.466,35>,<0,0,1>
实际值/<97.581,83.466,35>,<0,0,1>
目标值/<97.581,83.466,35>,<0,0,1>
显示特征参数=否
显示相关参数=是
自动移动=否,距离=10
显示触测=否
点9 =特征/触测/矢量点/默认,直角坐标
理论值/<65.439,86.233,35>,<0,0,1>
实际值/<65.439,86.233,34.98>,<0,0,1>
目标值/<65.439,86.233,34.98>,<0,0,1>
显示特征参数=否
显示相关参数=是
自动移动=否,距离=10
显示触测=否
点10 =特征/触测/矢量点/默认,直角坐标
理论值/<39.792,82.435,35>,<0,0,1>
实际值/<39.792,82.435,35.03>,<0,0,1>
目标值/<39.792,82.435,35.03>,<0,0,1>
显示特征参数=否
显示相关参数=是
自动移动=否,距离=10
显示触测=否
DIM 位置2= 点 的位置点1 单位=毫米 ,$
图示=关 文本=关 倍率=10.00 输出=两者 半角=否
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
Z 35.000 0.050 -0.050 35.000 0.000 0.000 ----#----
逼近矢量方向偏差 0.000 0.050 -0.050 0.000 0.000 0.000 ----#----
终止尺寸 位置2
DIM 位置3= 点 的位置点2 单位=毫米 ,$
图示=关 文本=关 倍率=10.00 输出=两者 半角=否
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
Z 35.000 0.050 -0.050 35.000 0.000 0.000 ----#----
逼近矢量方向偏差 0.000 0.050 -0.050 0.000 0.000 0.000 ----#----
终止尺寸 位置3
DIM 位置4= 点 的位置点3 单位=毫米 ,$
图示=关 文本=关 倍率=10.00 输出=两者 半角=否
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
Z 35.000 0.050 -0.050 35.000 0.000 0.000 ----#----
逼近矢量方向偏差 0.000 0.050 -0.050 0.000 0.000 0.000 ----#----
终止尺寸 位置4
DIM 位置5= 点 的位置点4 单位=毫米 ,$
图示=关 文本=关 倍率=10.00 输出=两者 半角=否
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
Z 35.000 0.050 -0.050 35.000 0.000 0.000 ----#----
逼近矢量方向偏差 0.000 0.050 -0.050 0.000 0.000 0.000 ----#----
终止尺寸 位置5
DIM 位置6= 点 的位置点5 单位=毫米 ,$
图示=关 文本=关 倍率=10.00 输出=两者 半角=否
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
Z 35.000 0.050 -0.050 35.000 0.000 0.000 ----#----
逼近矢量方向偏差 0.000 0.050 -0.050 0.000 0.000 0.000 ----#----
终止尺寸 位置6
DIM 位置7= 点 的位置点6 单位=毫米 ,$
图示=关 文本=关 倍率=10.00 输出=两者 半角=否
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
Z 35.000 0.050 -0.050 35.000 0.000 0.000 ----#----
逼近矢量方向偏差 0.000 0.050 -0.050 0.000 0.000 0.000 ----#----
终止尺寸 位置7
DIM 位置8= 点 的位置点7 单位=毫米 ,$
图示=关 文本=关 倍率=10.00 输出=两者 半角=否
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
Z 35.000 0.050 -0.050 35.000 0.000 0.000 ----#----
逼近矢量方向偏差 0.000 0.050 -0.050 0.000 0.000 0.000 ----#----
终止尺寸 位置8
DIM 位置9= 点 的位置点8 单位=毫米 ,$
图示=关 文本=关 倍率=10.00 输出=两者 半角=否
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
Z 35.000 0.050 -0.050 35.000 0.000 0.000 ----#----
逼近矢量方向偏差 0.000 0.050 -0.050 0.000 0.000 0.000 ----#----
终止尺寸 位置9
DIM 位置10= 点 的位置点9 单位=毫米 ,$
图示=关 文本=关 倍率=10.00 输出=两者 半角=否
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
Z 35.000 0.050 -0.050 34.980 -0.020 0.000 --#------
逼近矢量方向偏差 0.000 0.050 -0.050 -0.020 -0.020 0.000 --#------
终止尺寸 位置10
DIM 位置11= 点 的位置点10 单位=毫米 ,$
图示=关 文本=关 倍率=10.00 输出=两者 半角=否
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
Z 35.000 0.050 -0.050 35.030 0.030 0.000 -------#-
逼近矢量方向偏差 0.000 0.050 -0.050 0.030 0.030 0.000 -------#-
终止尺寸 位置11
扫描1 =特征/特征组,直角坐标
理论值/<63.794,52.176,35>,<0,0,1>
实际值/<63.794,52.176,35.001>,<0,0,1>
构造/特征组,基本,点1,点2,点3,点4,点5,点6,点7,点8,点9,点10,,
赋值/V1=MAX(扫描1.HIT[1..扫描1.NUMHITS].Z)
赋值/V2=MIN(扫描1.HIT[1..扫描1.NUMHITS].Z)
注释/报告,
"最大值为:" + V1
注释/报告,
"最小值为:" + V2
DIM 位置1= 键入尺寸 输出=两者
AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
M 0.000 0.010 -0.010 V1 35.030 35.020 -------->
赋值/V3=MAX(ARRAY(点1.Z,点2.Z,点3.Z,点4.Z,点5.Z,点6.Z,点7.Z,点8.Z,点9.Z,点10.Z))
赋值/V4=MIN(ARRAY(点1.Z,点2.Z,点3.Z,点4.Z,点5.Z,点6.Z,点7.Z,点8.Z,点9.Z,点10.Z))
注释/报告,
"点集数组中Z值最大为:"+V3
注释/报告,
"点集数组中Z值最小为:"+V4
对于RationalDMIS软件,可以使用DO循环,一维数组变量对数据进行存储,使用最大(MX)最小(MN)函数求最大最小值。
软件官方提供简便的方法如下:
变量数据区自带了 找到最大最小点轮廓/直径/半径/XYZ坐标 的内置宏,可以帮助用户取得这些信息;
操作方法是拖放式,例如:
想取得PT1~10中最大最小点轮廓是哪个可以多选中这些元素丢到MINMAX_PROFP标签上;
DMISMN/'Created by [山涧果子] on 星期二, 一月 23, 2018', 4.0
UNITS/MM, ANGDEC
WKPLAN/XYPLAN
PRCOMP/ON
TECOMP/ON
FLY/1.000000
MODE/PROG, MAN
SNSET/APPRCH, 1.000000
SNSET/RETRCT, 0.300000
SNSET/DEPTH, 2.000000
SNSET/SEARCH, 2.000000
SNSET/CLRSRF, 27.511591
RECALL/D(MCS)
SNSLCT/S(ROOTSN1)
GEOALG/CIRCLE, LSTSQR
GEOALG/ARC, LSTSQR
GEOALG/PLANE, LSTSQR
$$
$$
MODE/PROG,MAN
F(PT1) = FEAT/POINT,CART, 6.501193, 78.743019, 35.000000, 0.000000,$
0.000000, 1.000000
MEAS/POINT, F(PT1), 1
PTMEAS/CART, 6.501193, 78.743019, 35.000000, 0.000000, 0.000000, 1.000000
ENDMES
F(PT2) = FEAT/POINT,CART, 6.088057, 35.401745, 35.000000, 0.000000,$
0.000000, 1.000000
MEAS/POINT, F(PT2), 1
PTMEAS/CART, 6.088057, 35.401745, 35.000000, 0.000000, 0.000000, 1.000000
ENDMES
F(PT3) = FEAT/POINT,CART, 41.522984, 21.628914, 35.000000, 0.000000,$
0.000000, 1.000000
MEAS/POINT, F(PT3), 1
PTMEAS/CART, 41.522984, 21.628914, 35.000000, 0.000000, 0.000000, 1.000000
ENDMES
F(PT4) = FEAT/POINT,CART, 70.678513, 20.076017, 35.000000, 0.000000,$
0.000000, 1.000000
MEAS/POINT, F(PT4), 1
PTMEAS/CART, 70.678513, 20.076017, 35.000000, 0.000000, 0.000000, 1.000000
ENDMES
F(PT5) = FEAT/POINT,CART, 92.879288, 24.194994, 35.000000, 0.000000,$
0.000000, 1.000000
MEAS/POINT, F(PT5), 1
PTMEAS/CART, 92.879288, 24.194994, 35.000000, 0.000000, 0.000000, 1.000000
ENDMES
F(PT6) = FEAT/POINT,CART, 114.658852, 44.793972, 35.000000, 0.000000,$
0.000000, 1.000000
MEAS/POINT, F(PT6), 1
PTMEAS/CART, 114.658852, 44.793972, 35.000000, 0.000000, 0.000000, 1.000000
ENDMES
F(PT7) = FEAT/POINT,CART, 99.301079, 83.561592, 35.000000, 0.000000,$
0.000000, 1.000000
MEAS/POINT, F(PT7), 1
PTMEAS/CART, 99.301079, 83.561592, 35.000000, 0.000000, 0.000000, 1.000000
ENDMES
F(PT8) = FEAT/POINT,CART, 38.599819, 83.308891, 35.000000, 0.000000,$
0.000000, 1.000000
MEAS/POINT, F(PT8), 1
PTMEAS/CART, 38.599819, 83.308891, 35.000000, 0.000000, 0.000000, 1.000000
ENDMES
F(PT9) = FEAT/POINT,CART, 13.565872, 70.058662, 35.000000, 0.000000,$
0.000000, 1.000000
MEAS/POINT, F(PT9), 1
PTMEAS/CART, 13.565872, 70.058662, 35.000000, 0.000000, 0.000000, 1.000000
ENDMES
F(PT10) = FEAT/POINT,CART, 16.010052, 41.680122, 35.000000, 0.000000,$
0.000000, 1.000000
MEAS/POINT, F(PT10), 1
PTMEAS/CART, 16.010052, 41.680122, 35.000000, 0.000000, 0.000000, 1.000000
ENDMES
DECL/COMMON,INTGR,I
DECL/COMMON,REAL,PT_Z[10]
DECL/COMMON,DOUBLE,DMAX_Z
DECL/COMMON,DOUBLE,DMIN_Z
DECL/COMMON,CHAR,255,C1
DO/I,1,10,1
C1 = ASSIGN/CONCAT('PT',STR(I))
PT_Z[I] = OBTAIN/FA(@C1),5
ENDDO
DMAX_Z = ASSIGN/MX(PT_Z[1],PT_Z[2],PT_Z[3],PT_Z[4],PT_Z[5],PT_Z[6],PT_Z[7],PT_Z[8],PT_Z[9],PT_Z[10])
DMIN_Z = ASSIGN/MN(PT_Z[1],PT_Z[2],PT_Z[3],PT_Z[4],PT_Z[5],PT_Z[6],PT_Z[7],PT_Z[8],PT_Z[9],PT_Z[10])
WRITE/DID(DEFAULTSCREEN),'最大值为:',DMAX_Z
WRITE/DID(DEFAULTSCREEN),'最小值为:',DMIN_Z
$$
$$
$$ CREATED BY : External-Array Software, Inc
$$ DATE : July 7, 2004
$$ Last update: March 1, 2010
$$ Bug fix: change from CASE/'CPARLN': XINDEX = ASSIGN/4
$$ to CASE/'CPARLN': XINDEX = ASSIGN/5
$$ DISLAIMER:
$$ This Macro has been tested internally but not been tested with
$$ other DMIS compatible software. This Macro is provided as sample
$$ and can be modifed for your own use. External-Array doesn't not
$$ guarantee the quality of this Macro.
$$ FUNCION: DMIS OBTAIN/FA(Label), n
$$ Can be used to obtain feature's X, Y, Z value. However,
$$ the index position for n varies from feature to feature.
$$ For example, for feature of POINT, X index position is 3
$$ and for feature of CIRCLE, X index position is 4
$$
$$ This MACRO will return the X index position based on the feature Label
$$ NOTE: CALL must pass XINDEX with declared INTGR variable.
$$ RETURN: XINDEX = 0 if macro failed and non-zero indicates the X position
$$ Last update: 7-18-2010
$$ ARC index is 13 instead of 4
M(EASI_GETX_INDEX) = MACRO/'FEATLABEL', XINDEX
DECL/LOCAL, CHAR, 255, FNAME
XINDEX = ASSIGN/0
FNAME = OBTAIN/F(@FEATLABEL), 1
SELECT/FNAME
CASE/'POINT'
XINDEX = ASSIGN/3
ENDCAS
CASE/'EDGEPT'
XINDEX = ASSIGN/3
ENDCAS
CASE/'PLANE'
XINDEX = ASSIGN/3
ENDCAS
CASE/'GCURVE'
XINDEX = ASSIGN/3
ENDCAS
CASE/'LINE'
XINDEX = ASSIGN/4
ENDCAS
CASE/'CIRCLE'
XINDEX = ASSIGN/4
ENDCAS
CASE/'ARC'
XINDEX = ASSIGN/13
ENDCAS
CASE/'ELLIPS'
XINDEX = ASSIGN/4
ENDCAS
CASE/'SPHERE'
XINDEX = ASSIGN/4
ENDCAS
CASE/'CYLNDR'
XINDEX = ASSIGN/4
ENDCAS
CASE/'CONE'
XINDEX = ASSIGN/4
ENDCAS
CASE/'CPARLN'
XINDEX = ASSIGN/5
ENDCAS
DFTCAS
ENDCAS
ENDSEL
ENDMAC
$$ CREATED BY : External-Array Software, Inc
$$ DATE : Oct 1, 2010
$$ Last update: 2010-12-13
$$ Two features CALL will not get correct MIN/MAX
$$ DISLAIMER:
$$ This Macro has been tested internally but not been tested with
$$ other DMIS compatible software. This Macro is provided as sample
$$ and can be modifed for your own use. External-Array doesn't not
$$ guarantee the quality of this Macro.
$$ FUNCION: FEATLABEL is a Point Reducible feature Label.
$$ MINLABEL MUST be a declared CHAR variable
$$ MAXLABEL MUST be a declared CHAR variable
$$ DMIN MUST be a decleared DOUBLE/REAL variable
$$ DMAX MUST be a decleared DOUBLE/REAL variable
$$
$$ The function of this MACRO is to find the Min/Max of Z Coordinate from
$$ the repeated CALL/M(). The MINLABEL stores the feature with Min
$$ Z Coordinate and the MAXLABEL stores the feature with Max Z Coordinate.
$$ The Min and Max Z Coordinate are stored in DMIN and DMAX respectively.
$$
$$ Important note: before the first macro call, variable MINLABEL
$$ and MAXLABEL MUST be assigned to empty. Otherwise, this macro will not work
$$ Also, the DMIN needs to be initialized with a larger number than all the
$$ possible feature Z Coordinate. The DMAX needs to be initialized with a
$$ smaller number than all the possible feature Z Coordinate.
$$
$$ The MACRO calls M(EASI_GETX_INDEX) that must be previously defined.
$$ M(EASI_GETX_INDEX) is internal MACRO as well
M(EASI_MINMAX_ZCOORD) = MACRO/'FEATLABEL', 'MINLABEL', 'MAXLABEL', DMIN, DMAX
DECL/LOCAL,DOUBLE, VRF
DECL/LOCAL,INTGR, XINDEX
CALL/M(EASI_GETX_INDEX), (FEATLABEL), XINDEX
VRF = OBTAIN/FA(@FEATLABEL), (XINDEX+2)
if/(LEN(MINLABEL) .EQ. 0 )
MINLABEL = ASSIGN/FEATLABEL
DMIN = ASSIGN/VRF
else
if/(VRF .LT. DMIN)
MINLABEL = ASSIGN/FEATLABEL
DMIN = ASSIGN/VRF
endif
endif
if/(LEN(MAXLABEL) .EQ. 0 )
MAXLABEL = ASSIGN/FEATLABEL
DMAX = ASSIGN/VRF
else
if/(VRF .GT. DMAX)
MAXLABEL = ASSIGN/FEATLABEL
DMAX = ASSIGN/VRF
endif
endif
ENDMAC
KNPTR1 = ASSIGN/100000
KNPTR2 = ASSIGN/(-KNPTR1)
KNPTC1 = ASSIGN/''
KNPTC2 = ASSIGN/''
CALL/M(EASI_MINMAX_ZCOORD), (PT1), (KNPTC1), (KNPTC2), (KNPTR1), (KNPTR2)
CALL/M(EASI_MINMAX_ZCOORD), (PT2), (KNPTC1), (KNPTC2), (KNPTR1), (KNPTR2)
CALL/M(EASI_MINMAX_ZCOORD), (PT3), (KNPTC1), (KNPTC2), (KNPTR1), (KNPTR2)
CALL/M(EASI_MINMAX_ZCOORD), (PT4), (KNPTC1), (KNPTC2), (KNPTR1), (KNPTR2)
CALL/M(EASI_MINMAX_ZCOORD), (PT5), (KNPTC1), (KNPTC2), (KNPTR1), (KNPTR2)
CALL/M(EASI_MINMAX_ZCOORD), (PT6), (KNPTC1), (KNPTC2), (KNPTR1), (KNPTR2)
CALL/M(EASI_MINMAX_ZCOORD), (PT7), (KNPTC1), (KNPTC2), (KNPTR1), (KNPTR2)
CALL/M(EASI_MINMAX_ZCOORD), (PT8), (KNPTC1), (KNPTC2), (KNPTR1), (KNPTR2)
CALL/M(EASI_MINMAX_ZCOORD), (PT9), (KNPTC1), (KNPTC2), (KNPTR1), (KNPTR2)
CALL/M(EASI_MINMAX_ZCOORD), (PT10), (KNPTC1), (KNPTC2), (KNPTR1), (KNPTR2)
$$
$$
WRITE/DID(DEFAULTSCREEN),'Min Z Coord = ', KNPTR1, ' of feature (',KNPTC1, ')'
WRITE/DID(DEFAULTSCREEN),'Max Z Coord = ', KNPTR2, ' of feature (',KNPTC2, ')'
更多具体的操作,请参考海克斯康(PC DMIS)软件帮助文件,以及爱科腾瑞(RationalDMIS)软件帮助文件。