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

    Send a console message at a given event

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    3
    12
    710
    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.
    • A Former User?
      A Former User @jay_s_uk
      last edited by

      @jay_s_uk said in Send a console message at a given event:

      @the_dragonlord you could use M117 to display a message and then something in daemon.g to send that message.
      then setup a variable in config.g e.g.

      global printing = false
      

      in start.g use

      set global.printing = true
      

      then in daemon.g

      if {global.printing == true && state.status == "idle" && heat.heaters[1].current < 50}
         M117 "display message"
         set global.printing = false
      

      That will only run if all 3 of those conditions are met. Including the printer status means if won't send that message if its in the fault state and also won't send a message if you use more than one tool.

      excellent I'll try it right now!

      A Former User? 1 Reply Last reply Reply Quote 0
      • A Former User?
        A Former User @A Former User
        last edited by

        @the_dragonlord said in Send a console message at a given event:

        @jay_s_uk said in Send a console message at a given event:

        @the_dragonlord you could use M117 to display a message and then something in daemon.g to send that message.
        then setup a variable in config.g e.g.

        global printing = false
        

        in start.g use

        set global.printing = true
        

        then in daemon.g

        if {global.printing == true && state.status == "idle" && heat.heaters[1].current < 50}
           M117 "display message"
           set global.printing = false
        

        That will only run if all 3 of those conditions are met. Including the printer status means if won't send that message if its in the fault state and also won't send a message if you use more than one tool.

        excellent I'll try it right now!

        I don't find neither start.g or daemon.g files...where are they located?

        fcwiltundefined 1 Reply Last reply Reply Quote 0
        • fcwiltundefined
          fcwilt @A Former User
          last edited by

          @the_dragonlord said in Send a console message at a given event:

          @the_dragonlord said in Send a console message at a given event:

          @jay_s_uk said in Send a console message at a given event:

          @the_dragonlord you could use M117 to display a message and then something in daemon.g to send that message.
          then setup a variable in config.g e.g.

          global printing = false
          

          in start.g use

          set global.printing = true
          

          then in daemon.g

          if {global.printing == true && state.status == "idle" && heat.heaters[1].current < 50}
             M117 "display message"
             set global.printing = false
          

          That will only run if all 3 of those conditions are met. Including the printer status means if won't send that message if its in the fault state and also won't send a message if you use more than one tool.

          excellent I'll try it right now!

          I don't find neither start.g or daemon.g files...where are they located?

          Create them yourself in the sys folder - the folder where config.g is located.

          Frederick

          Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

          A Former User? 2 Replies Last reply Reply Quote 0
          • A Former User?
            A Former User @fcwilt
            last edited by

            @fcwilt said in Send a console message at a given event:

            @the_dragonlord said in Send a console message at a given event:

            @the_dragonlord said in Send a console message at a given event:

            @jay_s_uk said in Send a console message at a given event:

            @the_dragonlord you could use M117 to display a message and then something in daemon.g to send that message.
            then setup a variable in config.g e.g.

            global printing = false
            

            in start.g use

            set global.printing = true
            

            then in daemon.g

            if {global.printing == true && state.status == "idle" && heat.heaters[1].current < 50}
               M117 "display message"
               set global.printing = false
            

            That will only run if all 3 of those conditions are met. Including the printer status means if won't send that message if its in the fault state and also won't send a message if you use more than one tool.

            excellent I'll try it right now!

            I don't find neither start.g or daemon.g files...where are they located?

            Create them yourself in the sys folder - the folder where config.g is located.

            Frederick

            excellent, thanks

            1 Reply Last reply Reply Quote 0
            • A Former User?
              A Former User @fcwilt
              last edited by

              @fcwilt said in Send a console message at a given event:

              @the_dragonlord said in Send a console message at a given event:

              @the_dragonlord said in Send a console message at a given event:

              @jay_s_uk said in Send a console message at a given event:

              @the_dragonlord you could use M117 to display a message and then something in daemon.g to send that message.
              then setup a variable in config.g e.g.

              global printing = false
              

              in start.g use

              set global.printing = true
              

              then in daemon.g

              if {global.printing == true && state.status == "idle" && heat.heaters[1].current < 50}
                 M117 "display message"
                 set global.printing = false
              

              That will only run if all 3 of those conditions are met. Including the printer status means if won't send that message if its in the fault state and also won't send a message if you use more than one tool.

              excellent I'll try it right now!

              I don't find neither start.g or daemon.g files...where are they located?

              Create them yourself in the sys folder - the folder where config.g is located.

              Frederick

              The index for the 2 tools to use in the heat.heaters array are 0 and 1 or 1 and 2?

              jay_s_ukundefined 1 Reply Last reply Reply Quote 0
              • jay_s_ukundefined
                jay_s_uk @A Former User
                last edited by

                @the_dragonlord heaters for tools would be 1 and 2. Activate the object model browser as it'll help you see where everything is stored

                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

                A Former User? 1 Reply Last reply Reply Quote 0
                • A Former User?
                  A Former User @jay_s_uk
                  last edited by A Former User

                  @jay_s_uk said in Send a console message at a given event:

                  @the_dragonlord heaters for tools would be 1 and 2. Activate the object model browser as it'll help you see where everything is stored

                  uhm....I apologize for my ignorance....what's the object model browser?
                  EDIT
                  it's a plugin, I've found it

                  jay_s_ukundefined fcwiltundefined 2 Replies Last reply Reply Quote 1
                  • jay_s_ukundefined
                    jay_s_uk @A Former User
                    last edited by

                    @the_dragonlord it's a plugin. It can be activated in settings - general - plugins

                    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 0
                    • fcwiltundefined
                      fcwilt @A Former User
                      last edited by

                      @the_dragonlord said in Send a console message at a given event:

                      @jay_s_uk said in Send a console message at a given event:

                      @the_dragonlord heaters for tools would be 1 and 2. Activate the object model browser as it'll help you see where everything is stored

                      uhm....I apologize for my ignorance....what's the object model browser?

                      Go to the Settings - General section in the DWC.

                      Select the tab BUILT-IN PLUGINS.

                      Locate the Object Model Browser and start it.

                      Frederick

                      Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                      A Former User? 1 Reply Last reply Reply Quote 1
                      • A Former User?
                        A Former User @fcwilt
                        last edited by A Former User

                        @fcwilt said in Send a console message at a given event:

                        @the_dragonlord said in Send a console message at a given event:

                        @jay_s_uk said in Send a console message at a given event:

                        @the_dragonlord heaters for tools would be 1 and 2. Activate the object model browser as it'll help you see where everything is stored

                        uhm....I apologize for my ignorance....what's the object model browser?

                        Go to the Settings - General section in the DWC.

                        Select the tab BUILT-IN PLUGINS.

                        Locate the Object Model Browser and start it.

                        Frederick

                        unfortunately the telegram bot doesn't "intercept" the messages as I workngly said before but "only" the console messages....is there a GCODE to start a row in the console?
                        EDIT
                        GOT IT M118 L2

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