Skip to content

grblHAL/Plugin_fans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fans plugin

Under development. Adds two M-codes for controlling fans.

  • M106 <P-> turns fan on. The optional P-word specifies the fan, if not supplied fan 0 is turned on.
  • M107 <P-> turns fan off. The optional P-word specifies the fan, if not supplied fan 0 is turned off.

The new realtime command 0x8A can also be used to toggle fan 0 on/off even when a G-code program is running.

Add a line with

#define FANS_ENABLE <n>

to my_machine.h to enable <n> fans, e.g. #define FANS_ENABLE 1 for one.

If the driver supports mapping of port number to fan the following $-settings, depending on number of fans configured, are made available:

$386 - for mapping aux port to Fan 0.
$387 - for mapping aux port to Fan 1.
$388 - for mapping aux port to Fan 2.
$389 - for mapping aux port to Fan 3.

Use the $pins command to see which port/pin is currently assigned.
NOTE: A hard reset is required after changing port to fan mappings.

Fans can be linked to the spindle enable command, thus turning them automatically on and off depending on the spindle state.
NOTE: If a fan is turned on by M106 (or the new real time command) before enabling the spindle it will not be turned off automatically when the spindle is stopped.

$483 - bits for linking specific fans to spindle enable.

Fan 0 can be configured be turned off automatically on program completion, or spindle disable if linked, after a configurable delay.

$480 - number of minutes to delay automatic turnoff of fan 0.
NOTE: If set to 0 fan 0 is not automatically turned off by program end and is turned off immediately if linked to spindle enable.


NOTE: The M-codes are adopted from Marlin specifications (with fewer parameter values supported).

Dependencies:

Driver must have at least <n> ioports port output(s) available. Requires grblHAL build 20210629 or later and the fans plugin added to the source tree.


2023-01-26

About

grblHAL plugin for fan control

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published