M80/81 Duet 3 Toolboard usage
-
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
-
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.
-
@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..
-
A simpler option that may work is to re-run config.g after applying VIN power. Or run M999 to reboot.
-
-
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
-
@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
-
-
@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.
-
@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
-
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
-
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