Here is a video of an example. This was originally done in Grbl_ESP32, but the machine was updated to FluidNC.
Warning This a new feature. The develpers can only do limited testing on this because we don't have access to much ATC equipment. You should evaluate any ATC features you want to use with safe, "air jobs" to determine if the features are functional and safe on your machine.
ATCs are a very advanced feature and not recommended by newbies. Most of the developers cannot afford ATC machines to help test and develop this feature. Please become a sponsor of the project if you need help and support. Please be respectful of our time.
There are a lot of safety issues with ATCs. If your machine opens the ATC while spinning, it is likely to throw that tool across the room with a razor sharp bit. That could kill you. It will also likely do serious damage to your spindle. Be careful and never trust your machine or the firmware. You are the sole person responsible for your safety.
To get the current tool number you can send $G or D#5400
There are 4 types of ATCs that can be supported by FluidNC
If you do not use macros or an ATC class, you can still use tool numbers to change spindles. The tool numbers are only used to determine the spindle number. This is the original system since the beginning of FluidNC. See the spindle page.
Each spindle in the config file can have an m6_macro:
. This can be gcode or you can specify a file to run with $SD/Run=myfile.gcode. You can use parameters and expression in the gcode. This gives to access to the tool number, probe values and other information.
pwm:
pwm_hz: 5000
...
atc:
m6_macro: G55 G0X0Y0
You can create advanced ATC classes. Spindles can use these classes via the atc:
config item. This allows any spindle to use any of the existing classes.
atc_manual:
safe_z_mpos_mm: -1.000000
probe_seek_rate_mm_per_min: 800.000000
probe_feed_rate_mm_per_min: 80.000000
change_mpos_mm: 80.000 0.000 -1.000
ets_mpos_mm: 5.000 -9.000 -40.000
ets_rapid_z_mpos_mm: -25.000000
pwm:
pwm_hz: 5000
...
atc: atc_manual
M6_macro:
If you have an ATC that requires special interaction between the spindle and ATC, you can write a custom spindle class. All information about the tool change goes through the spindle, so you can act upon it at that level if you like.
my_spindle:
pwm: 5000
...
atc:
M6_macro:
my_config_item1:
my_config_item2:
An m6_macro:
can be used with any spindle type. It will run if it is defined and the spindle does not have an ATC config item. Read more about macros here.
coming soon...
This is uses a human to change the tool, but it uses an electronic tool setter to automate the setting of the tool length offset (TLO) so the Z axis only needs to be zeroed on the work once. Ideally the tool setter has some over travel, so you can safely probe faster.
When a tool change is requested for the first time, the length of the currently zeroed tool will be measured. It will then move to a specified tool change location and hold. You manually change the tool and send the resume command. It will measure the new tool and set the TLO to zero the new tool. Itr will then return the the location before the tool change was requested.
change_mpos_mm:
position and waits.The atc_manual class is designed to speed up your workflow a little by doing these things when running a CAM file.
This is what you must do manually before running any CAM files.
You can now run your CAM file.
After the cam file is done you can send M6T0 if you want to remove the Tool. You must then repeat the workflow above.
If you want to run another CAM file, you only need to set the work Z zero.
You cannot use a probe in the spindle to set Z zero. It must be zero'd with the first tool.
Your post proccessor and resulting gcode is responsible for this.
Save the TLO and Tool number in NVRAM.
atc_manual:
safe_z_mpos_mm: -1.000000
probe_seek_rate_mm_per_min: 400.000000
probe_feed_rate_mm_per_min: 80.000000
change_mpos_mm: 80.000 0.000 -1.000
ets_mpos_mm: 5.000 -17.000 -40.000
ets_rapid_z_mpos_mm: -25.000000
PWM:
pwm_hz: 5000
...
atc: atc_manual
m6_macro:
probe_feed_rate_mm_per_min:
value it will do this faster probe, retract and then do a second probe at the probe_feed_rate_mm_per_min
rate.