Hello Guest it is April 26, 2024, 08:17:48 PM

Author Topic: simple zero piece  (Read 1217 times)

0 Members and 1 Guest are viewing this topic.

simple zero piece
« on: August 28, 2022, 03:48:30 AM »
Good morning
I found on the site this simple macro for zero piece:
Message ("Auto Zeroing ...")
If IsSuchSignal (22) Then
code "G31 Z-3 F20"
While IsMoving ()
Wend
Call SetDRO (2, .375)
code "G1 Z1"
End If

I modified it for my cnc:
    Speak (" CONFERMARE ZERO PEZZO") 'Avviso Vocale
Tasto = MsgBox("ZERO PEZZO" ,1+64, "CONFERMARE")
If Tasto <> 1 Then
    Exit Sub
End If
Message( "ZERO PEZZO." )
F4= GETOEMDRO(1151) ' read PLATE HEIGHT
SetOEMDro (802, 0.0000)
If IsSuchSignal (22) Then  '  Probe abilitato
code "G31 Z-10 F100"

Call SetDRO( 2, .1)
code "G1 Z1"
End If
   While IsMoving()
   Sleep(500)
   Wend
A1= GETOEMDRO(802) ' reads value of Z
   SetDRO(2,A1+F4)

I changed the line (I don't know what that means):
Call SetDRO (2, .375)
Call SetDRO( 2, .1)
now since it is not in my capacity - skills I would like to ask, if it is reliable - safe to use, I state that I have tried it a few times and it works well.
I thank those who can help me