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

    Using a Button with daemon.g

    Scheduled Pinned Locked Moved
    Gcode meta commands
    4
    6
    301
    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.
    • NeueKlasseundefined
      NeueKlasse
      last edited by NeueKlasse

      I want to use a Button to Switch an Output
      (Button pressed (IO7.in) -> Output (Out7) on)
      (Button released: Output off)

      I‘m not Sure if daemon.g is capable of.. let‘s say
      a 100ms Cycletime (reliable), without bursting to
      Much Energy of the Atmel Chip.
      1 Second is way to slow for the goal to
      switch a laser on/off,
      And i hate to do that with the Touchscreen..

      Prusa Mini, Chiron @ BMG X2
      Metal SLS Printer Development

      fcwiltundefined jay_s_ukundefined 2 Replies Last reply Reply Quote 0
      • Phaedruxundefined Phaedrux moved this topic from Using Duet Controllers
      • fcwiltundefined
        fcwilt @NeueKlasse
        last edited by

        @neueklasse

        daemon.g runs once every 10 seconds - I doubt that would work for you.

        Perhaps this will help:

        Trigger Example

        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

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

          @neueklasse use a loop using while. That will allow daemon.g to run constantly

          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
          • NeueKlasseundefined
            NeueKlasse @fcwilt
            last edited by

            @fcwilt

            Thanks, i don't had in mind that Duet has this Function, it works as expected!

            @jay_s_uk

            I never read about Loops faster than 1 second in RRF, what is the maximum possible?
            i suppose a while loop without a G4 Command inside can crash the Software?
            it's also not easy to Edit the daemon.g file.. only after having the .part file that'll
            be created after you try to edit the daemon.g file...
            maybe it's possible to STOP the daemon.g file from Running to edit it? maybe with a M-Command?
            for example the KUKA Roboters use a similar thing, called a "sps.sub" (submitinterpreter)
            and it is possible to Stop it separately...

            Prusa Mini, Chiron @ BMG X2
            Metal SLS Printer Development

            Alex.crundefined 1 Reply Last reply Reply Quote 0
            • jay_s_ukundefined
              jay_s_uk
              last edited by

              @neueklasse actually, why not just use a trigger?
              Why does it have to be daemon.g?

              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
              • Alex.crundefined
                Alex.cr @NeueKlasse
                last edited by

                @neueklasse I ran into the same problem about daemon.g being a pain to edit when a 'while true' statement was used. Instead of using a 'true' statement I made this a variable I called 'daemonRun' that I set to 1 in the config. When I want to edit daemon.g I first set it to 0 and then change daemon.g and reset it back to one.

                Voron2.4/Duet3 SBC+6HC+3HC+1LC+1HCL(x2) - Delta/Duet2 Wifi - CubePro/Duet2 Wifi+Duex5 - Laser/Duet3 Mini5+ - Cel Robox - U̶p̶3̶0̶0̶+/D̶u̶e̶t̶3̶ ̶6̶H̶C̶+̶LC1̶ - F̶T̶-̶5̶/̶D̶u̶e̶t̶2̶ ̶W̶i̶f̶i̶ - S̶o̶l̶i̶d̶o̶o̶d̶l̶e̶

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