Hello Guest it is March 28, 2024, 08:15:36 AM

Author Topic: Gcode pauses after macro  (Read 2752 times)

0 Members and 1 Guest are viewing this topic.

Gcode pauses after macro
« on: August 17, 2021, 08:04:22 PM »
So I created a macro on my Mach3 machine that does what I want when I run the script in the script editor. I added the macro to a test gcode file and when I run it, the machine does run the macro but won't move past that.

I've searched a bunch but haven't found anything helpful yet.

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: Gcode pauses after macro
« Reply #1 on: August 22, 2021, 02:15:36 PM »
Posting a copy of the macro will help.
Without engineers the world stops
Re: Gcode pauses after macro
« Reply #2 on: September 03, 2021, 11:59:43 AM »
I have attached my macro.

Pressing start again after the macro completes does get the machine moving again, but I would like this to be automatic.

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Gcode pauses after macro
« Reply #3 on: September 03, 2021, 01:25:44 PM »
Try adding the line

DoOEMButton(1000)

to the end of your macro then save the change. This should make it automatic.

Tweakie.
PEACE
Re: Gcode pauses after macro
« Reply #4 on: September 03, 2021, 01:48:50 PM »
Hah, I should have thought of that. Thank you for your help!
Re: Gcode pauses after macro
« Reply #5 on: September 09, 2021, 12:47:29 PM »
So adding DoOEMButton(1000) just causes the macro to act like it was skipped over. The machine does not do what the macro is supposed to do and it just moves on with the next lines of code.

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Gcode pauses after macro
« Reply #6 on: September 09, 2021, 10:11:35 PM »
Add the lines

While IsMoving ()
Wend

After your macro instructions but just before the line

DoOEMButton(1000)

Tweakie.
PEACE
Re: Gcode pauses after macro
« Reply #7 on: September 12, 2021, 12:36:31 PM »
I REALLY appreciate your help with this, but it's still not working correctly. :-(

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Gcode pauses after macro
« Reply #8 on: September 12, 2021, 10:29:31 PM »
Try the attached script ( I removed some spaces ). After downloading, rename the file accordingly.

Tweakie.
PEACE
Re: Gcode pauses after macro
« Reply #9 on: September 17, 2021, 05:05:05 PM »
Sadly, this still doesn't work.

I have also tried G28.1 in various configurations and it does the same thing. References as it should and just stops after. Clicking start again makes the machine proceed.

I'm going to set it up this way and just force our operators to click the button twice. At least this way I know they are homing every time.

Putting together a vacuum system this weekend to hopefully eliminate lost step issues.