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

    M80/81 Duet 3 Toolboard usage

    Scheduled Pinned Locked Moved Solved
    Duet Hardware and wiring
    4
    12
    439
    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.
    • oozeBotundefined
      oozeBot
      last edited by

      Our hope is to utilize a 5v power supply along with a 24v power supply that can be toggled on and off with an SSR. The 5v would allow the RPi and Duet to run in a "low power" mode until it's time to turn on the printer. This part works well, but it appears to not be so clean when you add a 24v Toolboard as a lot of errors are thrown when the Toolboard is not present at boot up (as it has no power).

      Is there a way around this that we are unaware of? Thanks

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

        You can probably work around this by having a config.g that does not initialise the toolboard components and then a macro that runs after 24V power is switched on to initialise everything toolboard related. You would also need a macro that removed the toolboard stuff before the 24V was powered down.

        There are some potential gotcha's here that would need checking through, for example the correct order of M584 and other commands, hence the "probably" above.

        www.duet3d.com

        oozeBotundefined 1 Reply Last reply Reply Quote 1
        • oozeBotundefined
          oozeBot @T3P3Tony
          last edited by

          @T3P3Tony We'll give it a go and report back.. thanks!

          If anyone else has achieved this, we'd appreciate any info you can share..

          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators
            last edited by

            A simpler option that may work is to re-run config.g after applying VIN power. Or run M999 to reboot.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            • oozeBotundefined
              oozeBot
              last edited by

              @T3P3Tony @dc42 - What I believe is a very clean option would be to use conditional gCode within config.g to check that vIn is energized.. if so, then process the toolboard commands.. testing it later this afternoon.

              1 Reply Last reply Reply Quote 1
              • oozeBotundefined
                oozeBot
                last edited by oozeBot

                I just shuffled my config around to move everything which needs vIn inside the following if statement - working like a champ!

                if boards[0].vIn.current > 23
                
                A Former User? T3P3Tonyundefined 2 Replies Last reply Reply Quote 1
                • A Former User?
                  A Former User @oozeBot
                  last edited by

                  @oozeBot said in M80/81 Duet 3 Toolboard usage:

                  I just shuffled my config around to move everything which needs vIn inside the following if statement - working like a champ!

                  if boards[0].vIn.current > 23
                  

                  would you be willing to share this config as i would very much like to learn how this is configured by studying it

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

                    @oozeBot and then you can either re-rum config.g when you turn on vin, or run those commands. as @dc42 points out, rerunning config.g is simpler and probably less prone to weird issues.

                    www.duet3d.com

                    oozeBotundefined 1 Reply Last reply Reply Quote 0
                    • oozeBotundefined
                      oozeBot
                      last edited by oozeBot

                      @CaLviNx - I think it would be better / easier to follow just post a macro with the if statement.. note that there is no "end if" - instead, every indented line that follows is treated as part of the if statement.

                      if boards[0].vIn.current >= 23
                      	echo "The 24v rail is active!"
                      	echo "The current voltage is " ^ boards[0].vIn.current
                      echo "This command is *not* part of the if statement"
                      
                      

                      To test, copy this into a macro and run it. You'll notice the two echo commands within the if statement will be processed. Now change the 23 in the if statement to 25 and rerun - only the final echo command will be processed.

                      1 Reply Last reply Reply Quote 1
                      • oozeBotundefined
                        oozeBot @T3P3Tony
                        last edited by

                        @T3P3Tony - now if only the following M291 enhancement will make it into 3.3 or sooner, I'll be one happy camper.. this will open up so many scenarios including a single macro which can toggle the 24v SSR and reprocess config.g automatically!

                        • Extend M291/292 to support yes/no/cancel responses, or user-definable buttons
                        1 Reply Last reply Reply Quote 1
                        • oozeBotundefined
                          oozeBot
                          last edited by oozeBot

                          Here is the "Toggle Power" macro I threw together based on all the above. It's working well except for a warning when powering down: "Warning: 12V under-voltage event (9.5V)".

                          @dc42 - Is there a way to suppress this warning? There is no harm in it, right? I see it also occurs when using the ATX Power toggle within DWC..

                          Also, are there scripts that can modify the logic of the ATX Power toggle within DWC? If not, that would be very useful..

                          edit - I just posted a defect I found while working on this. See here:

                          https://forum.duet3d.com/topic/18835/m291-m999-bug

                          This defect is the reason for the nested if statements as it was the only way I could work around the issue.

                          if boards[0].vIn.current > 23
                          	M291 S3 R"Turn off power?" P"Are you sure you want to turn off power?"
                          	if boards[0].vIn.current > 23
                          		M999				; soft-reset the system to reload config.g
                          else
                          	M80					; turn on 24v power supply
                          	G4 P1000				; wait one second for power to stabilize
                          	M98 P"config.g"				; reprocess config.g
                          
                          1 Reply Last reply Reply Quote 0
                          • oozeBotundefined
                            oozeBot
                            last edited by oozeBot

                            Updated macro. I realized the script needed to wait until all thermostatic fans cooled down prior to restarting. Unfortunately, the defect I posted about earlier seems to affect this as well. Adding M81 S1 prior to M999 results in an instant reboot instead of waiting for the hot ends to cool down.. Hopefully this will get straightened out soon and this macros will be much cleaner.

                            Currently, the workaround is the while loop waiting on the hotend to cool.. but this assumes a single hotend.

                            if boards[0].vIn.current > 23
                              M291 S3 R"Turn off power?" P"Are you sure you want to turn off power?"
                              if heat.heaters[1].state = "active"
                                M291 S1 "Disable Heater" P"Please disable hot end prior to turning off power"
                              elif heat.heaters[1].current > 60
                                M291 S1 R"Please Wait" P"Waiting on hot end to cool before turning off power"
                                while heat.heaters[1].current > 60
                                  G4 P1			; continuous loop until hot end has cooled (workaround for M81 S1 issue)
                                M999			; soft-reset the system to reload config.g
                              else
                                M999			; soft-reset the system to reload config.g
                            else
                              M80				; turn on 24v power supply
                              G4 P1000			; wait for power to stabilize
                              M98 P"config.g"		; reprocess config.g
                            
                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Unless otherwise noted, all forum content is licensed under CC-BY-SA