Gcode macro - Get parameter (fan rpm)



  • Hi - So im trying to build an macro to "dim" my LED lighting I have, and for that I want to make an macro.

    My current LED is running on the 12V fan output "p7" -

    I currently turn it on by setting m106 to 255 (full brightness), but I want to make an macro that takes the current brightness and subtract 25 from the value -

    Is there any way to get what the current "fan speed" is for an output, and use that value to subtract 25 and write to m106?

    Sorry if it is a basic question, but im really new to the whole macro gcode enviromet.



  • Currently, no, you can't, but it sounds like it's something that is being worked on.

    In the meantime you could create a set of macros each with a value of brightness, put them in a folder, and pick the value you want. Sort of like selector buttons rather than a brightness up or down button.


  • administrators

    @martin1454 said in Gcode macro - Get parameter (fan rpm):

    Is there any way to get what the current "fan speed" is for an output...

    Yes, send M106 with just a P parameter to specify the fan,

    ...and use that value to subtract 25 and write to m106?

    Not yet.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.