aboutsummaryrefslogtreecommitdiffstats
path: root/config/sample-pwm-tool.cfg
diff options
context:
space:
mode:
authorPascal <accounts@pascalpieper.de>2021-09-04 00:10:09 +0200
committerGitHub <noreply@github.com>2021-09-03 18:10:09 -0400
commitaf3622544d8adc6ce92dd47d1f1087b970ad8b6e (patch)
tree28d746d539b4830809739073a53bd6f3046d36c0 /config/sample-pwm-tool.cfg
parent8865f5799e46fe9c80ef4daa7208658cf93a38dc (diff)
downloadkutter-af3622544d8adc6ce92dd47d1f1087b970ad8b6e.tar.gz
kutter-af3622544d8adc6ce92dd47d1f1087b970ad8b6e.tar.xz
kutter-af3622544d8adc6ce92dd47d1f1087b970ad8b6e.zip
docs: Add referenced config example for PWM tools (#4537)
Signed-off-by: Pascal Pieper <accounts@pascalpieper.de>
Diffstat (limited to 'config/sample-pwm-tool.cfg')
-rw-r--r--config/sample-pwm-tool.cfg57
1 files changed, 57 insertions, 0 deletions
diff --git a/config/sample-pwm-tool.cfg b/config/sample-pwm-tool.cfg
new file mode 100644
index 00000000..976f470b
--- /dev/null
+++ b/config/sample-pwm-tool.cfg
@@ -0,0 +1,57 @@
+# This file contains an example configuration to use a PWM-controlled tool
+# such as a laser or spindle.
+# See docs/Using_PWM_Tools.md for a more detailed description.
+
+[output_pin TOOL]
+pin: !ar9 # use your fan's pin number
+pwm: True
+hardware_pwm: True
+cycle_time: 0.001
+shutdown_value: 0
+maximum_mcu_duration: 5
+# Default: 0 (disabled)
+# Amount of time in which the host has to acknowledge
+# a non-shutdown output value.
+# Suggested value is around 5 seconds.
+# Use a value that does not burn up your stock.
+# Please note that during homing, your tool
+# needs to be in default speed.
+
+[gcode_macro M3]
+default_parameter_S: 0
+gcode:
+ SET_PIN PIN=TOOL VALUE={S|float / 255}
+
+[gcode_macro M4]
+default_parameter_S: 0
+gcode:
+ SET_PIN PIN=TOOL VALUE={S|float / 255}
+
+[gcode_macro M5]
+gcode:
+ SET_PIN PIN=TOOL VALUE=0
+
+
+# Optional: LCD Menu Control
+
+[menu __main __control __toolonoff]
+type: input
+enable: {'output_pin TOOL' in printer}
+name: Fan: {'ON ' if menu.input else 'OFF'}
+input: {printer['output_pin TOOL'].value}
+input_min: 0
+input_max: 1
+input_step: 1
+gcode:
+ M3 S{255 if menu.input else 0}
+
+[menu __main __control __toolspeed]
+type: input
+enable: {'output_pin TOOL' in printer}
+name: Tool speed: {'%3d' % (menu.input*100)}%
+input: {printer['output_pin TOOL'].value}
+input_min: 0
+input_max: 1
+input_step: 0.01
+gcode:
+ M3 S{'%d' % (menu.input*255)}