Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Conditionnal gcode on current selected tool

    Scheduled Pinned Locked Moved
    Gcode meta commands
    3
    4
    211
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • duetloverundefined
      duetlover
      last edited by duetlover

      Hi everybody

      Is that possible to do conditionnal gcode on current selected tool ?

      For example in pause.g file :

      if selectedTool = 'T0'
          do something...
      

      Or something like that.

      Thanks !

      1 Reply Last reply Reply Quote 0
      • T3P3Tonyundefined
        T3P3Tony administrators
        last edited by

        yep have a look at

        state.currentTool

        in the object model

        That returns an integer which is the current tool number

        Also have state.previousTool and state.nextTool which could be useful during tool change macros if you need to have logic based on that.

        www.duet3d.com

        1 Reply Last reply Reply Quote 0
        • duetloverundefined
          duetlover
          last edited by

          Thanks, it works !

          Could you please tell me where I can find all the object models I can work with ?

          Best regards

          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
          • jay_s_ukundefined
            jay_s_uk @duetlover
            last edited by

            @duetlover there's a plugin under general which allows you to browse the whole object model

            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA