That worked, thanks for your help!
Posts made by kerfun
-
RE: Duet Mini 5+ Neopixels Only White Can't Turn Off
-
Duet Mini 5+ Neopixels Only White Can't Turn Off
I’ve been trying to set up a strip of Neopixels on my Duet Mini 5+ and ran into an issue I can’t seem to solve. Here’s my issue:
Set up the Neopixels using this command:
M950 E0 C"led" T1 Q800000 U24
I can turn on the Neopixels with this command:
M150 E0 R255 S2
However, instead of lighting up the first two LEDs as red (as expected), they both light up full white. I also can't turn the LEDs off with any M150 command I try.Here’s what I’ve checked:
- Verified the strip is RGB, not RGBW.
- Experimented with different frequencies for the Neopixels.
I’m out of ideas and would appreciate any advice or troubleshooting tips. Am I missing something in the configuration or commands?
Thanks in advance for your help!
Here is my M122 output if that is helpful:
M122
=== Diagnostics ===
RepRapFirmware for Duet 3 Mini 5+ version 3.5.3 (2024-09-18 11:25:48) running on Duet 3 Mini5plus Ethernet (SBC mode)
Board ID: 9Z2U8-1B67A-G65J0-401GL-K592Z-ZUDS9
Used output buffers: 1 of 40 (17 max)
=== RTOS ===
Static ram: 103368
Dynamic ram: 107176 of which 20 recycled
Never used RAM 28332, free system stack 208 words
Tasks: SBC(2,ready,1.5%,843) HEAT(3,nWait 1,0.0%,350) Move(4,nWait 6,0.0%,355) CanReceiv(6,nWait 1,0.0%,939) CanSender(5,nWait 7,0.0%,336) CanClock(7,delaying,0.0%,334) TMC(4,nWait 6,0.0%,121) MAIN(2,running,97.5%,762) IDLE(0,ready,0.2%,29) AIN(4,delaying,0.8%,264), total 100.0%
Owned mutexes: HTTP(MAIN)
=== Platform ===
Last reset 00:13:53 ago, cause: power up
Last software reset at 2024-11-16 23:37, reason: User, Platform spinning, available RAM 26932, slot 1
Software reset code 0x6000 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00000000 BFAR 0xe000ed38 SP 0x00000000 Task SBC Freestk 0 n/a
Error status: 0x00
MCU revision 3, ADC conversions started 625359, completed 625359, timed out 0, errs 0
MCU temperature: min 31.6, current 34.4, max 34.6
Supply voltage: min 0.2, current 0.6, max 0.6, under voltage events: 0, over voltage events: 0, power good: no
Heap OK, handles allocated/used 99/3, heap memory allocated/used/recyclable 2048/416/268, gc cycles 0
Events: 0 queued, 0 completed
Driver 0: ok, SG min n/a, read errors 0, write errors 0, ifcnt 0, reads 0, writes 0, timeouts 0, DMA errors 0, CC errors 0
Driver 1: ok, SG min n/a, read errors 0, write errors 0, ifcnt 0, reads 0, writes 0, timeouts 0, DMA errors 0, CC errors 0
Driver 2: ok, SG min n/a, read errors 0, write errors 0, ifcnt 0, reads 0, writes 0, timeouts 0, DMA errors 0, CC errors 0
Driver 3: ok, SG min n/a, read errors 0, write errors 0, ifcnt 0, reads 0, writes 0, timeouts 0, DMA errors 0, CC errors 0
Driver 4: ok, SG min n/a, read errors 0, write errors 0, ifcnt 0, reads 0, writes 0, timeouts 0, DMA errors 0, CC errors 0
Driver 5: ok, SG min n/a, read errors 0, write errors 0, ifcnt 0, reads 0, writes 0, timeouts 0, DMA errors 0, CC errors 0
Driver 6: ok, SG min n/a, read errors 0, write errors 0, ifcnt 0, reads 0, writes 0, timeouts 0, DMA errors 0, CC errors 0
Date/time: 2024-11-17 10:44:00
Cache data hit count 1893608472
Slowest loop: 25.85ms; fastest: 0.12ms
=== Storage ===
Free file entries: 20
SD card 0 not detected, interface speed: 0.0MBytes/sec
SD card longest read time 0.0ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 83, segments created 0, maxWait 0ms, bed compensation in use: none, height map offset 0.000, max steps late 0, min interval 0, bad calcs 0, ebfmin 0.00, ebfmax 0.00
no step interrupt scheduled
Moves shaped first try 0, on retry 0, too short 0, wrong shape 0, maybepossible 0
=== DDARing 0 ===
Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== DDARing 1 ===
Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters 0 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0
Heater 1 is on, I-accum = 0.0
=== GCodes ===
Movement locks held by null, null
HTTP* is doing "M122" in state(s) 0
Telnet is idle in state(s) 0
File is idle in state(s) 0
USB is idle in state(s) 0
Aux is idle in state(s) 0
Trigger* is idle in state(s) 0
Queue is idle in state(s) 0
LCD is idle in state(s) 0
SBC is idle in state(s) 0
Daemon is idle in state(s) 0
Aux2 is idle in state(s) 0
Autopause is idle in state(s) 0
File2 is idle in state(s) 0
Queue2 is idle in state(s) 0
Q0 segments left 0, axes/extruders owned 0x0000803
Code queue 0 is empty
Q1 segments left 0, axes/extruders owned 0x0000000
Code queue 1 is empty
=== CAN ===
Messages queued 7396, received 0, lost 0, errs 3938782, boc 0
Longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 26 (min 26), ts 4166/0/0
Tx timeouts 0,0,4165,0,0,3229 last cancelled message type 30 dest 127
=== SBC interface ===
Transfer state: 5, failed transfers: 0, checksum errors: 1
RX/TX seq numbers: 31767/31767
SPI underruns 0, overruns 0
State: 5, disconnects: 0, timeouts: 0 total, 0 by SBC, IAP RAM available 0x0d250
Buffer RX/TX: 0/0-0, open files: 0
=== Duet Control Server ===
Duet Control Server version 3.5.3 (2024-09-21 10:20:47, 32-bit)
HTTP+Executed:
> Executing M122
Code buffer space: 4096
Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 0
Full transfers per second: 19.71, max time between full transfers: 114.3ms, max pin wait times: 48.2ms/10.8ms
Codes per second: 0.14
Maximum length of RX/TX data transfers: 4436/832 -
RE: M291 S4 with timeout only runs a couple of commands
@kerfun I got a solution that does what I wanted to do. I have my power off script now that looks like this:
var now = state.time var timeOut = 60 M98 P"0:/macros/YesNoInput.g" H"Shutdown Requested" S"Start the shutdown procedure?" T{var.timeOut} var startShutdown = true if state.time - var.now >= {var.timeOut} set var.startShutdown = true elif input == null set var.startShutdown = false if var.startShutdown == true echo "shutdown started" M18 ; Turn off motors M568 H1 R41 S0 ; Set hotend standby to 41 and active to 0 M568 H1 A1 ; Set hotend to standby temp M140 S0 ; Set bed to 0 M116 H1 ; Wait for hotend to reach 41 degrees (This is the lowest you can wait for a temp) M568 H1 A2 ; Set hotend back to active M42 P0 S1 ; Turn bed ps off M42 P1 S1 ; Turn main ps off
And then I have my YesNoInput.g file that looks like this:
M291 R{param.H} P{param.S} K{"Yes",} S4 F"Yes" T{param.T} J1
When the print is done I have the slicer always call the shutdown macro. When the shutdown macro runs it will ask the user if they want the printer to power down (in case they want to keep printing). If the user presses "Yes" the printer will start the shutoff procedure (the shutdown procedure usually takes pretty long because I want to wait for the hotend to cool off). If the user doesn't press any buttons on the message the printer will shut off. If the user presses "cancel" before the 60 seconds, the printer will stay on.
-
RE: M291 S4 with timeout only runs a couple of commands
@droftarts the solution in that post doesn't seem to work for me as I want the prompt to timeout after a minute and start the shutdown process. This requires me to put the J1 in the M291 command which is giving me inconstant results. It seems like the proposed functionality of a J2 option would work for me though, but this isn't implemented yet.
I also thought that canceling a child Macro wouldn't cancel the parent macro from this post.
I tried making a new test that would call the same macro I posted above, "YesNoInput.g." With this new test way I could see if the parent macro is being cancelled by the child macro.
M98 P"0:/macros/YesNoInput.g" H"Bed was cold at startup" S"Wait 10 minuets for expansion?" T5 if (input == 0) echo "running yes" echo "still runnning yes" else echo "running no" echo "still running no" echo "done"
When this Macro is run, and I select Yes in the popup "running yes", "still running yes", and "done" are printed to the console. When I run this macro and I select cancel the first time I don't get anything printed to the console. That would make me think the child macro is canceling the parent macro. However, when I run the Macro again and select cancel the popup prints "running no" to the console and that's it. This would make it seem like the child macro is partially cancelling the parent macro.
-
M291 S4 with timeout only runs a couple of commands
I'm trying to make a Macro that will shut down the printer after giving the user a 60 second window to cancel it once a print is finished. I created this macro called PowerOff.g that looks like this:
M98 P"0:/macros/YesNoInput.g" H"Shutdown Requested" S"Start the shutdown procedure?" T60 if (input == 0) echo "Shutting down procedure started" echo "test" M18 ; Turn off motors M568 H1 R41 S0 ; Set hotend standby to 41 and active to 0 M568 H1 A1 ; Set hotend to standby temp M140 S0 ; Turn bed off M116 H1 ; Wait for hotend to reach 41 degrees (This is the lowest you can wait for a temp) M568 H1 A2 ; Turn hotend back to active M42 P0 S1 ; Turn bed ps off M42 P1 S1 ; Turn main ps off echo "Sutdown finished" else echo "Shutdown won't run" echo "Script finished"
This macro calls another macro I call "YesNoInput.g." The idea behind this is to display a yes button and a cancel button. The popup will automatically timeout and select cancel, making the printer proceed to shut down. Here is "YesNoInput.g":
M291 R{param.H} P{param.S} K{"Yes",} T{param.T} S4 F"Yes" J1
I put this in an external macro, so it doesn't cancel my main macro that does the shutdown procedure.
The problem is when the popup is shown and the user presses cancel or when the popup times out, I only see "Shutting down procedure started" in my consol. However, I don't see "test" in my consol, and the shutdown sequence doesn't start.
I saw this solution but I wanted to use the functionality built into the M291 command. Any help would be greatly appreciated!
M122 Output
=== Diagnostics ===
RepRapFirmware for Duet 3 Mini 5+ version 3.5.0-rc.3 (2024-01-24 17:56:48) running on Duet 3 Mini5plus Ethernet (SBC mode)
Board ID: 9Z2U8-1B67A-G65J0-401GL-K592Z-ZUDS9
Used output buffers: 1 of 40 (18 max)
=== Duet Control Server ===
Duet Control Server version 3.5.0-rc.3 (2024-01-26 12:34:19)
Code buffer space: 4096
Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 0
Full transfers per second: 39.48, max time between full transfers: 73.9ms, max pin wait times: 59.6ms/9.7ms
Codes per second: 3.55
Maximum length of RX/TX data transfers: 4558/2432