Hello Guest it is April 20, 2024, 11:54:25 AM

Author Topic: reset a tool length in contact with a probe  (Read 2704 times)

0 Members and 1 Guest are viewing this topic.

reset a tool length in contact with a probe
« on: January 26, 2012, 02:16:29 AM »
hello
 does anyone could tell me with what command (macro) to be afraid to reset a tool length in contact with a probe
 thank you
Re: reset a tool length in contact with a probe
« Reply #1 on: January 27, 2012, 05:50:30 PM »
hello
 I wrote a macro, but it was a mistake I do not
 comments are in French, sorry
 the second part only works if it is also the first and

CODE "G00 G53 Z0"
While ISMOVING()
Wend
CODE "G00 G53 X40 Y0"
MACHMSG("CHANGEZ L'OUTIL ET APPUYEZ SUR OK", "CHANGEMENT D'OUTIL",1)
*****part II****
PALPX = GETOEMDRO(1010)
PALPY = GETOEMDRO(1011)
CODE "G00 G53 X"& PALPX &" Y"& PALPY
While ISMOVING()
Wend
'Lancement de la commande de probe rapide vers le bas
SetOEMDRO(1000, 2) ' Numéro de l'axe ou faire le probe (0=X, 1=Y, 2=Z)
SetOEMDRO(1001, -90) ' Course maxi (le signe indique le sens de déplacement)
SetOEMDRO(1002, 20) ' Feed rate
SetOEMDRO(1003, 9) ' Numéro de l'entré de plapage (1 à 16
SetOEMDRO(1004, 1) ' état de l'entrée attendu (0 ou 1)
NotifyPlugins(3000)

' Attente fin de probe descente
While (GetOEMDRO(1000) = 0)
Sleep(10)
Wend
'Si succès, lancement de probe lent ver le haut
If (GetOEMDRO(1000) = 1) Then
SetOEMDRO(1000, 2) ' Numéro de l'axe ou faire le probe (0=X, 1=Y, 2=Z)
SetOEMDRO(1001,+10) ' Remontée en Z
SetOEMDRO(1002, 1) ' Feed rate
SetOEMDRO(1003, 9) ' Numéro de l'entré de plapage (1 à 16
SetOEMDRO(1004, 0) ' Attente re-laché de l'entrée 9
NotifyPlugins(3000)
' Attente fin de probe
While (GetOEMDRO(1000) = 0)
Sleep(10)
Wend
If (GetOEMDRO(1000) = 1) Then
ZProbe = GetOEMDRO(1001) ' Lecture de la position de palpage
Z = GetOEMDRO(85) ' Lecture positionactuelle
HPalpeur = 30 ' Déclaration hauteur palpeur
Zero = Z - ZProbe + HPalpe ' Distance erreur liée à deceleration
Zero = GetOEMdro(802)
SetUserdro(1050,Zero)

Code "G0 G53 Z0"
While IsMoving()
Wend
Else
'Message ("Fin de probe avec erreur palpage lent")
End If
Else
'Message ("Fin de probe avec erreur palpage rapide")

Does any one happen to correct my macro
 thank you very much
Chris
« Last Edit: January 27, 2012, 05:53:29 PM by ch_porchet »