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

From ArcoWiki
Jump to: navigation, search
Line 3: Line 3:
 
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 and the safety distance in Y.<br />
This program runs in association with its [[Program to Create Origin of Arm1 (Server) CMM in Dual Arm Configuration|relative Arm1 (Server) program]] which shall be executed prior the execution of the Arm2 (Client) program.<br />
+
This program runs together with the [[Program to Create Origin of Arm1 (Server) CMM in Dual Arm Configuration|relative Arm1 (Server) program]] which shall be executed prior the execution of the Arm2 (Client) program.<br />
  
 
== Variables to be Assigned ==
 
== Variables to be Assigned ==
 
In order to have the program run it is necessary to assign the following variables:<br />
 
In order to have the program run it is necessary to assign the following variables:<br />
  
<code>PROBE_NAME=ASSIGN/'P2_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 />
  
Line 16: Line 16:
 
MODE/PROG,MAN<br />
 
MODE/PROG,MAN<br />
  
 +
DELETE/F(SPHERE_ORIG)<br />
 
USE/F(SPHERE_ORIG)<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 />

Revision as of 17:04, 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 and the safety distance in Y.
This program runs together with the relative Arm1 (Server) program which 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

Program

MODE/PROG,MAN

DELETE/F(SPHERE_ORIG)
USE/F(SPHERE_ORIG)

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

PROBE_NAME=ASSIGN/'P2_0_0P0_0'
SAFEY=ASSIGN/200

SNSLCT/S(@PROBE_NAME)

XX=OBTAIN/F(SPHERE_ORIG),4
YY=OBTAIN/F(SPHERE_ORIG),5
ZZ=OBTAIN/F(SPHERE_ORIG),6


SNSET/APPRCH,5.0000
SNSET/RETRCT,5.0000
SNSET/SEARCH,10.0000

GOTO/xx,yy+safey,zz
F(SPHERE_ARM2)=FEAT/SPHERE,OUTER,CART,XX,YY,ZZ,25.4,0.00000000,0.00000000,1.00000000
MEAS/SPHERE,F(SPHERE_ARM2),5
ENDMES
GOTO/xx,yy+safey,zz

V(TEXT)=VFORM/ALL
DISPLY/STOR,V(TEXT)
T(3D)=TOL/DISTB,NOMINL,0.0000,-0.0200,0.0200,PT2PT
T(DX)=TOL/DISTB,NOMINL,0.0000,-0.0200,0.0200,XAXIS
T(DY)=TOL/DISTB,NOMINL,0.0000,-0.0200,0.0200,YAXIS
T(DZ)=TOL/DISTB,NOMINL,0.0000,-0.0200,0.0200,ZAXIS


OUTPUT/FA(SPHERE_ORIG),FA(SPHERE_ARM2),TA(3D)
OUTPUT/FA(SPHERE_ORIG),FA(SPHERE_ARM2),TA(DX)
OUTPUT/FA(SPHERE_ORIG),FA(SPHERE_ARM2),TA(DY)
OUTPUT/FA(SPHERE_ORIG),FA(SPHERE_ARM2),TA(DZ)

DISPLY/OFF

DECL/DOUBLE,XDEV,YDEV,ZDEV,3DDEV
XDEV=OBTAIN/TA(DX),3
YDEV=OBTAIN/TA(DY),3
ZDEV=OBTAIN/TA(DZ),3
3DDEV=OBTAIN/TA(3D),3

DECL/CHAR,100,txt
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)'

TEXT/QUERY,(AN_QUERY),40,N,L,TXT
IF/(AN_QUERY.EQ.1)
D(ORIG_ARM2) = TRANS/XORIG,FA(SPHERE_ARM2),YORIG,FA(SPHERE_ARM2),ZORIG,FA(SPHERE_ARM2)
D(ORIG_ARM2) = TRANS/XORIG,-XX,YORIG,-YY,ZORIG,-ZZ
SETMACREF/TRANS,D(ORIG_ARM2)
ENDIF