Trigger servo movement after 1st layer
-
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.
-
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?
-
Depends on what your servo will do with a fan command (M106) as opposed to the io switching command (M42).
-
I'd like to trigger M42 P8 S0.5; when the fan turns on.
-
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.
-
@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.htmlso something like
{if layer_num >= 1}M42 P8 S0.5
{endif} -
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!
-
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:
If anyone on this forum is familiar with CURA post processing, I'd appreciate the help!
-Troy
-
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: