M150 doesn't work inside a macro but works in console
-
This is my first post so forgive me if this is in the wrong place.
I am using a Duet 2 Ethernet with a Raspberry PI 2, and I am trying to make some simple macros to set the color of a DotStar LED strip (I believe it is this one). I am using RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3RC3.
I can't post the full config.g for privacy reasons, but I have this line at the end of it:M150 X0
When I input this into the console, the first 20 LEDs turn red as expected.
M150 R255 U0 B0 S20 F0
However, when I put this exact line of code into a macro named "red", nothing happens when I input this into the console.
M98 P"/macros/red"
A little pop up in the corner says that the macro is called, but the LEDs don't light. (The pop up is a green box with a check mark followed by the code I just inputted). I tried changing the macro to this to test whether the macro is actually being called.
M117 "Before LED" G4 S1 M150 R255 U0 B0 S20 F0 G4 S1 M117 "After LED"
Now when I call the macro, A blue notification pops up in the corner with the before message, then the after message 2 seconds later, but no LEDs light up. It's like the macro is skipping over line 3 for some reason.
Does anyone know a fix for this?
Other information that is probably useful:
The LED strip is plugged into the PI with the yellow wire in pin 40 and the green wire in pin 38. The red and black are connected to an external 5V power supply which is also powering the PI. The Duet is powered by a 24V power supply. The Duet that i am testing with is only connected to the supply by Vin and GND, and to the Pi through an ethernet cable.Thanks in advance
-
I see where it says the X0 parameter need not be repeated but did you try including it in the macro, just as a test?
Frederick
-
@dewey114 are you saying that the LED strip is connected only to the Pi and not to the Duet? If so then I don't understand how M150 is working at all, unless you are running a special plugin on the Pi to handle M150.
-
@dc42 I believe that the PI has a micro sd card that is booting the duet firmware. Maybe the problem is that the macros im making are saving to the SD card in the duet but not the one in the PI?
My supervisor just gave me the contact of someone at Duet3D to whom I can give more information than on a public forum, so I am going to bring my issue there.
Thank you both for the fast responses!
-
I am closing this thread because it is OEM-specific and does not correlate to other configurations.