Welcome to Our Community

Some features disabled for guests. Register Today.

Pausing OpenCONTROL for M06 (toolchange) in GRBL1.1

Discussion in 'Control Software' started by gazlinux, Jun 11, 2023.

  1. gazlinux

    gazlinux New
    Builder

    Joined:
    Nov 18, 2022
    Messages:
    10
    Likes Received:
    1
    GRBL 1.1 does not support toolchange.
    Is there a simple known way to trigger OpenCONTROL to prompt something like "change tool and press any key to continue"?

    I see you can right click and run the job past the M06 error but I am hoping for a solution always bypass the M06 error via some configuration so I don't have to manually edit gcode each time. Thanks!
     
  2. gazlinux

    gazlinux New
    Builder

    Joined:
    Nov 18, 2022
    Messages:
    10
    Likes Received:
    1
    Solved - it seems if I replace "M06" with "M0" before running the job it pauses and I can click "resume job" at tool change without received an error alert directed at M06 unsupported.
     
  3. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    or you can use the correct postprocessor to generate Gcode that does not contain M6 codes (-:
    how are you generating your Gcode now?
     
    Peter Van Der Walt likes this.
  4. gazlinux

    gazlinux New
    Builder

    Joined:
    Nov 18, 2022
    Messages:
    10
    Likes Received:
    1
    Ha thanks! Currently my workflow for 2D is to export SVG from Fusion into Estlecam to create the toolpath for OpenBuildsCONTROL to drive. Its pretty a good setup for me and has gotten me running some really cool experimental jobs including some threadmilling on a DIY 3018 grbl. I gave up on postprocessor setup in the beginning with Fusion because it was too confusing but may need to revisit. Good stuff. Cheers
     
  5. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,769
    Likes Received:
    1,357
    I definitely recommend getting to grips with Fusion cam - installing the Openbuilds post processor is not that difficult and the instructions are in the documents section of the forum. I know it's another learning curve but in my opinion Fusion cam is pretty good.

    docs:software:fusion360 [OpenBuilds Documentation]

    Alex.
     
    David the swarfer likes this.
  6. gazlinux

    gazlinux New
    Builder

    Joined:
    Nov 18, 2022
    Messages:
    10
    Likes Received:
    1
    Thanks Alex, I hear that Fusion cam is pretty good. I'll get there one of these days. Meanwhile, I am trying to figure out how to perform a toolhead change by replacing M06 with M0 and now looking at writing a macro to save the current position of the toolhead so I can insert a move to another coordinate for the toolchange then restore the original coordinate after resetting Z then resume after M0. Any pointers appreciated. Cheers
     
  7. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,870
    Likes Received:
    4,283
    Theres an existing tool offset macro in Getting started with Javascript Macros in CONTROL / Library of Macros created by the community
     
    Alex Chambers likes this.
  8. gazlinux

    gazlinux New
    Builder

    Joined:
    Nov 18, 2022
    Messages:
    10
    Likes Received:
    1
    Peter Van Der Walt likes this.
  9. gazlinux

    gazlinux New
    Builder

    Joined:
    Nov 18, 2022
    Messages:
    10
    Likes Received:
    1
    This macro works unless I am running a job and the job takes a pause at M0 yet that's precisely when I want to manually run this toolhead change macro?

    ; when M0 is received this macro runs
    G54 ; select coordinate space
    G92 X0 Y0 ; push current position in space
    G53 G0 Z0 ; move up Z
    G53 G0 Y0 ; move bed for bit change
    G53 G0 X150 ; center it on my 3018
    M0 ; pause for change operation
    ; remember to ZERO Z for new bit!
    G54 ; select coordinate space
    G0 X0 Y0 G54 ; pop restore X & Y
    ; press resume button in CONTROL
     
    #9 gazlinux, Jun 13, 2023
    Last edited: Jun 13, 2023
  10. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,870
    Likes Received:
    4,283
    Follow the instructions in the Macro post (Its a tool offset handler, doesn't split gcode files) , or modify the macro according to your own needs
     
  11. terjeio

    terjeio Well-Known
    Builder

    Joined:
    Oct 18, 2020
    Messages:
    59
    Likes Received:
    60
    FYI grblHAL users (Blackbox X32) has now the option to enable expression and flow control support in the controller: Macros (or, stricly speaking, gcode subroutines) stored on the SD card or in flash (littlefs) can be called via G65 and/or can be bound to the T and M6 commands. The implementation is compliant with the NIST RS274 gcode specification and supports most of the LinuxCNC extensions.

    A macro for manual tool changes or even automatic tool changers (ATCs) should be possible to implement this way, and should work with most senders as long as they do not error out on G65 or strip the tool change commands.

    Note that this feature has recently been added so there might be bugs lurking. If someone wants to try this then be extremely careful!
     
  12. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    oh this is *delicious* . Very keen on playing with this.
     
  13. gazlinux

    gazlinux New
    Builder

    Joined:
    Nov 18, 2022
    Messages:
    10
    Likes Received:
    1
    The tool offset handler I found in the mentioned thread can't be invoked manually while a job is running. When my job pauses at M0 I run the macro but get error "This macro can't be used whilst a program is running or in alarm (Machine must be Idle)". The discussion on the thread mentions that it isn't possible to pause a program to use this macro possibly due to comms port not being released while the program is paused. Thread mentions each tool will need its separate file but Peter stated above that this offset tool avoids that. Can the offset handler be modified to run while a job is running or can a macro be invoked while a job is running?
     
    #13 gazlinux, Jun 15, 2023
    Last edited: Jun 15, 2023
  14. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,870
    Likes Received:
    4,283
    Correct, so follow standard Grbl protocol (seperate file per tool, use macro for toolchange in between), or you will have to modify macro (extensively).
     
  15. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,430
    Likes Received:
    1,907
    Hiya
    tried to build with this included and got
    Code:
    Command failed: pio run -etest -cjob.ini
    
    [notice] A new release of pip is available: 23.0.1 -> 23.1.2
    [notice] To update, run: pip install --upgrade pip
    /home/terjeio/.platformio/packages/framework-espidf/components/bt/host/bluedroid/stack/l2cap/l2c_ble.c: In function 'l2c_ble_link_adjust_allocation':
    /home/terjeio/.platformio/packages/framework-espidf/components/bt/host/bluedroid/stack/l2cap/l2c_ble.c:1014:21: warning: unused variable 'yy' [-Wunused-variable]
    UINT16 qq, yy = 0, qq_remainder;
    ^~
    /home/terjeio/.platformio/packages/framework-espidf/components/bt/host/bluedroid/stack/l2cap/l2c_link.c: In function 'l2c_link_adjust_allocation':
    /home/terjeio/.platformio/packages/framework-espidf/components/bt/host/bluedroid/stack/l2cap/l2c_link.c:721:21: warning: unused variable 'yy' [-Wunused-variable]
    UINT16 qq, yy = 0, qq_remainder;
    ^~
    /home/terjeio/.platformio/packages/[email protected]+2021r1/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/test/main/grbl/gcode.o:(.literal.gc_init+0xc): undefined reference to `ngc_flowctrl_init'
    /home/terjeio/.platformio/packages/[email protected]+2021r1/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/test/main/grbl/gcode.o:(.literal.gc_execute_block+0x10c): undefined reference to `ngc_flowctrl'
    /home/terjeio/.platformio/packages/[email protected]+2021r1/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/test/main/grbl/gcode.o: in function `gc_init':
    /home/terjeio/grblHAL/ESP32/main/grbl/gcode.c:323: undefined reference to `ngc_flowctrl_init'
    /home/terjeio/.platformio/packages/[email protected]+2021r1/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/test/main/grbl/gcode.o: in function `gc_execute_block':
    /home/terjeio/grblHAL/ESP32/main/grbl/gcode.c:877: undefined reference to `ngc_flowctrl'
    collect2: error: ld returned 1 exit status
    *** [.pio/build/test/firmware.elf] Error 1
    ========================= [FAILED] Took 198.44 seconds =========================
    
    my settings in the attached json
     

    Attached Files:

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice