Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Gcode macro - Get parameter (fan rpm)

    General Discussion
    macro macros fans setup fans gcode
    3
    3
    513
    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.
    • Martin1454
      Martin1454 last edited by

      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.

      dc42 1 Reply Last reply Reply Quote 0
      • Phaedrux
        Phaedrux Moderator last edited by

        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.

        Z-Bot CoreXY Build | Thingiverse Profile

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

          @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.

          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
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA