一般利用MX(a,b..) { a,b,c,…中选取最大的数 }数学函数求取最大值,这个不作多介绍了。
零件名: 山涧果子
修订号:
序列号:
统计计数: 1
启动 =坐标系/开始,回调:使用_零件_设置,列表=是
坐标系/终止
模式/自动
飞行/开
格式/文本,选项, ,标题,符号, ;标称值,公差,测定值,偏差,超差, ,
加载测头/LENOVO
测尖/T1A0B0, 支撑方向 IJK=0, 0, 1, 角度=0
模式/自动
赋值/V[1]=1
赋值/V[2]=8
赋值/V[3]=25
赋值/V[4]=2
赋值/V[5]=4
赋值/V[6]=12
赋值/V[7]=15
赋值/V[8]=3
赋值/V[9]=8
赋值/V[10]=6
I =循环/开始,标识=是,编号=10,开始=1,跳过=,
偏置:X 轴=0,Y 轴=0,Z 轴=0,角度=0
赋值/J=I+1
J =循环/开始,标识=是,编号=10,开始=1,跳过=,
偏置:X 轴=0,Y 轴=0,Z 轴=0,角度=0
IF/V[I]>=V[J]
赋值/DMAX_L=V[I]
赋值/V[J]=V[I]
END_IF/
循环/终止
循环/终止
注释/报告,
"数组数据最大值为:"+DMAX_L
模式/自动
赋值/V[1]=1
赋值/V[2]=8
赋值/V[3]=25
赋值/V[4]=2
赋值/V[5]=4
赋值/V[6]=12
赋值/V[7]=15
赋值/V[8]=3
赋值/V[9]=8
赋值/V[10]=6
赋值/DMAX_P=V[1]
I =循环/开始,标识=是,编号=10,开始=1,跳过=,
偏置:X 轴=0,Y 轴=0,Z 轴=0,角度=0
IF/V[I]>=DMAX_P
赋值/DMAX_P=V[I]
END_IF/
循环/终止
注释/操作者,否,全屏=否,自动继续=否,
"输出数组数据最大值为:"+DMAX_P
DMISMN/'Created by [山涧果子] on 星期二, 二月 06, 2018', 4.0
UNITS/MM, ANGDEC
WKPLAN/XYPLAN
PRCOMP/ON
TECOMP/ON
FLY/1.0
MODE/MAN
SNSET/APPRCH, 3.000000
SNSET/RETRCT, 3.000000
SNSET/DEPTH, 0.000000
SNSET/SEARCH, 10.000000
SNSET/CLRSRF, 0.000000
RECALL/D(MCS)
SNSLCT/S(20-30X2)
GEOALG/CIRCLE, LSTSQR
GEOALG/ARC, LSTSQR
GEOALG/PLANE, LSTSQR
$$
$$
$$ RationalDMIS输出一组数组数据最大值!!
$$
$$
MODE/PROG,MAN
DECL/COMMON,INTGR,I
DECL/COMMON,INTGR,J
DECL/COMMON,DOUBLE,NUM[10]
DECL/COMMON,DOUBLE,DMAX_L
DECL/COMMON,CHAR,255,C1
NUM[1] = ASSIGN/1
NUM[2] = ASSIGN/8
NUM[3] = ASSIGN/25
NUM[4] = ASSIGN/2
NUM[5] = ASSIGN/4
NUM[6] = ASSIGN/12
NUM[7] = ASSIGN/15
NUM[8] = ASSIGN/3
NUM[9] = ASSIGN/8
NUM[10] = ASSIGN/6
DO/I,1,10,1
J = ASSIGN/I+1
DO/J,1,10,1
IF/(NUM[I].GE.NUM[J])
DMAX_L = ASSIGN/NUM[I]
NUM[J] = ASSIGN/NUM[I]
ENDIF
ENDDO
ENDDO
C1=ASSIGN/CONCAT('数组数据输出最大值为:',STR(DMAX_L))
TEXT/OPER, C1
TEXT/OUTFIL, C1
$$
$$
$$ RationalDMIS数组数据升序排列!!
$$
$$
MODE/PROG,MAN
DECL/COMMON,INTGR,I
DECL/COMMON,INTGR,J
DECL/COMMON,DOUBLE,NUM[10]
DECL/COMMON,DOUBLE,K1
DECL/COMMON,DOUBLE,M1
DECL/COMMON,CHAR,255,C2
NUM[1] = ASSIGN/1
NUM[2] = ASSIGN/8
NUM[3] = ASSIGN/25
NUM[4] = ASSIGN/2
NUM[5] = ASSIGN/4
NUM[6] = ASSIGN/12
NUM[7] = ASSIGN/15
NUM[8] = ASSIGN/3
NUM[9] = ASSIGN/8
NUM[10] = ASSIGN/6
DO/I,1,10,1
J = ASSIGN/I+1
DO/J,1,10,1
IF/(NUM[I].LE.NUM[J])
K1 = ASSIGN/NUM[I]
M1= ASSIGN/NUM[J]
NUM[J]= ASSIGN/K1
NUM[I]= ASSIGN/M1
ENDIF
ENDDO
ENDDO
C2=ASSIGN/CONCAT('数组数据升序排列:',STR(NUM[1]),',',STR(NUM[2]),',',STR(NUM[3]),',',STR(NUM[4]),',',STR(NUM[5]),',',STR(NUM[6]),',',STR(NUM[7]),',',STR(NUM[8]),',',STR(NUM[9]),',',STR(NUM[10]))
TEXT/OPER, C2
TEXT/OUTFIL, C2
$$
$$
$$ RationalDMIS输出数组数据最大值!!
$$
$$
MODE/PROG,MAN
DECL/COMMON,INTGR,I
DECL/COMMON,DOUBLE,NUM[10]
DECL/COMMON,DOUBLE,DMAX_P
DECL/COMMON,CHAR,255,C3
NUM[1] = ASSIGN/1
NUM[2] = ASSIGN/8
NUM[3] = ASSIGN/25
NUM[4] = ASSIGN/2
NUM[5] = ASSIGN/4
NUM[6] = ASSIGN/12
NUM[7] = ASSIGN/15
NUM[8] = ASSIGN/3
NUM[9] = ASSIGN/8
NUM[10] = ASSIGN/6
DMAX_P = ASSIGN/NUM[1]
DO/I,1,10,1
IF/(NUM[I].GE.DMAX_P)
DMAX_P = ASSIGN/NUM[I]
ENDIF
ENDDO
C3=ASSIGN/CONCAT('数组数据输出最大值为:',STR(DMAX_P))
TEXT/OPER, C3
TEXT/OUTFIL, C3
$$ RationalDMIS数组数据输出最小值,只需要将.GE.或.GT.换成.LE.或.LT.