Could somebody explain how to code and configure macros using the WebUI please? I am trying to create a macro to probe using the code Doug Joseph uses in his video. His script looks like this:
G21 (MSG G21: Metric mode)
G90 (MSG G90: Switching to absolute positioning)
G94 (MSG G94: Feed = per minute)
G92 X0 Y0 (MSG G92: Setting current XY position as workspace origin 0,0)
M0 (MSG Attach probe)
G38.2 G91 Z-124.9 F400 (MSG G38.2: Fast probing to material)
G1 Z5 F400 (MSG G1 move Z up by 5mm, speed 400)
G38.2 G91 Z-6 F100 P0.34 (MSG G38.2: Slow probing to material. Plate thickness: 0.34)
G90 (MSG G90: Switching to absolute positioning)
G1 Z30 F900 (MSG G1: go to Z30, speed 900)
M0 (MSG Remove probe)
M62 P1 (If used start spindle pin27)
The FluidNC wiki for macros says to add &(ampersand) between multiple commands. So I assigned this to a new macro: G21&G90&G94&G92 X0 Y0&M0&G38.2 G91 Z-124.9 F400&G1 Z5 F400&G38.2 G91 Z-6 F100 P0.34&G90 (MSG G90: Switching to absolute positioning)&G1 Z30 F900 (MSG G1: go to Z30, speed 900)&M0 (MSG Remove probe).
This seems to crash the system.
What is the difference between macro’s in config.yaml, in Settings FluidNC features and in Settings ESP3D Interface? Which one should I use?
I am not sure how to do the Macro’s. Haven’t had a need to do one. But if you follow what Ryan has in the Milling Basics page and put the start, tool change and end gocde in Estlcam, then there is no need for a probing macro at all. One less thing to have to remember to do before you start a job.
V3.
I am actually just setting up my new LR4. Carrying out Z levelling using multiple probes, the adjusting the pull-off of one of the Z motors depending on the average of several probes across the extents of the X travel would be easier using Dougs macro. The built in probing function resets the Z axis to zero when it probes. So trying to get the actual position is more difficult. I also wish to probe quick, pull off and then probe slow.
My previous LR3 had a SKR Pro controller and was easy to set up macros
It’s too bad my Z leveling macro isn’t quitw ready for primetime. It does all that automatically including averaging multiple probes, and calculating and setting the pulloff values.
I’m not at home to fully answer but I’d just create a regular gcode file and put it on the SD. You can then just have the macro run the gcode file or just run the gcode file like anything else.
For your case, you would likely choose the Type of “SD Card” and then specify the Action as the filename.
If it was only a single gcode command or a small number, you would use the “GCODE command” type. Note that multiple commands here are separated by a semi-colon.
You don’t need to specify a keyboard shortcut.
The note about the macro name being hidden in mobile view is true for the default theme, but not if you are using one of my themes. I prefer to have the name always displayed.
The ones in config.yaml are the same as the ones in Settings → FluidNC Features (Config section). If you modify one of those, you would need to click the Save button at the bottom of the page and then use the Save macro in the Macro section on the Dashboard. This is the same process as if you were modifying your pulloff values. The first Save updates the currently running settings, and then the Save macro actually updates the config.yaml file with those settings.
I’m not using these but if you have questions, I could probably answer them.