PrusaSlicer custom gcode for retraction
 
Avisos
Vaciar todo

PrusaSlicer custom gcode for retraction  

  RSS
Panagiotis Menounos
(@panagiotis-menounos)
Miembro
PrusaSlicer custom gcode for retraction

Hello,

I own a custom 3D printer and am currently experimenting with extruding food using air pressure.

I'm using PrusaSlicer to create the G-Code and I'd like to know if I can insert a custom G-Code command during retraction.

Specifically, I want to control a PWM pin to regulate the pressure, effectively turning the extrusion of the food on and off.

Is this something that can be configured in PrusaSlicer?

Respondido : 21/11/2024 3:21 pm
Neophyl
(@neophyl)
Illustrious Member
RE: PrusaSlicer custom gcode for retraction

Possibly but not directly.  You could use one of the post processing options, either the built in one in Print Settings>Output Options>Other or an external one using the Post Processing scripts option ion the same section to replace/add whatever lines you want whenever it comes to a retraction line. 

However that wouldn't directly control a pwm pin.  It could send an appropriate command but that's it.    PWM is an active process usually requiring tight microcontroller timing.  Not something suitable for a dumb thing like a gcode file. 

This sort of thing is normally done at the printers firmware level, especially as its a custom printer.  You modify your firmware to control the pwm pin when it receives a retraction command (or your substitution).  The firmware then handles the pwm and output like it does for other things.

I'll give you  a real world example of something I have.  Take a printers built in LED lighting (some have them such as the Elegoo Neptune for example).  Now the LED's brightness is controlled by PWM.  However the commands to control that (for my specific setup) consist of "SET_LED LED=LED_Light WHITE=0.50" to turn it to 50% brightness.  The firmware handles the timing of the pwm to get that 50% brightness.

Not saying its impossible but it would be very unusual and difficult to go it in the gcode itself.  That's why its not done that way.

Respondido : 21/11/2024 7:14 pm
Compartir: