User avatar
BaronWilliams
Posts: 184
Joined: Tue Jul 15, 2014 8:30 pm

[ADDED] Per-Layer G-Code

I would like something similar to the cooling section's Per-Layer Fan Controls, that's called something like Per-Layer G-Code that allows me to enter custom G-code at any layer. This is already possible using multiple profiles for different layers, but's that's a bit of an overkill just to add some G-code at certain layers. I like the way the Per-Layer Fan Controls work. Using that type of system to add custom G-code per layer would be very convenient.

For a usage example, some printers let you change the LED lighting using special G-code, or play a sound using special G-code. It would be nice to set my print job to play a sound at layer 50 and turn the LED's red to indicate that the print job is at layer 50 which is a potential problem area of the print that might need my attention. We all know certain prints tend to have trouble at certain layers, and might need some babysitting for a while. With this type of custom G-code, I could go off to do something else, and then when the printer is printing layer 50, it will alert me to come back to the printer and watch it for a while.
S3D-Jason
Posts: 1608
Joined: Sun May 31, 2015 6:01 am

Re: Feature Request: Per-Layer G-Code

The new post-processing options in S3D allow you to easily do this using something like below.

Let's say you want to send an "M146 r255 g255 b0" at layer 25. Then just add the following command into the "commands for post-processing" section on the Scripts tab of your FFF settings

{REPLACE "; layer 25\n" "; layer 25\nM146 r255 g255 b0\n"}

Return to “Feature Requests”