Machsupport Forum
Mach Discussion => Brains Development => Topic started by: zmnck on December 28, 2017, 03:15:17 AM
-
Hello,
How to stop any movement of axis (when JOGĂng or when G-Code is active) if Input is not active. ?
Cheers!
-
Assign the input as a limit switch?
-
Hello,
Thanks for you reply.
But I think no, because I'm using Mach3 for this machine, you can watch on YouTube:
https://www.youtube.com/watch?v=UZgq2EKJ3qE
I need to stop the movement if Nail Gun is in the below, and when he back on the top the movement can be done.
So I think I should write macro to wait (sleep) until Input * is active...
But I'm wondering why there is no such thing to stop axis while G-Code is running to stop movement if button is pressed and when is realease G-Code can be resumed.....
Also I have tried to write a Brain (Input 1 -> No operation -> OEM @250 Inhibit axis movement X) but it's not working while G-Code is running.
Thanks for your answer, if you have any suggestion I will kindly accept it.
Best wishes,
Thanks!
-
Have the button trigger the Feedhold.
-
Hi,
i think you have to "split" this into two parts.
part 1 witch is in the macro what enables the nailer.
here you have to wait for the Input after the nailing something like this:
'wait for Input1
While Input1 = false
Sleep(200)
Wend
part 2 will be in macropump, and only stop X-Axis if x-Axis is running and Input1 is off
IF ((GetoemDRO(806) > 0) and (Input1 = False)) Then
DoOEMButton(1003)
End If
Thomas
-
Hello,
Very good idea Thomas, thanks.
Can you please explain me what are you calling "macropump" ?
IF ((GetoemDRO(806) > 0) and (Input1 = False)) Then
DoOEMButton(1003)
End If
Thanks.
-
OK, no problem.
in your macrofolder (normaly C:\Mach3\macros\yourprofilename)
should be a macro called macropump.m1s .
if not create one with Texteditor and put These code in:
Sub Main()
IF ((GetoemDRO(806) > 0) and (Input1 = False)) Then
DoOEMButton(1003)
End If
End Sub
make sure that in Config -> General Config -> Run Macro Pump is enabled.
Restart Mach3
test.
Thomas