用於在雙臂配置中創建Arm1(服務器)CMM對齊的程序

出自 ArcoWiki
前往: 導覽搜尋

Description

This program is used to establish a new software alignment in a dual arm configuration.
The current software alignment, if present, will be wiped and overwritten with the new one.
The program runs in MAN mode, it is necessary to assign the variables to define the probe name and the sphere diameter.
This program runs together the relative Arm2 (Client) program which shall be started after starting the Arm1 (Server) program.

Variables to be Assigned

In order to have the program run it is necessary to assign the following variables:

PROBE_NAME=ASSIGN/'P1_0_0P0_0' Name of the probe
DIAMETER=ASSIGN/25 Diameter of the sphere

Program

DECL/CHAR,100,STR1,STR2,STR3,STR4
STR1=ASSIGN/'THIS PROGRAM WILL WIPE THE CURRENT DUAL ARM ALIGNMENT!!!!'
STR2=ASSIGN/'ARE YOU SURE YOU WANT TO CONTINUE? '
STR3=ASSIGN/' THE OPERATION HAVE NO UNDO!!! 1- YES OTHER - NO'
STR4=ASSIGN/CONCAT(STR1,CHR(10),CHR(10),STR2,CHR(10),CHR(10),STR3)
TEXT/QUERY,(AN_QUERY),40,AN,L,STR4

IF/(AN_QUERY.EQ.1)
JUMPTO/(RUN)
ELSE
JUMPTO/(FINISH)
ENDIF


(RUN)

DECL/DOUBLE,DIAMETER
DECL/CHAR,100,PROBE_NAME
PROBE_NAME=ASSIGN/'P1_0_0P0_0'
DIAMETER=ASSIGN/25


SNSLCT/SA(@PROBE_NAME)

SETMACREF/INIT
RECALL/D(MAC)

TEXT/MAN,'Measure sphere 1'
F(ARM1_SPH_1)=FEAT/SPHERE,OUTER,CART,0,0,0,DIAMETER
MEAS/SPHERE,F(ARM1_SPH_1),5
ENDMES

TEXT/MAN,'Measure sphere 2'
F(ARM1_SPH_2)=FEAT/SPHERE,OUTER,CART,0,0,0,DIAMETER
MEAS/SPHERE,F(ARM1_SPH_2),5
ENDMES

TEXT/MAN,'Measure sphere 3'
F(ARM1_SPH_3)=FEAT/SPHERE,OUTER,CART,0,0,0,DIAMETER
MEAS/SPHERE,F(ARM1_SPH_3),5
ENDMES

TEXT/MAN,'Measure sphere 4'
F(ARM1_SPH_4)=FEAT/SPHERE,OUTER,CART,0,0,0,DIAMETER

MEAS/SPHERE,F(ARM1_SPH_4),5
ENDMES

DECL/DOUBLE,XX,YY,ZZ
XX=OBTAIN/FA(ARM1_SPH_1),4
YY=OBTAIN/FA(ARM1_SPH_1),5
ZZ=OBTAIN/FA(ARM1_SPH_1),6
F(ARM2_SPH_1)=FEAT/SPHERE,OUTER,CART,XX,YY,ZZ,DIAMETER

XX=OBTAIN/FA(ARM1_SPH_2),4
YY=OBTAIN/FA(ARM1_SPH_2),5
ZZ=OBTAIN/FA(ARM1_SPH_2),6
F(ARM2_SPH_2)=FEAT/SPHERE,OUTER,CART,XX,YY,ZZ,DIAMETER

XX=OBTAIN/FA(ARM1_SPH_3),4
YY=OBTAIN/FA(ARM1_SPH_3),5
ZZ=OBTAIN/FA(ARM1_SPH_3),6
F(ARM2_SPH_3)=FEAT/SPHERE,OUTER,CART,XX,YY,ZZ,DIAMETER

XX=OBTAIN/FA(ARM1_SPH_4),4
YY=OBTAIN/FA(ARM1_SPH_4),5
ZZ=OBTAIN/FA(ARM1_SPH_4),6
F(ARM2_SPH_4)=FEAT/SPHERE,OUTER,CART,XX,YY,ZZ,DIAMETER


SHARE/F(ARM1_SPH_1)
SHARE/F(ARM1_SPH_2)
SHARE/F(ARM1_SPH_3)
SHARE/F(ARM1_SPH_4)

(FINISH)
ENDFIL