知识点:
CMM校准依据:
《JJF1064-2010坐标测量机校准规范》(基本等同于ISO10360)标准器:尺寸实物标准器、检测球、二维靶标。
校准项目:
(1)尺寸测量误差校准
对于三维测头,通过比较5个不同长度尺寸实物标准器的校准值和指示值,评价坐标测量机是否符合规定的最大允许示值误差MPEE。5个尺寸实物标准器放在测量空间的7个不同的方向或位置,各测量3次,共进行105次测量。
(2)探测误差校准
通过确定测量点到最小二乘拟合球球心距离的范围,评价三维探测误差P是否符合规定的最大允许探测误差MPEP。
示值误差的校准
探测误差的校准
探针位置:按制造商限定范围任意配置,一般用20mm的测杆。
校准过程:在标准球上选取25个探测点进行探测,探测点须均布。
结果处理:用25个测量值计算出最小二乘球中心,求出25个测点到球心的距离R,P=RMAX-RMIN
综合性评定:探测误差P不大于最大允许探测误差MPEP,允许重复再测一次。
CMM校准的注意事项:
(1)量块是CMM示值误差校准的主标准器,激光干涉仪为辅助标准器
(2)校准前标准器(量块)需提前恒温24h以上
(3)使用检定合格的标准器,计算示值误差时须考虑标准器的修正值
(4)量块的固定夹具目前无标准规范,夹具优劣对校准结果至关重要
(5)量块(艾利点、贝塞尔点)装夹位置有讲究
一、安全使用操作规程
1.技术性能
测量范围:例(X轴:1000mm Y轴:1200m Z轴:800mm)测量软件:例(AC-DMIS)
仪器示值误差:单轴E≤(2.5+3L/1000)um,空间E≤2.8+3L/1000)um 探测误差:E1≤2.8um,其中L为被测长度(mm)。
2.使用操作规程
(1)开机步骤:
①检查是否有阻碍机器运动的障碍物。
② 开总电源;
③ 开气压(先开工作气压,后开总气压;检查测量机的气压表指示,大于0.5Mpa );
④开控制柜电源(顺时针旋转,松开控制柜上的急停按钮);
⑤开启电脑,双击桌面AC-DMIS测量软件软件。弹出“机器回零”的对话框;
⑥打开机器和手操器上的急停开关;给X,Y,Z加上使能,点击机器回零。
⑦ 回零成功后,即可开始操作。
(2)测头分类及配置:
(3)测头装配过程:
手动双旋转测头装配:Head 测头选项:MH20i Module 模块选项:TP20_SF_TO_M2 Styli_Exte 测针加长杆选项: M2_20*3_TO-M2 Styli-Ball 测针选项:M2_20*3
自动双旋转测头装配:Head测头选项:PH10T Body-extension 测头加长杆:PEL1*50_TO_M8 / PEL2*100_TO_M8 / PEL3*300_TO_M8 Body 转接器(本体):TP20_TO_AG Module 模块选项:TP20_SF_TO_M2 Styli _ Exte 测针加长杆选项: M2_20*3_TO-M2 Styli-Ball 测针选项:M2-20*3
自动双旋转测头装配:Head测头选项:PH10M Body-Adaptor 测头转接体:PEM1 ×25_TO-M8/ PEM2 ×50_TO-M8 /PEM3 ×100_TO-M8 /PZM ×200_TO-M8 PAA1 ×32-TO-M8 /PAA2×140-TO-M8 /PAA3×300-TO-M8 Body-extension 测头加长杆PEL1*50_TO_M8 / PEL2*100_TO_M8 / PEL3*300_TO_M8 Body 转接器(本体):TP20_TO_AG Module 模块选项:TP20_SF_TO_M2 Styli_Exte 测针加长杆选项: M2_20*3_TO-M2 Styli-Ball 测针选项:M2-20*3
注意:测头加长杆和测针加长杆选项可以根据工件的需求添加或减去!
测头校正
测头校正前如果标准球改变或位置移动必须先进行“定球”,再进行校正。
注意:
在校正测针前必须先确定配置辅助参数里面的内容正确无误。
配置辅助参数设置:
支撑杆的直径是否输入正确;
标准球的直径是否输入正确;
辅助距离(安全回退距离设置范围2MM~4MM);
半径允差:测针半径的实际校准值与名义值的偏差;
形状允差:测针校正时各测点拟合球的形状偏差的最大允许值;
标准球的坐姿:标准球竖直放置;
选择测点数:选择5点校正 或 9点校正;
运动模式:是否绕着圆弧运动(主要针对9点校正时使用);
自动测针校正
球形测针校正
点击菜单栏“测头”,选择“自动测针校正”弹出界面,选择装配测针的文件名称;
分别在A角和B角中输入需要校正的角度 ,点击添加,角度自动添加进到列表中,且得到每一组的理论角度。
可以将所有的角度通过“文件保存”的功能,将其保存,方便下次使用;
点击“文件打开”,调出所保存的角度,进行校正!
点击“自动测针校正” 栏里的“开始”即可;机器将自动进行校正所添加的每一个角度。
校正结束后弹出提示“校正完成”信息,点击确定,校正结果自动保存。可退出校正界面,方可进行测量。
注意:
1)添加角度时,自动旋转测头座角度增量为7.5度,手动旋转测头座角度增量为15度。即A、B角输入时必须是7.5或15的倍数。
2) 角度A0B0是基准针,必须放在第一行;
3)在进行校正前必须确认测点数为零。
4)当标准球移动过,必须使用DEFAULT文件中的A0B测针进行定球。
注意:
当结果测针半径偏差或形状偏差大于相应的允差(在辅助参数中配置),则弹出“结果超差,是否保存”对话框,询问用户是否保存该校准值。
点击“是(Y)”则校正结果被视为有效并被保存;
点击“否(N)”则校正结果被视为无效并不被保存,若是连续自动校正机器会继续校正其它角度不会停止,但测针半径偏差和形状偏差小于相应的允差则自动保存校准值。
(4)建立零件坐标系:
①通常用3-2-1法。首先测量坐标系特征,然后针对特征找平,旋转和平移,完成零件坐标系的创建。
②建立零件坐标系的步骤如下:
a.用3-2-1法建坐标系。第一特征3点测平面。用平面空间旋转确定一个轴(通常为Z轴)的原点和方向。第二个特征是2测直线,测直线的第二点在轴的正向。
第三个特征是1个点(或构造点),由其确定第二轴原点。
b.使用坐标系功能对话框。点击“插入”、“坐标系"、“新建”,打开坐标系功能对话框。在对话框特征列表里,选平面,选择找平确定的轴向然后单击找平按钮:选直线特征,选择旋转到的方向和旋转绕的轴,然后单击旋转按钮:分别选面、线、点类特征,选中相应轴的复选框,然后分别单击“原点"按钮。
c.单击“确定”完成坐标系的创建。
(5)依次测量其它尺寸,注意添加轨迹点并进行尺寸和形位误差评价。
(6)使用专用测量程序进行测量
①对于经常测量的检测项目,可编制专用测量程序,存入AC-DMIS指定的目录。当需要测量时,工件定位与原来一致,直接调用该程序即可测量,不需频繁使用操纵盒手动测量,有利于快速检测。
②使用专用测量程序进行自动测量时,进入AC-DMIS测量软件后,单击“打开”,找到程序名,选中程序名单击“打开”按钮(或直接双击)进入程序,点击程序自动运行,逐步进行测量(屏幕有提示)。例如:测量D002首件步骤为:进入AC-DMIS测量软件-“打开"-"D002首件程序"-“打开”一点击运行键一程序自动运行。测量后查看测量结果。
(7)根据测量结果及时做好相应记录。
(8)关机:需要关机时先退出软件,依次关闭电源是:计算机、显示器、打印机、控制柜、干燥器、稳压电源。
3,注意事项
(1)自动测量程序中的轨迹点要合适,必须保证设备运行时测头安全。
(2)编程时对工件的定位,所用测针型号、测头文件要有注释说明。
(3)程序中测头文件所用测头型号要与实际使用测头一致。
换测头角度必须保证测头系统安全。
(4)测量时测头逼近、回退应与测量的切平面垂直。
(5)测量结束,应把测头移到安全位置,避免上下工件碰撞测头或设备。
(6)严禁用手或抹布清洁光栅尺,光栅尺清洁必须维修部门专人清洁。
(7)取放工件只限前后方向。搬动工件、零件和拿其它工具不得从光栅尺、读数头、导轨的上方经过。不得倚靠光栅尺和读数头所在的部位。
(8)校准用标准球:必须拿住、拿稳,使用后用棉花或软布包好放到盒里。
(9)自动机操纵盒使用不可用力搬动或拧,用后放到指定安全位置,对其连接线不可用力拉或拽,避免踩、绊操纵盒线。
(10)运行已有程序必须保证工件定位、轮型、程序(测头文件和测头角度)正确。
(11)工作期间必须穿戴安全保护用品,头戴安全帽,脚穿劳保鞋。
二、量块校准操作规程
1.准备工作
(1)测针选择20×3(不可以加加长杆)。
(2)校正A0B0,A90B-90,A90B180,A90B45,A90B-45, A90B135,A90B-135七个测针角度。
(3)放好量块架子(直接放在大理石台面上,不能放在水晶板或者胶垫上面),量块首端与测针平行。
2.测量方法
(1)选择测针角度
A90B180(X轴)、A90B-90(Y轴)、A90B-90(Z轴)、A90B-45(1-7)、A90B-135(2-8)、A90B135(3-5)、A90B45(4-6)。
(2)打开测量程序(整组测量程序),修改参数。
①量块真值V101-V105
例:长度500的量块,计量所检定结果为500+0.0001则V101=500+0.0001。
②机器精度V81,V82
例:机器精度为2.5+L/330,则V81=2.5,V82=330。
③变量V121-V153
定位采点后得到变量数值,点击编程系统一变量观察,把V121~V153的数据输入到程序中,取小数点2位即可。
(3)量块定位
(1)在程序中找到PAUSE语句,把前面的感叹号去掉,右键点击修改。PAISE语句位置如图1所示。
(2)光标放在INIT前,点击自动运行,出现对话框,如图2所示,量块相对位置已变0,未变1,输入0,确定。按照提示进行采点:
采点测量第1个量块的大侧面4点,工作面2点,小侧面1点:
采点测量第2个量块的工作面1点,大侧面1点;采点测量第3、4、5个量块同第2个量块。
采点完成后,得到变量V121~V153数据,输入到程序中,右键点击修改,定位完成。
(4)运行程序
①把PAUSE语句前加感叹号,右键点击修改,保存程序;
②光标放在INIT前,点击自动运行:
③出现对话框,量块相对位置已变0,未变1,输入1,确定。
④出现对话框,如图3所示,坐标系0,原点1,再运行2:
坐标系0:量块架位置改变,采点测量第一个量块的大侧面4点,工作面2点,小侧面1点:
原点1:原点改变,采点测量第一个量块的大侧面1点,工作面1点,小侧面1点:
再运行2:量块架位置未改变,程序继续运行。
输入对应的数字,一般首次测量定位后输入2,更改测量方向输入0。
程序自动运行,查看结果。
拓展知识点:
CMM的测量不确定度
AC-DMIS(NETDMIS)量块程序如下:
INCLUD/DMIS,'NET_DMIS_DEFINES.DMI'
UNITS/MM,ANGDEC
D(MACHINE)=DATSET/MCS
DMESW/COMAND,'PROBE_VAL/INIT'
DECL/INTGR,A1,V1,V3,V40,V44,V46,V75,V76,V77,V79,V98,V99
$$A1 清空报告的选项;V1 量块测量次数,从1到V44
$$V3 测量一个量块在两个不同的位置;V40 绕行路径:左1右2上3;V46 左右边采点;
$$V75 测量量块个数,从1到V76,V76是量块总数;V77 运行模式 1连续 0非连续;
$$V79 在V98.EQ.0.AND.V77.EQ.1时建立非第一个量块坐标系循环参数;
$$V98 量块相对位置,已变0,未变1;V99 坐标系0,原点1,再运行2;
DECL/DOUBLE,V2,A2,V41,V42,V43,V45,V48,V64,V101,V102,V103,V104,V105,V106,V107
$$V2块规长度;A2 测针直径值;V41 前端避让距离>=1MM;V42 侧面避让距离>=20MM
$$V43 后端避让距离>=1MM;V45测针半径值;V48 判断工作面位置是否正确
$$V64 运行速度;V101到V106是6个量块的长度;V107获取距离的实测值;
DECL/DOUBLE,V121,V122,V123,V131,V132,V133,V141,V142,V143,V151,V152,V153,V161,V162,V163
$$第二、三、四、五、六个量块原点
DECL/CHAR,256,SS1,SS2,SS3,SS4,SS5
$$SS1 获取当前的测头名称显示到报告界面;SS2显示量块长度;
$$SS3,SS4 操作者输入的AB角度值,SS5合并SS3,SS4,当前测头角度名称
$$A1=PROMPT/'清空报告,0清空,1不清空'
IF/(A1.LE.0)
DMESW/COMAND,'REPORT/CLEAR'
ENDIF
V101=ASSIGN/700.0000
V102=ASSIGN/400.0000
V40=ASSIGN/3
V41=ASSIGN/10.00
V42=ASSIGN/60.00
V43=ASSIGN/10.00
V44=ASSIGN/1
V64=ASSIGN/200
V76=ASSIGN/2
V77=ASSIGN/1
$$SS3=PROMPT/'请输入A角'
$$SS4=PROMPT/'请输入B角'
$$SS5=ASSIGN/CONCAT('A',SS3,'B',SS4)
$$DID(DEFAULT)=DEVICE/STOR,'DEFAULT'
$$OPEN/DID(DEFAULT),SNS
$$S(@SS5)=SNSDEF/PROBE,INDEX,POL,0.0,0.0,0.0000,0.0000,1.0000,83.0000,3.0000
$$SNSLCT/SA(@SS5)
DO/V75,1,V76,1
IF/(V77.EQ.0.AND.V75.EQ.1)
SS2=ASSIGN/CONCAT('量块长度',STR(V101))
TEXT/OPER,SS2
ENDIF
IF/(V77.EQ.0.AND.V75.EQ.2)
SS2=ASSIGN/CONCAT('量块长度',STR(V102))
TEXT/OPER,SS2
ENDIF
IF/(V77.EQ.0.AND.V75.EQ.3)
SS2=ASSIGN/CONCAT('量块长度',STR(V103))
TEXT/OPER,SS2
ENDIF
IF/(V77.EQ.0.AND.V75.EQ.4)
SS2=ASSIGN/CONCAT('量块长度',STR(V104))
TEXT/OPER,SS2
ENDIF
IF/(V77.EQ.0.AND.V75.EQ.5)
SS2=ASSIGN/CONCAT('量块长度',STR(V105))
TEXT/OPER,SS2
ENDIF
IF/(V77.EQ.0.AND.V75.EQ.6)
SS2=ASSIGN/CONCAT('量块长度',STR(V106))
TEXT/OPER,SS2
ENDIF
DMESW/COMAND,'SPECIAL/GAGE-OPEN,1'
$$A2=OBTAIN/SA(@SS5),10
$$V45=ASSIGN/A2/2
V45=ASSIGN/PROBE_RAD
FEDRAT/POSVEL,MMPS,V64
DMESW/COMAND,'SPECIAL/GAGE-PAR,V45,V64'
DMESW/COMAND,'SPECIAL/GAGE-PROBE,SS1,0'
$$*************连续测量
IF/(V75.EQ.1.AND.V77.EQ.1)
V98=PROMPT/'量块相对位置已变0,未变1'
IF/(V98.EQ.0)
V99=ASSIGN/0
ENDIF
IF/(V98.NE.0)
V99=PROMPT/'坐标系0,原点1,再运行2'
ENDIF
(FAIL)
IF/(V99.NE.0.AND.V99.NE.1.AND.V99.NE.2)
V99=PROMPT/'坐标系0,原点1,再运行2'
JUMPTO/(FAIL)
ENDIF
ENDIF
$$*****************连续测量
$$****************非连续测量
IF/(V75.GT.1.AND.V77.EQ.0)
V99=PROMPT/'坐标系0,原点1'
(FAIL2)
IF/(V99.NE.0.AND.V99.NE.1.AND.V99.NE.2)
V99=PROMPT/'坐标系0,原点1'
JUMPTO/(FAIL2)
ENDIF
ENDIF
$$*****************非连续测量
PRCOMP/OFF
$$**********************建立坐标系
IF/(V99.EQ.2)
$$重新测量不建立坐标系 -----1
RECALL/DA(1)
ELSE
IF/(V99.EQ.1)
$$只建立原点 -----2
RECALL/DA(1)
MODE/MAN
F(工作面点)=FEAT/POINT,CART,0,17.5,4.5,-1,0,0
MEAS/POINT,F(工作面点),1
PTMEAS/CART,0,17.5,4.5,-1,0,0
ENDMES
F(大侧面点)=FEAT/POINT,CART,4.5,0,-4.5,0,0,-1
MEAS/POINT,F(大侧面点),1
PTMEAS/CART,4.5,0,-4.5,0,0,-1
ENDMES
F(小侧面点)=FEAT/POINT,CART,4.5,0,4.5,0,-1,0
MEAS/POINT,F(小侧面点),1
PTMEAS/CART,4.5,0,4.5,0,-1,0
ENDMES
D(2-1)=TRANS/XORIG,FA(工作面点),YORIG,FA(小侧面点),ZORIG,FA(大侧面点)
D(2_T)=TRANS/XORIG,V45,YORIG,V45,ZORIG,V45
$$调出完整建立坐标系1重新建立原点
V48=OBTAIN/FA(工作面点),4
IF/(V48.LT.0)
$$IF(V48<0) -----2/1
D(2-1)=TRANS/XORIG,0,YORIG,-35-2*V45,ZORIG,0
$$小侧面点采错到另一面后平移原点使坐标系正确
ENDIF
$$ -----2/1---END
SAVE/DA(2)
$$平移原点后的坐标系
ELSE
$$重新建立完整坐标系 -----3
IF/(V75.EQ.1.OR.V77.EQ.0)
$$非连续测量第一个量块完整建立坐标系 -----3/1
MODE/MAN
GEOALG/PLANE,LSTSQR
F(大侧面)=FEAT/PLANE,CART,151.888454,114.534794,30.000000,0,0,1.0000000
MEAS/PLANE,F(大侧面),4
PTMEAS/CART,31.407455,169.360657,30.000000,0,0,1.00000000
PTMEAS/CART,268.863922,160.453629,30.000000,0,0,1.00000000
PTMEAS/CART,274.022858,65.560959,30.000000,0,0,1.00000000
PTMEAS/CART,33.259583,62.763931,30.000000,0,0,1.00000000
ENDMES
SNSET/DEPTH,0
F(前端面)=FEAT/LINE,UNBND,CART,36.340958,0,5.530098,0.99996837,0,0.00795380,0,-1.00000000,0
MEAS/LINE,F(前端面),2
PTMEAS/CART,36.340958,0,5.530098,0,-1.00000000,0
PTMEAS/CART,256.325378,0,7.279865,0,-1.00000000,0
ENDMES
F(小侧面)=FEAT/POINT,CART,0,51.851379,9.990265,-1.00000000,0,0
MEAS/POINT,COMP,DME,F(小侧面),1
PTMEAS/CART,0,51.851379,9.990265,-1.00000000,0,0
ENDMES
DATDEF/F(大侧面),DAT(A)
D(1_S)=DATSET/DAT(A),-ZDIR
D(1_R)=ROTATE/ZAXIS,FA(前端面),-YDIR
D(1_T)=TRANS/ZORIG,FA(大侧面)
D(1_T)=TRANS/XORIG,FA(前端面)
D(1_T)=TRANS/YORIG,FA(小侧面)
D(1_T)=TRANS/XORIG,V45,YORIG,V45,ZORIG,V45
SAVE/DA(1)
$$完整建立坐标系1完成
D(MACHINE)=DATSET/MCS
RECALL/DA(1)
IF/(V98.EQ.0.AND.V77.EQ.1)
$$连续测量量块相对位置已变需要建立其它量块原点 -----3/1/1
DO/V79,1,V76-1,1
IF/(V79.EQ.1)
$$建立第二量块原点 -----3/1/1/1
DID(GAGEPOS2)=DEVICE/STOR,'C:\GAGEPOS2.TXT'
OPEN/DID(GAGEPOS2),DIRECT,OUTPUT,OVERWR
F(第二量块工作面点)=FEAT/POINT,CART,0,17.5,4.5,-1,0,0
MEAS/POINT,F(第二量块工作面点),1
PTMEAS/CART,0,17.5,4.5,-1,0,0
ENDMES
V121=OBTAIN/FA(第二量块工作面点),3
WRITE/DID(GAGEPOS2),V121
F(第二量块大侧面点)=FEAT/POINT,CART,4.5,0,-4.5,0,0,-1
MEAS/POINT,F(第二量块大侧面点),1
PTMEAS/CART,4.5,0,-4.5,0,0,-1
ENDMES
V122=OBTAIN/FA(第二量块大侧面点),5
WRITE/DID(GAGEPOS2),V122
F(第二量块小侧面点)=FEAT/POINT,CART,4.5,0,4.5,0,-1,0
MEAS/POINT,F(第二量块小侧面点),1
PTMEAS/CART,4.5,0,4.5,0,-1,0
ENDMES
V123=OBTAIN/FA(第二量块小侧面点),4
WRITE/DID(GAGEPOS2),V123
CLOSE/DID(GAGEPOS2),KEEP
$$D(1-2)=TRANS/XORIG,V121,YORIG,V123,ZORIG,V122
$$SAVE/DA(1-2)
ENDIF
$$ -----3/1/1/1---END
IF/(V79.EQ.2)
$$建立第三量块原点 -----3/1/1/2
DID(GAGEPOS3)=DEVICE/STOR,'C:\GAGEPOS3.TXT'
OPEN/DID(GAGEPOS3),DIRECT,OUTPUT,OVERWR
F(第三量块工作面点)=FEAT/POINT,CART,0,17.5,4.5,-1,0,0
MEAS/POINT,F(第三量块工作面点),1
PTMEAS/CART,0,17.5,4.5,-1,0,0
ENDMES
V131=OBTAIN/FA(第三量块工作面点),3
WRITE/DID(GAGEPOS3),V131
F(第三量块大侧面点)=FEAT/POINT,CART,4.5,0,-4.5,0,0,-1
MEAS/POINT,F(第三量块大侧面点),1
PTMEAS/CART,4.5,0,-4.5,0,0,-1
ENDMES
V132=OBTAIN/FA(第三量块大侧面点),5
WRITE/DID(GAGEPOS3),V132
F(第三量块小侧面点)=FEAT/POINT,CART,4.5,0,4.5,0,-1,0
MEAS/POINT,F(第三量块小侧面点),1
PTMEAS/CART,4.5,0,4.5,0,-1,0
ENDMES
V133=OBTAIN/FA(第三量块小侧面点),4
WRITE/DID(GAGEPOS3),V133
CLOSE/DID(GAGEPOS3),KEEP
$$D(1-3)=TRANS/XORIG,V131,YORIG,V133,ZORIG,V132
$$SAVE/DA(1-3)
ENDIF
$$ -----3/1/1/2---END
IF/(V79.EQ.3)
$$建立第四量块原点 -----3/1/1/3
DID(GAGEPOS4)=DEVICE/STOR,'C:\GAGEPOS4.TXT'
OPEN/DID(GAGEPOS4),DIRECT,OUTPUT,OVERWR
F(第四量块工作面点)=FEAT/POINT,CART,0,17.5,4.5,-1,0,0
MEAS/POINT,F(第四量块工作面点),1
PTMEAS/CART,0,17.5,4.5,-1,0,0
ENDMES
V141=OBTAIN/FA(第四量块工作面点),3
WRITE/DID(GAGEPOS4),V141
F(第四量块大侧面点)=FEAT/POINT,CART,4.5,0,-4.5,0,0,-1
MEAS/POINT,F(第四量块大侧面点),1
PTMEAS/CART,4.5,0,-4.5,0,0,-1
ENDMES
V142=OBTAIN/FA(第四量块大侧面点),5
WRITE/DID(GAGEPOS4),V142
F(第四量块小侧面点)=FEAT/POINT,CART,4.5,0,4.5,0,-1,0
MEAS/POINT,F(第四量块小侧面点),1
PTMEAS/CART,4.5,0,4.5,0,-1,0
ENDMES
V143=OBTAIN/FA(第四量块小侧面点),4
WRITE/DID(GAGEPOS4),V143
CLOSE/DID(GAGEPOS4),KEEP
$$D(1-4)=TRANS/XORIG,V141,YORIG,V143,ZORIG,V142
$$SAVE/DA(1-4)
ENDIF
$$ -----3/1/1/3---END
IF/(V79.EQ.4)
$$建立第五量块原点 -----3/1/1/4
DID(GAGEPOS5)=DEVICE/STOR,'C:\GAGEPOS5.TXT'
OPEN/DID(GAGEPOS5),DIRECT,OUTPUT,OVERWR
F(第五量块工作面点)=FEAT/POINT,CART,0,17.5,4.5,-1,0,0
MEAS/POINT,F(第五量块工作面点),1
PTMEAS/CART,0,17.5,4.5,-1,0,0
ENDMES
V151=OBTAIN/FA(第五量块工作面点),3
WRITE/DID(GAGEPOS5),V151
F(第五量块大侧面点)=FEAT/POINT,CART,4.5,0,-4.5,0,0,-1
MEAS/POINT,F(第五量块大侧面点),1
PTMEAS/CART,4.5,0,-4.5,0,0,-1
ENDMES
V152=OBTAIN/FA(第五量块大侧面点),5
WRITE/DID(GAGEPOS5),V152
F(第五量块小侧面点)=FEAT/POINT,CART,4.5,0,4.5,0,-1,0
MEAS/POINT,F(第五量块小侧面点),1
PTMEAS/CART,4.5,0,4.5,0,-1,0
ENDMES
V153=OBTAIN/FA(第五量块小侧面点),4
WRITE/DID(GAGEPOS5),V153
CLOSE/DID(GAGEPOS5),KEEP
$$D(1-5)=TRANS/XORIG,V151,YORIG,V153,ZORIG,V152
$$SAVE/DA(1-5)
ENDIF
$$ -----3/1/1/4---END
IF/(V79.EQ.5)
$$建立第六量块原点 -----3/1/5
DID(GAGEPOS6)=DEVICE/STOR,'C:\GAGEPOS6.TXT'
OPEN/DID(GAGEPOS6),DIRECT,OUTPUT,OVERWR
F(第六量块工作面点)=FEAT/POINT,CART,0,17.5,4.5,-1,0,0
MEAS/POINT,F(第六量块工作面点),1
PTMEAS/CART,0,17.5,4.5,-1,0,0
ENDMES
V161=OBTAIN/FA(第六量块工作面点),3
WRITE/DID(GAGEPOS6),V161
F(第六量块大侧面点)=FEAT/POINT,CART,4.5,0,-4.5,0,0,-1
MEAS/POINT,F(第六量块大侧面点),1
PTMEAS/CART,4.5,0,-4.5,0,0,-1
ENDMES
V162=OBTAIN/FA(第六量块大侧面点),5
WRITE/DID(GAGEPOS6),V162
F(第六量块小侧面点)=FEAT/POINT,CART,4.5,0,4.5,0,-1,0
MEAS/POINT,F(第六量块小侧面点),1
PTMEAS/CART,4.5,0,4.5,0,-1,0
ENDMES
V163=OBTAIN/FA(第六量块小侧面点),4
WRITE/DID(GAGEPOS6),V163
CLOSE/DID(GAGEPOS6),KEEP
$$D(1-6)=TRANS/XORIG,V161,YORIG,V163,ZORIG,V162
$$SAVE/DA(1-6)
ENDIF
$$ -----3/1/1/5---END
ENDDO
$$非第一个量块建立原点循环变量V79结束
ENDIF
$$ -----3/1/1---END
ENDIF
$$ -----3/1---END
ENDIF
$$ -----2---END 3是ELSE
ENDIF
$$ -----1---END
$$**********************建立坐标系
$$******************************自动测量量块前的坐标系和移动点
PRCOMP/ON
RECALL/DA(1)
$$*********************非连续测量第一个量块弹出安全位置提示
IF/(V75.EQ.1.OR.V77.EQ.0)
TEXT/OPER,'请将机器移至安全位置'
$$********是否不要提示,在切换自动模式时有提示
V2=ASSIGN/V101
ENDIF
$$*********************非连续测量第一个量块弹出安全位置提示
$$*********************非连续/连续测量V99=1坐标系1平移原点到第二个量块
IF/(V75.EQ.2)
IF/(V77.EQ.1.OR.(V77.EQ.0.AND.V99.EQ.1))
DID(GAGEPOS2)=DEVICE/STOR,'C:\GAGEPOS2.TXT'
OPEN/DID(GAGEPOS2),DIRECT,INPUT
READ/DID(GAGEPOS2),V121
READ/DID(GAGEPOS2),V122
READ/DID(GAGEPOS2),V123
D(3-1)=TRANS/XORIG,V121+V45,YORIG,V123+V45,ZORIG,V122+V45
SAVE/DA(3-1)
CLOSE/DID(GAGEPOS2),KEEP
ENDIF
V2=ASSIGN/V102
ENDIF
$$*********************非连续/连续测量V99=1坐标系1平移原点到第二个量块结束
$$*********************非连续/连续测量V99=1坐标系1平移原点到第三个量块
IF/(V75.EQ.3)
IF/(V77.EQ.1.OR.(V77.EQ.0.AND.V99.EQ.1))
DID(GAGEPOS3)=DEVICE/STOR,'C:\GAGEPOS3.TXT'
OPEN/DID(GAGEPOS3),DIRECT,INPUT
READ/DID(GAGEPOS3),V131
READ/DID(GAGEPOS3),V132
READ/DID(GAGEPOS3),V133
D(3-2)=TRANS/XORIG,V131+V45,YORIG,V133+V45,ZORIG,V132+V45
SAVE/DA(3-2)
CLOSE/DID(GAGEPOS3),KEEP
ENDIF
V2=ASSIGN/V103
ENDIF
$$*********************非连续/连续测量V99=1坐标系1平移原点到第三个量块结束
$$*********************非连续/连续测量V99=1坐标系1平移原点到第四个量块
IF/(V75.EQ.4)
IF/(V77.EQ.1.OR.(V77.EQ.0.AND.V99.EQ.1))
DID(GAGEPOS4)=DEVICE/STOR,'C:\GAGEPOS4.TXT'
OPEN/DID(GAGEPOS4),DIRECT,INPUT
READ/DID(GAGEPOS4),V141
READ/DID(GAGEPOS4),V142
READ/DID(GAGEPOS4),V143
D(3-3)=TRANS/XORIG,V141+V45,YORIG,V143+V45,ZORIG,V142+V45
SAVE/DA(3-3)
CLOSE/DID(GAGEPOS4),KEEP
ENDIF
V2=ASSIGN/V104
ENDIF
$$*********************非连续/连续测量V99=1坐标系1平移原点到第四个量块结束
$$*********************非连续/连续测量V99=1坐标系1平移原点到第五个量块
IF/(V75.EQ.5)
IF/(V77.EQ.1.OR.(V77.EQ.0.AND.V99.EQ.1))
DID(GAGEPOS5)=DEVICE/STOR,'C:\GAGEPOS5.TXT'
OPEN/DID(GAGEPOS5),DIRECT,INPUT
READ/DID(GAGEPOS5),V151
READ/DID(GAGEPOS5),V152
READ/DID(GAGEPOS5),V153
D(3-4)=TRANS/XORIG,V151+V45,YORIG,V153+V45,ZORIG,V152+V45
SAVE/DA(3-4)
CLOSE/DID(GAGEPOS5),KEEP
ENDIF
V2=ASSIGN/V105
ENDIF
$$*********************非连续/连续测量V99=1坐标系1平移原点到第五个量块结束
$$*********************非连续/连续测量V99=1坐标系1平移原点到第六个量块
IF/(V75.EQ.6)
IF/(V77.EQ.1.OR.(V77.EQ.0.AND.V99.EQ.1))
DID(GAGEPOS6)=DEVICE/STOR,'C:\GAGEPOS6.TXT'
OPEN/DID(GAGEPOS6),DIRECT,INPUT
READ/DID(GAGEPOS6),V161
READ/DID(GAGEPOS6),V162
READ/DID(GAGEPOS6),V163
D(3-5)=TRANS/XORIG,V161+V45,YORIG,V163+V45,ZORIG,V162+V45
SAVE/DA(3-5)
CLOSE/DID(GAGEPOS6),KEEP
ENDIF
V2=ASSIGN/V106
ENDIF
$$************非连续/连续测量V99=1坐标系1平移原点到第六个量块结束
IF/(V99.EQ.1)
RECALL/DA(2)
V75=ASSIGN/V76+1
ENDIF
DMESW/COMAND,'SPECIAL/GAGE-LENA,V2'
MODE/AUTO,PROG,MAN
IF/(V40.EQ.1.OR.V40.EQ.2)
GOTO/CART,-1*V41-V45,2,-1*V45-V42
ENDIF
$$***********自动测量量块前的坐标系和移动点
$$************循环V1测量量块
FEDRAT/POSVEL,MMPS,V64
DO/V1,1,V44,1
IF/(V40.EQ.3)
IF/(V1.EQ.1.AND.V75.EQ.1)
(FAIL3)
V46=PROMPT/'左边采点1,右边采点2'
IF/(V46.NE.1.AND.V46.NE.2)
JUMPTO/(FAIL3)
ENDIF
ENDIF
IF/(V46.EQ.2)
GOTO/CART,-1*V41-V45,35+V45+V42,1.5
ENDIF
IF/(V46.EQ.1)
GOTO/CART,-1*V41-V45,-1*V45-V42,1.5
ENDIF
ELSE
GOTO/CART,-1*V41-V45,2,-1*V45-V42
ENDIF
F(工作面)=FEAT/PLANE,CART,0,17.5,4.5,-1,0,0
MEAS/PLANE,F(工作面),4
PTMEAS/CART,0,2,1.5,-1,0,0
PTMEAS/CART,0,2,7.5,-1,0,0
PTMEAS/CART,0,33,7.5,-1,0,0
PTMEAS/CART,0,33,1.5,-1,0,0
ENDMES
DATDEF/F(工作面),DAT(A)
D(PLN)=DATSET/DAT(A),-XDIR
F(P1)=FEAT/POINT,CART,0,17.5,4.5,-1,0,0
MEAS/POINT,F(P1),1
PTMEAS/CART,0,17.5,4.5,-1,0,0
ENDMES
IF/(V1.EQ.1)
DMESW/COMAND,'SPECIAL/GAGE-POS,FA(P1)'
ENDIF
IF/(V40.EQ.3)
IF/(V46.EQ.2)
GOTO/CART,-1*V41-V45,35+V45+V42,4.5
GOTO/CART,V2+V45+V43,35+V45+V42,4.5
ELSE
IF/(V46.EQ.1)
GOTO/CART,-1*V41-V45,-1*V45-V42,4.5
GOTO/CART,V2+V45+V43,-1*V45-V42,4.5
ENDIF
ENDIF
ELSE
GOTO/CART,-1*V41-V45,17.5,-1*V45-V42
GOTO/CART,V2+V45+V43,17.5,-1*V45-V42
ENDIF
GOTO/CART,V2+V45+V43,17.5,4.5
F(P2)=FEAT/POINT,CART,V2,17.5,4.5,1,0,0
MEAS/POINT,F(P2),1
PTMEAS/CART,V2,17.5,4.5,1,0,0
ENDMES
IF/(V40.NE.3)
GOTO/CART,V2+V45+V43,17.5,-1*V45-V42
ENDIF
IF/(V40.EQ.3)
IF/(V46.EQ.2)
GOTO/CART,V2+V45+V43,35+V45+V42,4.5
ELSE
IF/(V46.EQ.1)
GOTO/CART,V2+V45+V43,-1*V45-V42,4.5
ENDIF
ENDIF
ENDIF
IF/(V1.EQ.1)
DMESW/COMAND,'SPECIAL/GAGE-POS,FA(P2)'
ENDIF
T(距离-1)=TOL/DISTB,NOMINL,V2,-0.005,0.005,PT2PT,AVG
DMESW/COMAND,'OUTPUT_UNIT/MM'
OUTPUT/FA(P1),FA(P2),TA(距离-1)
V107=OBTAIN/TA(距离-1),4
DMESW/COMAND,'SPECIAL/GAGE-IN,V107'
DMESW/COMAND,'SPECIAL/GAGE-END,1'
ENDDO
$$************循环V1测量量块结束
ENDDO
$$量块个数V75的结束
$$}IMPORT_PROG
PC-DMIS量块程序如下:
零件名: ISO10360-2
修订号: PC-DMIS2017
序列号: I0207030
统计计数: 1
STARTUP =坐标系/开始,回调:使用_零件_设置,列表=是
坐标系/终止
模式/手动
移动速度/ 100
逼近距离/4
回退距离/4
触测速度/ 1.2
加载测头/3BY50
显示精度/4
测尖/T1A0B0, 支撑方向 IJK=0, 0, 1, 角度=0
格式/文本, , ,标题,符号, ;测定值,标称值,超差, , , ,
C8 =注释/输入,是,全屏=否,
'NUMBER of gages:'
C7 =注释/是否,是,全屏=否,自动继续=否,
DO YOU WANT TO ALIGNMENT?
IF_GOTO/C7.INPUT=="NO",转到 = MDCC
注释/操作者,否,全屏=否,自动继续=否,
Please take 3 hits on top of the gage block
MAN_PLN =特征/平面,直角坐标,三角形
理论值/<72.269,-12.1019,-258.2105>,<-0.0026196,0.0071996,0.9999707>
实际值/<300.0274,290.4877,-470.0117>,<-0.4712824,0.5154576,0.7156789>
测定/平面,3
触测/基本,常规,<31.7014,-28.4012,-258.1994>,<-0.0026196,0.0071996,0.9999707>,<512.4087,78.5407,-177.5045>,使用理论值=是
触测/基本,常规,<113.8693,-28.4019,-257.9841>,<-0.0026196,0.0071996,0.9999707>,<254.3992,302.4942,-508.7059>,使用理论值=是
触测/基本,常规,<71.2362,20.4974,-258.4479>,<-0.0026196,0.0071996,0.9999707>,<133.2743,490.4282,-723.8248>,使用理论值=是
终止测量/
ALIGN1 =坐标系/开始,回调:STARTUP,列表=是
建坐标系/找平,Z正,MAN_PLN
坐标系/终止
注释/操作者,否,全屏=否,自动继续=否,
Please take two hits from left to right on the long side of the gage
MAN_LINE =特征/直线,直角坐标,非定界
理论值/<19.7129,-41.7159,-263.9338>,<0.9532342,-0.3022328,0>
实际值/<-24.5958,815.8649,-336.9751>,<0.5495348,-0.8354708,0>
测定/直线,2,工作平面
触测/基本,常规,<19.7129,-41.7159,-263.9338>,<-0.3022328,-0.9532342,0>,<-24.5958,815.8649,-337.6932>,使用理论值=是
触测/基本,常规,<95.8531,-65.857,-264.1443>,<-0.3022328,-0.9532342,0>,<402.5877,166.4076,-336.2569>,使用理论值=是
终止测量/
注释/操作者,否,全屏=否,自动继续=否,
Take one hit on the left side of the block
MAN_PT =特征/点,直角坐标
理论值/<16.4796,-22.9262,-263.6253>,<-0.9554738,0.2950759,0>
实际值/<-27.2338,828.0715,-332.0105>,<-0.3819945,0.5823559,-0.7175945>
测定/点,1,工作平面
触测/基本,常规,<16.4796,-22.9262,-263.6253>,<-0.9554738,0.2950759,0>,<-27.2338,828.0715,-332.0105>,使用理论值=是
终止测量/
ALIGN2 =坐标系/开始,回调:ALIGN1,列表=是
建坐标系/旋转,X正,至,MAN_LINE,关于,Z正
建坐标系/平移,X轴,MAN_PT
建坐标系/平移,Y轴,MAN_LINE
建坐标系/平移,Z 轴,MAN_PLN
坐标系/终止
C10 =注释/是否,是,全屏=否,自动继续=否,
Is the gage block position not changed?
IF_GOTO/C10.INPUT=="YES",转到 = MDCC
FW =文件/打开,C:\MPT.TXT,写入
V2 =循环/开始,标识=是,编号=(C8.INPUT-1),开始=1,跳过=,
偏置:X 轴=0,Y 轴=0,Z 轴=0,角度=0
MPT =特征/点,直角坐标
理论值/<0,16.9339,-5.146>,<-0.9999719,-0.0074991,0>
实际值/<279.75,-87.5656,-128.6474>,<-0.4714296,-0.7141432,-0.5174491>
测定/点,1,工作平面
触测/基本,常规,<0,16.9339,-5.146>,<-0.9999719,-0.0074991,0>,<279.75,-87.5656,-128.6474>,使用理论值=是
终止测量/
赋值/XXV=MPT.X
文件/写入行,FW,XXV
循环/终止
文件/关闭,FW,保留
模式/自动
C1 =注释/输入,是,全屏=否,
'INPUT the 1ST GAGE length:(in MM)'
C2 =注释/输入,是,全屏=否,
'INPUT the 2nd GAGE length:(in MM)'
C3 =注释/输入,是,全屏=否,
'INPUT the 3th GAGE length:(in MM)'
C4 =注释/输入,是,全屏=否,
'INPUT the 4th GAGE length:(in MM)'
C5 =注释/输入,是,全屏=否,
'INPUT the 5th GAGE length:(in MM)'
安全平面/Z正,40,Z正,0,关
MDCC =标号/
FR =文件/打开,C:\MPT.TXT,读取
V3 =文件/读取行,FR,{xa1}
V5 =文件/读取行,FR,{xa2}
V6 =文件/读取行,FR,{xa3}
V7 =文件/读取行,FR,{xa4}
文件/关闭,FR,保留
C6 =注释/输入,是,全屏=否,
'WHICH GAGE DO YOU WANT TO MEASURE? '
赋值/WW=4
赋值/XA=0
赋值/YY=4.5
赋值/YA=0
赋值/XB=C1.INPUT
赋值/ZZ=-10
赋值/NUM=C6.INPUT
转到/"L"+NUM
L1 =标号/
DCC_PLN =特征/平面,直角坐标,三角形
理论值/<0,4.5,0>,<0,0,1>
实际值/<168.4905,-47.5168,0.4351>,<0.0013886,0.0070617,0.9999741>
测定/平面,4
移动/安全平面
触测/基本,常规,<XA+3,YA+7,0>,<0,0,1>,<156.4905,-45.0128,0.4341>,使用理论值=是
触测/基本,常规,<XA+3,YA+2,0>,<0,0,1>,<156.4902,-50.0312,0.4694>,使用理论值=是
移动/安全平面
触测/基本,常规,<XA+XB-3,YA+2,0>,<0,0,1>,<180.4947,-50.008,0.4361>,使用理论值=是
触测/基本,常规,<XA+XB-3,YA+7,0>,<0,0,1>,<180.4864,-45.015,0.4007>,使用理论值=是
终止测量/
DCC_LINE =特征/直线,直角坐标,非定界
理论值/<3,0,-3>,<1,0,0>
实际值/<156.4954,-52.1835,-3.0015>,<1,-0.0002223,0>
测定/直线,2,工作平面
移动/安全平面
触测/基本,常规,<XA+3,YA,-3>,<0,-1,0>,<156.4954,-52.1835,-2.999>,使用理论值=是
移动/安全平面
触测/基本,常规,<XA+XB-3,YA,-3>,<0,-1,0>,<180.5,-52.1888,-3.0041>,使用理论值=是
终止测量/
DCC_PT =特征/点,直角坐标
理论值/<0,4.5,-3>,<-1,0,0>
实际值/<153.5083,-47.4887,-2.9827>,<-1,0,0>
测定/点,1,工作平面
移动/安全平面
触测/基本,常规,<XA,YA+4.5,-3>,<-1,0,0>,<153.5083,-47.4887,-2.9827>,使用理论值=是
终止测量/
ALIGN_DCC =坐标系/开始,回调:ALIGN2,列表=是
建坐标系/找平,Z正,DCC_PLN
建坐标系/旋转,X正,至,DCC_LINE,关于,Z正
建坐标系/平移,X轴,DCC_PT
建坐标系/平移,Y轴,DCC_LINE
建坐标系/平移,Z 轴,DCC_PLN
坐标系/终止
V1 =循环/开始,标识=是,编号=3,开始=1,跳过=,
偏置:X 轴=0,Y 轴=0,Z 轴=0,角度=0
移动/安全平面
PNT_A =特征/触测/矢量点/默认,直角坐标
理论值/<0,YY,ZZ>,<-1,0,0>
实际值/<-0.0138,4.5,-10>,<-1,0,0>
目标值/<0,YY,ZZ>,<-1,0,0>
捕捉=是
显示特征参数=否
显示相关参数=是
自动移动=否,距离=6
显示触测=否
移动/安全平面
PNT_B =特征/触测/矢量点/默认,直角坐标
理论值/<XB,YY,ZZ>,<1,0,0>
实际值/<29.9868,4.5,-10>,<1,0,0>
目标值/<XB,YY,ZZ>,<1,0,0>
捕捉=是
显示特征参数=否
显示相关参数=是
自动移动=否,距离=0
显示触测=否
DIM DIST1= 2D 距离点 PNT_B 至 点 PNT_A 平行 至 X 轴,无半径
AX MEAS NOMINAL OUTTOL
M 30.0007 XB 0.0006 -------->
注释/报告,
循环/终止
赋值/NUM=NUM+1
IF_GOTO/NUM==C8.INPUT+1,转到 = END
转到/"L"+NUM
L2 =标号/
IF/C2.INPUT<>0
赋值/XA=XA1
赋值/XB=C2.INPUT
赋值/YA=-(9+WW)
赋值/YY=4.5
转到/L1
END_IF/
L3 =标号/
IF/C3.INPUT<>0
赋值/XA=XA2
赋值/XB=C3.INPUT
赋值/YA=-2*(9+WW)
赋值/YY=4.5
转到/L1
END_IF/
L4 =标号/
IF/C4.INPUT<>0
赋值/XA=XA3
赋值/XB=C4.INPUT
赋值/YA=-3*(9+WW)
赋值/YY=4.5
转到/L1
END_IF/
L5 =标号/
IF/C5.INPUT<>0
赋值/XA=XA4
赋值/XB=C5.INPUT
赋值/YA=-4*(9+WW)
赋值/YY=4.5
转到/L1
END_IF/
END =标号/
移动/安全平面
LK CAMIO(MODUS)量块程序如下:
DMISMN/'Start Template',05.2
FILNAM/'Start Template',05.2
DV(0)=DMESWV/'83,1,1,20531'
UNITS/MM,ANGDEC
DECPL/ALL,DEFALT
V(0)=VFORM/ALL,PLOT
DISPLY/TERM,V(0),STOR,DMIS,V(0)
SNSET/APPRCH,5
SNSET/RETRCT,5
SNSET/SEARCH,5
SNSET/CLRSRF,15
SNSET/DEPTH,0
MODE/MAN
$$DMISMN/''
$$=========================$$$ PROGRAM TO ME$
ASURE GAUGE BLOCK $$$ ACCORDING THE ISO 10360-2 RUL$
ES WITH RESTRICTIONS $$$ $
$$$ THE REPETITION WILL NOT BE DONE OF A GAUGE $$$
$$IS OUT OF TOLERANCE $$$ $
$$$ LAST MODIFICATION: 18/12/2001 $
$$$===============================================$
=============$$DECLARATION OF THE VARIABLES
$$DONT'T MODIFY OR DELETE THIS SECTION
RECALL/SA(A0.0_B0.0_L90D5)
$$ DECL/DOUBLE,BLOCCO[5]
SNSLCT/SA(A0.0_B0.0_L90D5)
DECL/DOUBLE,BLOCCOJ
DECL/CHAR,20,BLOCCOJS
DECL/DOUBLE,BLOCCO1
DECL/DOUBLE,BLOCCO2
DECL/DOUBLE,BLOCCO3
DECL/DOUBLE,BLOCCO4
DECL/DOUBLE,BLOCCO5
$$ DECL/DOUBLE,MISURATO[3]
DECL/DOUBLE,MISURATO1
DECL/DOUBLE,MISURATO2
DECL/DOUBLE,MISURATO3
$$ DECL/DOUBLE,ERRORE[3]
DECL/DOUBLE,ERRORE1
DECL/DOUBLE,ERRORE2
DECL/DOUBLE,ERRORE3
DECL/DOUBLE,ALTEZZA
DECL/DOUBLE,LARGHEZZA
DECL/DOUBLE,PRIMO
DECL/DOUBLE,SECONDO
DECL/DOUBLE,VELMIS
DECL/DOUBLE,VELPOS
DECL/DOUBLE,ACCMIS
DECL/DOUBLE,ACCPOS
DECL/DOUBLE,FLYRAD
DECL/DOUBLE,PREHIT
DECL/DOUBLE,POSTHIT
DECL/DOUBLE,RETURN
DECL/DOUBLE,XSAFE
DECL/DOUBLE,ZSAFE
DECL/DOUBLE,XPTO1
DECL/DOUBLE,YPTO1
DECL/DOUBLE,ZPTO1
DECL/DOUBLE,XPTO2
DECL/DOUBLE,YPTO2
DECL/DOUBLE,ZPTO2
DECL/DOUBLE,MIS
DECL/DOUBLE,TOLL
DECL/DOUBLE,PO1X
DECL/DOUBLE,PO1Y
DECL/DOUBLE,PO1Z
DECL/DOUBLE,PO2X
DECL/DOUBLE,PO2Y
DECL/DOUBLE,PO2Z
DECL/DOUBLE,TRASX
DECL/INTGR,NUMMISURE
DECL/INTGR,NUMBLOCCHI
DECL/INTGR,I
DECL/INTGR,J
DECL/INTGR,MANALL
DECL/CHAR,20,MANALL1
DECL/INTGR,COMPTEMP
DECL/INTGR,TEMPX
DECL/INTGR,TEMPY
DECL/INTGR,TEMPZ
DECL/CHAR,64,FILENAME
DECL/CHAR,2,RISULTATO
DECL/CHAR,64,DAFILE
$$INITIAL SETTINGS AND MACHINE PARAMETERS
UNITS/MM, ANGDEC, TEMPC
PRCOMP/OFF
FINPOS/OFF
$$ RAPID/0.7500
D(MAC) = DATSET/MCS
WKPLAN/XYPLAN
SNSET/CLRSRF, 0.0000
SNSET/DEPTH, 0.0000
DECPL/ALL,4
MODE/MAN
$$THERMAL COMPENSATION
$$ TEXT/QUERY,(COMPTEMP),10,N,L,'DO YOU WANT TO ENABLE THE THERMAL COMPENSAT$
ION? (1=YES 0=NO)'
$$ IF/(COMPTEMP.LE.0.0)
$$ TECOMP/OFF
$$ ELSE
$$ TECOMP/ON,11.4
$$ ENDIF
$$ READING PARAMETER FROM "PARAMETRI.TXT"
$$ THIS FILE IS IN C:\ISO10360
DID(PARAMETRI)=DEVICE/STOR,'C:\ISO10360\PARAMETRI.TXT'
OPEN/DID(PARAMETRI),DIRECT,INPUT
$$HEADER
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
$$BLOCK DIMENSION
ALTEZZA=ASSIGN/9
LARGHEZZA=ASSIGN/35
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),NUMMISURE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),NUMBLOCCHI
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),BLOCCO1
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),BLOCCO2
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),BLOCCO3
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),BLOCCO4
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),BLOCCO5
$$ACCURACY
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),PRIMO
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),SECONDO
$$MOTION
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),VELPOS
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),VELMIS
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),ACCPOS
$$$$ FEDRAT/MESVEL,PCENT,0.2
$$ FEDRAT/POSVEL, PCENT,1
$$$$ ACLRAT/MESACL,PCENT,0.2
$$ ACLRAT/POSACL, PCENT,1
$$
$$ FLYRAD=ASSIGN/10
$$ FLY/FLYRAD
$$MEASURING PARAMETRS
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),PREHIT
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),RETURN
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),DAFILE
READ/DID(PARAMETRI),POSTHIT
SNSET/APPRCH, 6
SNSET/SEARCH, 6
SNSET/RETRCT, 6
CLOSE/DID(PARAMETRI)
$$SAFE CLEARANCE FOR THE GAUGE BLOCK
XSAFE=ASSIGN/15
ZSAFE=ASSIGN/70
$$SELECTING THE PROBE
DECL/CHAR,20,TASTATORE
$$ DECL/INTGR,TT
$$ TEXT/QUERY,(TASTATORE),256,AN,L,'ENTER THE PROBE FOR THE MEASURE'
TASTATORE=PROMPT/'ENTER THE PROBE FOR THE MEASURE[1 TO 6]',40,1
TASTATORE=ASSIGN/CONCAT(TASTATORE)
RECALL/SA(TASTATORE)
SNSLCT/SA(TASTATORE)
$$REQUEST TO PERFORM MANUAL ALIGNMENT
$$ TEXT/QUERY,(MANALL),10,N,L,'PERFORM THE MANUAL ALIGNMENT? (1=YES 2=NO)'
MANALL=PROMPT/'PERFORM THE MANUAL ALIGNMENT? (1=YES 2=NO)',40,1
$$ MANALL1=ASSIGN/CONCAT(MANALL1)
IF/(MANALL.EQ.2)
JUMPTO/(NOMANALL)
ENDIF
$$MANUAL ALIGNMENT
$$ TEXT/MAN,'MEASURE THE FRONT PLANE OF THE LONGEST BLOCK FOR Z DIRECTION '
F(PIANOZ)=FEAT/PLANE,CART,0,0,0,0,0,1
MEAS/PLANE,F(PIANOZ),3
ENDMES
DATDEF/FA(PIANOZ),DAT(A)
D(MANTEMP)=DATSET/DAT(A),ZDIR,ZORIG
$$ TEXT/MAN,' '
$$ TEXT/MAN,'MEASURE THE TOP PLANE OF THE LONGEST BLOCK FOR -Y DIRECTION'
$$ F(PLANEY)=FEAT/PLANE,CART,0,0,0,0,1,0
$$ MEAS/PLANE,F(PLANEY),3
$$ ENDMES
F(LINE0X)=FEAT/LINE,UNBND,CART,0,0,0,1,0,0,0,1,0
MEAS/LINE,F(LINE0X),2
ENDMES
DATDEF/FA(LINE0X),DAT(B)
D(MANTEMP)=DATSET/DAT(A),ZDIR,ZORIG,DAT(B),XDIR,YORIG
$$ TEXT/MAN,' '
$$ TEXT/MAN,'MEASURE THE POINT FOR THE X AXIS ORIGIN X'
F(ORIGINEX)=FEAT/POINT,CART,0,0,0,-1,0,0
MEAS/POINT,F(ORIGINEX),1
PTMEAS/CART,0,0,0,-1,0,0
ENDMES
DATDEF/FA(ORIGINEX),DAT(C)
D(MANTEMP)=DATSET/DAT(A),ZDIR,ZORIG,DAT(B),XDIR,YORIG,DAT(C),XORIG
PRCOMP/ON
D(MANTEMP)=TRANS/XORIG,PRBRAD,YORIG,PRBRAD,ZORIG,-PRBRAD
SAVE/D(MANTEMP)
$$POINT FOR OUTPUT FILE
RECALL/D(MAC)
PO1X=OBTAIN/FA(ORIGINEX),3
PO1Y=OBTAIN/FA(ORIGINEX),4
PO1Z=OBTAIN/FA(ORIGINEX),5
$$POINT FOR OUTPUT FILE
F(PO2)=FEAT/POINT,CART,0,0,0,1,0,0
CONST/POINT,F(PO2),MOVEPT,FA(ORIGINEX),BLOCCO1,0,0
PO2X=OBTAIN/FA(PO2),3
PO2Y=OBTAIN/FA(PO2),4
PO2Z=OBTAIN/FA(PO2),5
$$CNC MODE
(NOMANALL)
MODE/PROG,MAN
RECALL/D(MANTEMP)
$$OPENING THE OUTPUT FILE
FILENAME=PROMPT/'ENTER THE NAME OF THE DATA FILE WITHOUT EXTENSION'
FILENAME=ASSIGN/CONCAT(FILENAME,'.TXT')
FILENAME=ASSIGN/CONCAT('C:\ISO10360\DATI\',FILENAME)
DID(FILEDATI)=DEVICE/STOR,FILENAME
OPEN/DID(FILEDATI),DIRECT,OUTPUT,OVERWR
$$HEADER
WRITE/DID(FILEDATI),'"COORDINATES OF THE POINTS PO1 AND PO1 OF THE LONGEST GAUG$
E IN CMM SYSTEM"'
WRITE/DID(FILEDATI),'"PO1" ', PO1X, ' ', PO1Y, ' ', PO1Z, ' '
WRITE/DID(FILEDATI),'"PO2" ', PO2X, ' ', PO2Y, ' ', PO2Z, ' '
WRITE/DID(FILEDATI),'" "'
WRITE/DID(FILEDATI),'"=========================================================$
========================"'
WRITE/DID(FILEDATI),'"L.BPP" "LMIS1" "LMIS2" "LMIS3" " " "E" "DELTAL1" "DELTAL2$
" "DELTAL3" "F.TOLL"'
WRITE/DID(FILEDATI),'"=========================================================$
========================"'
WRITE/DID(FILEDATI),'" "'
$$$$OUTPUT ON TERMINAL
$$ V(UGO)=VFORM/ALL
$$ DISPLY/TERM,V(UGO),STOR,V(UGO)
$$MEASURING ALL BLOCKS
DO/J,1,NUMBLOCCHI,1
$$ BLOCCOJS=ASSIGN/CONCAT('BLOCCO',STR(J))
$$ TEXT/OUTFIL,CONCAT('BLOCCO MISURA : ' , STR(BLOCCO[J]))
$$POINT FOR THE DISTANCE
XPTO1=ASSIGN/0
YPTO1=ASSIGN/LARGHEZZA/2
ZPTO1=ASSIGN/ALTEZZA/2
$$ XPTO2=ASSIGN/BLOCCO[J]
IF/(J .EQ. 1)
XPTO2=ASSIGN/BLOCCO1
ENDIF
IF/(J .EQ. 2)
XPTO2=ASSIGN/BLOCCO2
ENDIF
IF/(J .EQ. 3)
XPTO2=ASSIGN/BLOCCO3
ENDIF
IF/(J .EQ. 4)
XPTO2=ASSIGN/BLOCCO4
ENDIF
IF/(J .EQ. 5)
XPTO2=ASSIGN/BLOCCO5
ENDIF
YPTO2=ASSIGN/LARGHEZZA/2
ZPTO2=ASSIGN/ALTEZZA/2
$$CNC ALIGNMENT
MIS=ASSIGN/4
TEMPX=ASSIGN/-XSAFE
GOTO/TEMPX,0,ZSAFE
F(PIANOZ)=FEAT/PLANE,CART,0,0,0,0,0,1
MEAS/PLANE,F(PIANOZ),4
PTMEAS/CART,MIS,MIS,0,0,0,1
TEMPZ=ASSIGN/LARGHEZZA-MIS
TEMPX=ASSIGN/XPTO2-MIS
PTMEAS/CART,MIS,TEMPZ,0,0,0,1
GOTO/MIS,TEMPZ,ZSAFE
GOTO/TEMPX,TEMPZ,ZSAFE
PTMEAS/CART,TEMPX,TEMPZ,0,0,0,1
PTMEAS/CART,TEMPX,MIS,0,0,0,1
ENDMES
DATDEF/FA(PIANOZ),DAT(A)
D(TEMP)=DATSET/DAT(A),ZDIR,ZORIG
TEMPY=ASSIGN/-MIS
GOTO/TEMPX,TEMPY,MIS
F(RETTAX)=FEAT/LINE,UNBND,CART,0,0,0,1,0,0,0,-1,0
MEAS/LINE,F(RETTAX),2
PTMEAS/CART,TEMPX,0,TEMPY,0,-1,0
GOTO/TEMPX,TEMPY,ZSAFE
GOTO/MIS,TEMPY,ZSAFE
PTMEAS/CART,MIS,0,TEMPY,0,-1,0
ENDMES
DATDEF/FA(RETTAX),DAT(B)
D(TEMP)=DATSET/DAT(A),ZDIR,ZORIG,DAT(B),-XDIR,YORIG
GOTO/TEMPY,TEMPY,TEMPY
F(ORIGINEX)=FEAT/POINT,CART,0,0,0,-1,0,0
MEAS/POINT,F(ORIGINEX),1
PTMEAS/CART,0,MIS,TEMPY,-1,0,0
ENDMES
DATDEF/FA(ORIGINEX),DAT(C)
D(TEMP)=DATSET/DAT(A),ZDIR,ZORIG,DAT(B),-XDIR,YORIG,DAT(C),XORIG
$$MEASURES
$$TOLERANCE FOR THE BLOCK
$$ TOLL=ASSIGN/PRIMO+(SECONDO*BLOCCO[J]/1000)
IF/(J .EQ. 1)
TOLL=ASSIGN/PRIMO+(SECONDO*BLOCCO1/1000)
ENDIF
IF/(J .EQ. 2)
TOLL=ASSIGN/PRIMO+(SECONDO*BLOCCO2/1000)
ENDIF
IF/(J .EQ. 3)
TOLL=ASSIGN/PRIMO+(SECONDO*BLOCCO3/1000)
ENDIF
IF/(J .EQ. 4)
TOLL=ASSIGN/PRIMO+(SECONDO*BLOCCO4/1000)
ENDIF
IF/(J .EQ. 5)
TOLL=ASSIGN/PRIMO+(SECONDO*BLOCCO5/1000)
ENDIF
$$MEASURES AND OUTPUT
DECL/DOUBLE,TEMPDZ
DO/I,1,NUMMISURE,1
TEMPX=ASSIGN/-XSAFE
GOTO/TEMPX,YPTO1,ZSAFE
TEMPDZ=ASSIGN/-ZPTO1
F(PTO1)=FEAT/POINT,CART,XPTO1,YPTO1,TEMPDZ,-1,0,0
MEAS/POINT,F(PTO1),1
PTMEAS/CART,XPTO1,YPTO1,TEMPDZ,-1,0,0
ENDMES
GOTO/TEMPX,YPTO1,ZSAFE
TEMPX=ASSIGN/XPTO2+XSAFE
GOTO/TEMPX,YPTO2,ZSAFE
TEMPDZ=ASSIGN/-ZPTO2
F(PTO2)=FEAT/POINT,CART,XPTO2,YPTO2,TEMPDZ,1,0,0
MEAS/POINT,F(PTO2),1
PTMEAS/CART,XPTO2,YPTO2,TEMPDZ,1,0,0
ENDMES
GOTO/TEMPX,YPTO2,ZSAFE
$$ T(LUNGBLOCCO)=TOL/DISTB,NOMINL,BLOCCO[J],-TOLL,TOLL,XAXIS
DECL/DOUBLE,TEMPTOLL
TEMPTOLL=ASSIGN/-TOLL
BLOCCO1=ASSIGN/90
T(LUNGBLOCCO)=TOL/DISTB,NOMINL,BLOCCO1,-0.0025,0.0025,XAXIS
OUTPUT/FA(PTO1),FA(PTO2),TA(LUNGBLOCCO)
ENDDO
DISPLY/OFF
PAUSE
ENDFIL
RationalDMIS纳诺量块程序如下:
DMISMN/'Created by 西安纳诺 on 星期三, 五月 16, 2012', 4.0
UNITS/MM, ANGDEC
WKPLAN/XYPLAN
RECALL/D(mcs)
MODE/PROG, MAN
SNSET/APPRCH, 5
SNSET/RETRCT, 5.000000
SNSET/DEPTH, 0.000000
SNSET/SEARCH, 10.000000
SNSET/CLRSRF, 10.000000
GEOALG/CIRCLE, LSTSQR
GEOALG/ARC, LSTSQR
GEOALG/PLANE, LSTSQR
$$
DECL/CHAR,10,intemp
DECL/REAL,bb,bb1
DECL/INTGR,I
DECL/CHAR,20,elnm
DECL/DOUBLE,xx,yy,zz
MODE/MAN
$$
$$
F(refplane) = FEAT/PLANE,CART,0,0,0,-1,0,0
MEAS/PLANE,F(refplane),3
ENDMES
DATDEF/FA(refplane),DAT(A)
F(refline) = FEAT/LINE,BND,CART,0, 0, 0, 0,1, 0,1, 0, 0
MEAS/LINE,F(refline),2
ENDMES
DATDEF/FA(refline),DAT(B)
F(refpoint) = FEAT/POINT,CART,0,0,0,0,0,1
MEAS/POINT,F(refpoint),1
ENDMES
DATDEF/FA(refpoint),DAT(C)
D(KGCRD) = DATSET/DAT(A), ZDIR, ZORIG,DAT(B),XDIR,YORIG,DAT(C),XORIG
RECALL/D(KGCRD)
$$
$$
intemp=prompt/'使用多大量块?'
bb=ASSIGN/VAL(intemp)
MODE/PROG,MAN
DO/I,1,3,1
GOTO/-6,4, 80
GOTO/-6, 4, -2
F(12) = FEAT/PLANE,CART, 0, 3, -2, -1,-0, 0
$$ Measurement points are created through actual points
MEAS/PLANE, F(12), 4
PTMEAS/CART, 0, 4, -2, -1,-0, 0
PTMEAS/CART, 0, 4, -7, -1,-0, 0
PTMEAS/CART, 0, 33, -7, -1,-0, 0
PTMEAS/CART, 0, 33, -2, -1,-0, 0
ENDMES
DATDEF/FA(12), DAT(E)
D(LEVEL_121) = DATSET/DAT(E), -XDIR, XORIG
F(P1) = FEAT/POINT,CART,0,18.5,-4.5,-1,-0,0
MEAS/POINT, F(P1), 1
PTMEAS/CART, 0,18.5,-4.5,-1,0,0
ENDMES
GOTO/-6, 18.5, 80
GOTO/bb+6, 18.5, 80
GOTO/bb+6, 18.5, -4.5
F(P2) = FEAT/POINT,CART, bb, 18.5, -4.5, 1.0000, 0.0000, 0.0000
MEAS/POINT, F(P2), 1
PTMEAS/CART, bb, 18.5, -4.5, 1.0000, 0.0000, 0.0000
GOTO/bb+6,18.5,80
ENDMES
CLOSE/DID(DEFAULTSCREEN)
T(DIS) = TOL/DISTB,NOMINL, bb, -1000, 1000,XAXIS,AVG
OUTPUT/FA(P1),FA(P2),TA(DIS)
DID(DEFAULTSCREEN) = DEVICE/TERM,'SCREENOUTPUT'
OPEN/DID(DEFAULTSCREEN),FDATA,V(DEFAULTFORMAT),OUTPUT
DECL/COMMON,REAL,TDISTB1_ACT
TDISTB1_ACT = VALUE/TA(DIS),ACT
TDISTB1_ACT = assign/(TDISTB1_ACT-bb)/1+bb
F(P3) = FEAT/POINT,CART, TDISTB1_ACT, 18.5, -4.5, 1.0000, 0.0000, 0.0000
T(TDISTB3) = TOL/DISTB,NOMINL, bb, -(0.0028+bb/300000), 0.0028+bb/300000,XAXIS,AVG
OUTPUT/FA(P1),F(P3), TA(TDISTB3)
ENDDO