首页/文章/ 详情

CAMIO 8.3 (MODUS 1.8)量块程序

1年前浏览1947

校准依据

《JJF1064-2010坐标测量机校准规范》(基本等同于ISO10360)

标准器:尺寸实物标准器、检测球、二维靶标

校准项目:

 (1)尺寸测量误差校准

     对于三维测头,通过比较5个不同长度尺寸实物标准器的校准值和指示值,评价坐标测量机是否符合规定的最大允许示值误差MPEE。5个尺寸实物标准器放在测量空间的7个不同的方向或位置,各测量3次,共进行105次测量。

(2)探测误差校准

     通过确定测量点到最小二乘拟合球球心距离的范围,评价三维探测误差P是否符合规定的最大允许探测误差MPEP。


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测量技术
ADSUGUM3DEC
著作权归作者所有,欢迎分享,未经许可,不得转载
首次发布时间:2023-07-07
最近编辑:1年前
山涧果子
大专 签名征集中
获赞 203粉丝 48文章 1203课程 0
点赞
收藏
未登录
还没有评论
课程
培训
服务
行家
VIP会员 学习 福利任务 兑换礼品
下载APP
联系我们
帮助与反馈