RE:
$$$$$$$$$$$$$$$$$$$$$$$$$$$$转台旋转建立坐标系$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$这段程序需要软件脱机验证正确性$$$$$$$$$$$$$$$$$$$$
MODE/PROG,MAN
RECALL/D(MCS)
DECL/COMMON,INTGR,I
DECL/COMMON,DOUBLE,SES[3]
TEMPCHAR = PROMPT/TEXT,'将测头移至图象处'
F(CRD_PLN) = FEAT/PLANE,CART,0,0,0,0,0,1
F(SESPT) = FEAT/POINT,CART,0,0,0,0,0,1
MEAS/POINT,F(SESPT),0
ENDMES
SES[1] = OBTAIN/FA(SESPT),3
SES[2] = OBTAIN/FA(SESPT),4
SES[3] = OBTAIN/FA(SESPT),5
MEAS/PLANE,F(CRD_PLN),4
DO/I,1,4
ROTAB/RT(MASTERTABLE), ABSL, SHORT, ROTTOT, 90*I
PTMEAS/CART,SES[1], SES[2], SES[3] , 0, 0, -1
ENDDO
ENDMES
D(DEMO) = DATSET/FA(CRD_PLN), -ZDIR, ZORIG
MEAS/POINT,F(SESPT),0
ENDMES
SES[1] = OBTAIN/FA(SESPT),3
SES[2] = OBTAIN/FA(SESPT),4
SES[3] = OBTAIN/FA(SESPT),5
F(CRD_CIR) = FEAT/CIRCLE,OUTER,CART,0,0,0,0,0,1,10
MEAS/CIRCLE,F(CRD_CIR),4
DO/I,1,4
ROTAB/RT(MASTERTABLE),ABSL,SHORT,ROTTOT,90*I
PTMEAS/CART,SES[1], SES[2], SES[3], -1, 0, 0
ENDDO
ENDMES
D(DEMO) = TRANS/FA(CRD_CIR),XORIG,YORIG
其中RT(MASTERTABLE)是转台名称,程序里不包含定义和校验,而且转台的机制好象不太确定,为了安全起见,先脱机进行下验证。