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

Using a Button with daemon.g

Scheduled Pinned Locked Moved
Gcode meta commands
4
6
302
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.
  • undefined
    NeueKlasse
    last edited by NeueKlasse 12 Apr 2021, 18:27 4 Dec 2021, 18:25

    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

    undefined undefined 2 Replies Last reply 4 Dec 2021, 18:57 Reply Quote 0
    • undefined Phaedrux moved this topic from Using Duet Controllers 4 Dec 2021, 18:28
    • undefined
      fcwilt @NeueKlasse
      last edited by 4 Dec 2021, 18:57

      @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

      undefined 1 Reply Last reply 5 Dec 2021, 08:07 Reply Quote 0
      • undefined
        jay_s_uk @NeueKlasse
        last edited by 4 Dec 2021, 19:06

        @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
        • undefined
          NeueKlasse @fcwilt
          last edited by 5 Dec 2021, 08:07

          @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

          undefined 1 Reply Last reply 18 Dec 2021, 17:55 Reply Quote 0
          • undefined
            jay_s_uk
            last edited by 5 Dec 2021, 08:26

            @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
            • undefined
              Alex.cr @NeueKlasse
              last edited by 18 Dec 2021, 17:55

              @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