Difference between revisions of "Program to Create Origin of Arm1 (Server) CMM in Dual Arm Configuration"

From ArcoWiki
Jump to: navigation, search
Line 2: Line 2:
 
This program is used to establish a new origin in a dual arm configuration.<br />
 
This program is used to establish a new origin in a dual arm configuration.<br />
 
The CMM shall be already aligned with the common reference system.<br />
 
The CMM shall be already aligned with the common reference system.<br />
The program runs in [[CNC Mode|CNC mode]], it is necessary to [[assign]] the [[variables]] to define the probe name and the safety distance in Y.<br />
+
The program runs in [[CNC Mode|CNC mode]], it is necessary to [[assign]] the [[variables]] to define the probe name, the position of the reface sphere and the safety distance in Y.<br />
 
The Arm 1 program shall be executed prior the [[Program to Create Origin of Arm 2 (Client) CMM in Dual Arm Configuration|execution of the Arm2 (Client) program]].<br />
 
The Arm 1 program shall be executed prior the [[Program to Create Origin of Arm 2 (Client) CMM in Dual Arm Configuration|execution of the Arm2 (Client) program]].<br />
  
Line 10: Line 10:
 
<code>PROBE_NAME=ASSIGN/'P1_0_0P0_0'</code>  Name of the probe<br />
 
<code>PROBE_NAME=ASSIGN/'P1_0_0P0_0'</code>  Name of the probe<br />
 
<code>SAFEY=ASSIGN/200</code> Safety Distance from the sphere  <br />
 
<code>SAFEY=ASSIGN/200</code> Safety Distance from the sphere  <br />
 +
<code>XX=ASSIGN/651.07</code> X absolute position of the reference sphere in MAC coordinate system
 +
<code>YY=ASSIGN/510.95</code> Y absolute position of the reference sphere in MAC coordinate system
 +
<code>ZZ=ASSIGN/-286.67</code> Z absolute position of the reference sphere in MAC coordinate system
 +
  
 
== Program ==
 
== Program ==
Line 15: Line 19:
 
<code>
 
<code>
 
MODE/PROG,MAN<br />
 
MODE/PROG,MAN<br />
 
USE/F(SPHERE_ORIG)<br />
 
SAVE/FA(SPHERE_ORIG)<br />
 
  
 
DECL/DOUBLE,XX,YY,ZZ,SAFEY<br />
 
DECL/DOUBLE,XX,YY,ZZ,SAFEY<br />
 
DECL/CHAR,100,PROBE_NAME<br />
 
DECL/CHAR,100,PROBE_NAME<br />
  
PROBE_NAME=ASSIGN/'P2_0_0P0_0'<br />
+
PROBE_NAME=ASSIGN/'P1_0_0P0_0'<br />
 
SAFEY=ASSIGN/200<br />
 
SAFEY=ASSIGN/200<br />
 +
XX=ASSIGN/651.07<br />
 +
YY=ASSIGN/510.95<br />
 +
ZZ=ASSIGN/-286.67<br />
  
 
SNSLCT/S(@PROBE_NAME)<br />
 
SNSLCT/S(@PROBE_NAME)<br />
  
XX=OBTAIN/F(SPHERE_ORIG),4<br />
+
MODE/PROG,MAN<br />
YY=OBTAIN/F(SPHERE_ORIG),5<br />
+
GOTO/xx,yy-safey,zz<br />
ZZ=OBTAIN/F(SPHERE_ORIG),6<br />
+
F(SPHERE_ARM1)=FEAT/SPHERE,OUTER,CART,xx,yy,zz,25.4,0.00000000,0.00000000,1.00000000<br />
 
+
MEAS/SPHERE,F(SPHERE_ARM1),5<br />
 
 
SNSET/APPRCH,5.0000<br />
 
SNSET/RETRCT,5.0000<br />
 
SNSET/SEARCH,10.0000<br />
 
 
 
GOTO/xx,yy+safey,zz<br />
 
F(SPHERE_ARM2)=FEAT/SPHERE,OUTER,CART,XX,YY,ZZ,25.4,0.00000000,0.00000000,1.00000000<br />
 
MEAS/SPHERE,F(SPHERE_ARM2),5<br />
 
 
ENDMES<br />
 
ENDMES<br />
GOTO/xx,yy+safey,zz<br />
+
GOTO/xx,yy-safeY,zz<br />
 
 
V(TEXT)=VFORM/ALL<br />
 
DISPLY/STOR,V(TEXT)<br />
 
T(3D)=TOL/DISTB,NOMINL,0.0000,-0.0200,0.0200,PT2PT<br />
 
T(DX)=TOL/DISTB,NOMINL,0.0000,-0.0200,0.0200,XAXIS<br />
 
T(DY)=TOL/DISTB,NOMINL,0.0000,-0.0200,0.0200,YAXIS<br />
 
T(DZ)=TOL/DISTB,NOMINL,0.0000,-0.0200,0.0200,ZAXIS<br />
 
 
 
OUTPUT/FA(SPHERE_ORIG),FA(SPHERE_ARM2),TA(3D)<br />
 
OUTPUT/FA(SPHERE_ORIG),FA(SPHERE_ARM2),TA(DX)<br />
 
OUTPUT/FA(SPHERE_ORIG),FA(SPHERE_ARM2),TA(DY)<br />
 
OUTPUT/FA(SPHERE_ORIG),FA(SPHERE_ARM2),TA(DZ)<br />
 
 
DISPLY/OFF<br />
 
  
DECL/DOUBLE,XDEV,YDEV,ZDEV,3DDEV<br />
+
DECL/DOUBLE,xx,yy,zz<br />
XDEV=OBTAIN/TA(DX),3<br />
+
xx=OBTAIN/FA(Sphere_ARM1),4<br />
YDEV=OBTAIN/TA(DY),3<br />
+
YY=OBTAIN/FA(Sphere_ARM1),5<br />
ZDEV=OBTAIN/TA(DZ),3<br />
+
ZZ=OBTAIN/FA(Sphere_ARM1),6<br />
3DDEV=OBTAIN/TA(3D),3<br />
 
  
DECL/CHAR,100,txt<br />
+
F(SPHERE_ORIG)=FEAT/SPHERE,OUTER,CART,xx,yy,zz,25.4,0.00000000,0.00000000,1.00000000<br />
txt=ASSIGN/CONCAT('The deviation on the origin is:',CHR(10),'X: ',STR(XDEV),CHR(10),'Y: ',STR(YDEV),CHR(10),'Z ',STR(ZDEV),CHR(10),'3D: ',STR(3DDEV),CHR(10),CHR(10),'DO YOU WANT TO APPLY THE CORRECTION? (1-YES 0-NO)'<br />
+
FA(SPHERE_ORIG)=FEAT/SPHERE,OUTER,CART,xx,yy,zz,25.4,0.00000000,0.00000000,1.00000000<br />
  
TEXT/QUERY,(AN_QUERY),40,N,L,TXT<br />
+
SHARE/F(SPHERE_ORIG)</code>
IF/(AN_QUERY.EQ.1)<br />
 
D(ORIG_ARM2) = TRANS/XORIG,FA(SPHERE_ARM2),YORIG,FA(SPHERE_ARM2),ZORIG,FA(SPHERE_ARM2)<br />
 
D(ORIG_ARM2) = TRANS/XORIG,-XX,YORIG,-YY,ZORIG,-ZZ<br />
 
SETMACREF/TRANS,D(ORIG_ARM2)<br />
 
ENDIF<br />
 
</code>
 
  
 
[[Category:Help_On_Line]]
 
[[Category:Help_On_Line]]

Revision as of 17:00, 15 December 2017

Description

This program is used to establish a new origin in a dual arm configuration.
The CMM shall be already aligned with the common reference system.
The program runs in CNC mode, it is necessary to assign the variables to define the probe name, the position of the reface sphere and the safety distance in Y.
The Arm 1 program shall be executed prior the execution of the 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
SAFEY=ASSIGN/200 Safety Distance from the sphere
XX=ASSIGN/651.07 X absolute position of the reference sphere in MAC coordinate system YY=ASSIGN/510.95 Y absolute position of the reference sphere in MAC coordinate system ZZ=ASSIGN/-286.67 Z absolute position of the reference sphere in MAC coordinate system


Program

MODE/PROG,MAN

DECL/DOUBLE,XX,YY,ZZ,SAFEY
DECL/CHAR,100,PROBE_NAME

PROBE_NAME=ASSIGN/'P1_0_0P0_0'
SAFEY=ASSIGN/200
XX=ASSIGN/651.07
YY=ASSIGN/510.95
ZZ=ASSIGN/-286.67

SNSLCT/S(@PROBE_NAME)

MODE/PROG,MAN
GOTO/xx,yy-safey,zz
F(SPHERE_ARM1)=FEAT/SPHERE,OUTER,CART,xx,yy,zz,25.4,0.00000000,0.00000000,1.00000000
MEAS/SPHERE,F(SPHERE_ARM1),5
ENDMES
GOTO/xx,yy-safeY,zz

DECL/DOUBLE,xx,yy,zz
xx=OBTAIN/FA(Sphere_ARM1),4
YY=OBTAIN/FA(Sphere_ARM1),5
ZZ=OBTAIN/FA(Sphere_ARM1),6

F(SPHERE_ORIG)=FEAT/SPHERE,OUTER,CART,xx,yy,zz,25.4,0.00000000,0.00000000,1.00000000
FA(SPHERE_ORIG)=FEAT/SPHERE,OUTER,CART,xx,yy,zz,25.4,0.00000000,0.00000000,1.00000000

SHARE/F(SPHERE_ORIG)