Program to Create the Alignment of Arm2 (Client) CMM in Dual Arm Configuration
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 Arm1 (Server) program which shall be started prior startthe Arm2 (Client) 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)
STR1=ASSIGN/'THE SENSOR MOUNT SHALL BE SET AS PER THE SINGLE ARM CONFIGURATION.'
STR2=ASSIGN/'IF IT HAS BEEN DONE YOU CAN CONTINUE.'
STR3=ASSIGN/'OK TO CONINUE? 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.NE.1)
JUMPTO/(FINISH)
ENDIF
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(ARM2_SPH_1)=FEAT/SPHERE,OUTER,CART,0,0,0,DIAMETER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DUAL_ALIGNMENT) = LOCATE/FA(ARM2_SPH_1),FA(ARM2_SPH_2),FA(ARM2_SPH_3),FA(ARM2_SPH_4)
SETMACREF/ROTATE,D(ARM2_DUAL_ALIGNMENT)
SETMACREF/TRANS,D(ARM2_DUAL_ALIGNMENT)
DID(C3TRMATX)=DEVICE/STOR,'C:\METROSTAFF\ARCOCAD INSPECTION\DEFAULT\DUAL ARM - ARM 2 - ALIGNMENT.PCS'
OPEN/DID(C3TRMATX),PCS
SAVE/D(ARM2_DUAL_ALIGNMENT),DID(C3TRMATX)
CLOSE/DID(C3TRMATX)
STR1=ASSIGN/'THE SENSOR MOUNT NOW SHALL BE SET AS PER THE DUAL CONGURATION.'
STR2=ASSIGN/'IF YOU WILL NOT DO THEN THE ALIGNMENT WILL NOT WORK.'
STR3=ASSIGN/'ALSO REMEMBER TO RUN NOW THE ORIG SYNCHRONIZATION PROGRAM'
STR4=ASSIGN/CONCAT(STR1,CHR(10),CHR(10),STR2,CHR(10),CHR(10),STR3)
TEXT/QUERY,(AN_QUERY),40,AN,L,STR4
(FINISH)
ENDFIL