Hello Guest it is October 23, 2019, 12:30:05 PM

Author Topic: Stop any movement of axis if Input is not active  (Read 2067 times)

0 Members and 1 Guest are viewing this topic.

Stop any movement of axis if Input is not active
« 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!

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: Stop any movement of axis if Input is not active
« Reply #1 on: December 28, 2017, 07:29:02 AM »
Assign the input as a limit switch?
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Stop any movement of axis if Input is not active
« Reply #2 on: December 28, 2017, 02:11:09 PM »
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!
« Last Edit: December 28, 2017, 02:19:07 PM by zmnck »

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: Stop any movement of axis if Input is not active
« Reply #3 on: December 28, 2017, 03:48:53 PM »
Have the button trigger the Feedhold.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline TPS

*
  •  1,391 1,391
    • View Profile
Re: Stop any movement of axis if Input is not active
« Reply #4 on: December 29, 2017, 02:43:46 AM »
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:

Code: [Select]

'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

Code: [Select]

IF ((GetoemDRO(806) > 0) and (Input1 = False)) Then
  DoOEMButton(1003)
End If


Thomas   
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Stop any movement of axis if Input is not active
« Reply #5 on: December 29, 2017, 06:43:39 AM »
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.

Offline TPS

*
  •  1,391 1,391
    • View Profile
Re: Stop any movement of axis if Input is not active
« Reply #6 on: December 29, 2017, 06:50:12 AM »
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:

Code: [Select]

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
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.