Helo, i have put the script in a .m1s file, i have set the following text:
CurrentFeed = GetOemDRO(818)
DoSpinStop()
ZMove = 50.00 'Distância na qual a maquina procura a sonda. No caso, ela desce 2 cm antes de abortar
ZOffset = 1.6 ' Altura da sua placa
ZSal = ZOffset + 3.4 'Depois que a sonda faz contato, ela sobe 2 mm + a altura da sonda.
StopZmove = 0
If GetOemLed (825)=0 Then
DoOEMButton (1010)
Code "G4 P2.5"
Code "G31 Z-"& ZMove & "F250"
While IsMoving()
Sleep(200)
Wend
Probepos = GetVar(2002)
If Probepos = - ZMove Then
responce = MsgBox ("**ERRO** " , 4 , "Erro na sonda" )
Code "G0 Z10"
StopZmove = 1
Code "F" &CurrentFeed
End If
If StopZmove = 0 Then
Code "G0 Z" & Probepos
While IsMoving ()
Sleep (200)
Wend
Call SetDro (2, ZOffset)
Code "G4 P1"
Code "G0 Z" & ZSal
Code "(Z zeroed)"
Code "F" &CurrentFeed
End If
Else
Code "(Check Ground Probe)"
End If
Exit Sub
That i got from internet.
I set OEM Trigger 1 in ports and pins, with f12 keyboard pressing.... and have set the trigger in external botons as 123 too (same as f12)
but i dont kno how to say to mach3 when i press f12, iwant execute the M100 macro.
Can you help me sir? please