Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Trigger servo movement after 1st layer

    Scheduled Pinned Locked Moved
    General Discussion
    3
    9
    422
    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.
    • troy_proffittundefined
      troy_proffitt
      last edited by

      Is there a way to trigger an M42 command after 1st layer? I know there is a way to add this to the slicer, but I believe it would be less maintenance to add to the Duet.

      1 Reply Last reply Reply Quote 0
      • troy_proffittundefined
        troy_proffitt
        last edited by

        I have been researching M581 to possibly monitor the fan pins (since fan turns on after 1st layer). Is this a possibility since i'm using firmware 3.2?

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

          Depends on what your servo will do with a fan command (M106) as opposed to the io switching command (M42).

          Z-Bot CoreXY Build | Thingiverse Profile

          1 Reply Last reply Reply Quote 0
          • troy_proffittundefined
            troy_proffitt
            last edited by

            I'd like to trigger M42 P8 S0.5; when the fan turns on.

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

              Well the slicer sends M106 fan commands, so you would have to do some post processing to change those commands to M42 P8 S0.5.

              Z-Bot CoreXY Build | Thingiverse Profile

              1 Reply Last reply Reply Quote 0
              • Vetiundefined
                Veti
                last edited by

                @troy_proffitt said in Trigger servo movement after 1st layer:

                but I believe it would be less maintenance to add to the Duet.

                with the pi connected to could write a plugin that does that.
                but a line in the slicer would be way easier.

                see for example
                http://projects.ttlexceeded.com/3dprinting_prusaslicer_gcode.html

                so something like

                {if layer_num >= 1}M42 P8 S0.5
                {endif}

                1 Reply Last reply Reply Quote 0
                • troy_proffittundefined
                  troy_proffitt
                  last edited by troy_proffitt

                  Is this something that could be added to your beginning gcode (so you don't have to modify each time you want to print something)

                  The holy grail would be to use a fan speed variable in the slicer and convert tht to the value needed in the M42. For example if I set 75% fan in the slicer, the post -processing code would generate a M42 P9 S0.65, and if I set 50% in the slicer, the code would generate M42 P9 S0.6. If CURA can do an if/elseif similar to Prusa, I think I can figure it out.

                  Edit, it seems that CURA has a post processing plugin that will do a search / replace based on z height. I'll play around with this and reply back. This is a bit of a hassle, but should solve my problem. Thanks for your help!

                  1 Reply Last reply Reply Quote 1
                  • troy_proffittundefined
                    troy_proffitt
                    last edited by

                    I've submitted a request in the CURA forum to have someone possibly help modify a post processing script to add the M42 command. Hopefully I can get some direction since I've never worked with Python syntax before:

                    https://community.ultimaker.com/topic/35639-convert-fan-speed-to-servo-movement-post-processing-script/

                    If anyone on this forum is familiar with CURA post processing, I'd appreciate the help!

                    -Troy

                    1 Reply Last reply Reply Quote 0
                    • troy_proffittundefined
                      troy_proffitt
                      last edited by

                      I ended up teaching my self some basic Python and wrote a script myself. Hopefully this will help others that are wanting to use a CPAP fan or other servo type fan signals:

                      https://community.ultimaker.com/topic/35639-convert-fan-speed-to-servo-movement-post-processing-script/

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post
                      Unless otherwise noted, all forum content is licensed under CC-BY-SA