Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: robertobarbieri on February 24, 2019, 05:18:22 PM
-
Helo guys, im starting with Mach3, at this moment using a demo version... and i want to test somethings before buying...
First, sry for my bad english, i know thats not to good.
Well, i want to make a external control to make some operations, just pause, stop and PROBE
I did not found nothing about this, for pause and stop its EASY but for Auto Tool Zero... cant find OEM of this... can someone help me?
-
Auto Tool Zero is not a single OEM function, it is a couple of code lines.
so OEMTrigger and Triggermacro will be be your friends (search keywords).
-
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
-
ok, seams to be to difficult to use the search function
1.
Config -> Ports&Pins -> Input signals -> asign OEM Trig#1 to the right Input Signal (no emlation, no hotkey)
2.
Config -> System Horkey Setup ->Trigger #OEM code -> set 1 to 301
3.
create a macro M304.M1S
macro code:
SetTriggerMacro(301)
4.
Config -> General Config -> seciton Startup Modals -> Initialization String -> Add the following: M304
5.
restart Mach3
6.
create a macro M301.M1s
macro code:
If IsActive (OEMTRIG1) Then
Code("M whaeveryouwhant")
End If
-
Helo, tnx for help. but yes, when you dont know what to search is very hard to use the function haha.
I made all the steps you said, and still not working, but im sure is a wrong in the probe script, i will keep trying, tnx a lot for your time
-
enter a
MSGBox "i am in probescript"
at the beginning of your script to see that it us getting called.
Config -> General Config -> seciton Startup Modals -> Initialization String -> use init string on all "resets" -> should be enabled