FluidNC and Macros

Just finished my build and have drawn the crown!

Next up is to square the table/gantry. Watched several videos and read as much as I could on the subject.
A lot of people have created a macro on using the probe (I realize there is a probe tab in FluidNC but I’m trying to learn other ways to utilize the program). I understand the script for the code but am not sure how I get that into the FluidNC and would like some guidance. After I copy a script or create my own, where do I put it? Into notepad or do I need another program for that?

I’m sure that this in in a topic somewhere but I haven’t found it as of yet.

Not 100% sure on what you are going for.

I don’t use scripts in that way. I make gcode files, just like job gcode files.

My probing happens at the beginning of a job and during a tool change.

When I do squaring, it is a gcode file as well.

I guess in the end they are nearly identical, but it is a bit more work to make a script file upload it and edit the preferences as well. If you want to see how a script in fluid / webui v2 works take a look at the scripts I provide from the docs to turn inputs on and off. In V3 it is much easier, but a little different syntax.

My terminology might not have been correct in my previous post.
What I would like to do is copy someone else’s gcode and use that as a macro in fluidnc (for probing).
After I copy that gcode for a macro, where do I copy it to? Is there a specific program that’s used? What is webui v2? Or where do I go to create a gcode?
Again, I’m sure you have that documented somewhere but not sure I’ve seen it.
I apologize for my ignorance (I’m old!).

It is always best to probe for a job in your starting gcode in your CAM software.

What exactly are you trying to do with this probing, when? If it is just to check stuff, use the probing tab in the UI, if it is for a job do it in your CAM starting and tool change sections. If you do not add it to your job, you can forget to do it and ruin your job. What if you go to redo your job in 6 months and forget when you are supposed to probe? It belongs in the file itself, not in your memory.

I do understand that a “probe” macro can be useful, especially when trying to set my Z pullbacks.

But when squaring the table, I don’t “probe.” I move to the corner and then move the Z down so the V bit leaves a little mark in the tape. Then I raise it and move to the next corner. This isn’t a “probe” though. It has similar machine movement, but it doesn’t use the touch plate.

The concern that I would have with copy/paste of someone else’s code is that the locations you want to make marks, Z-height to leave a small enough mark (but not miss the tape), and the other details (like where you want the gantry when you’re doing the measurements, the speeds you’re comfortable moving things, the order you want to create the marks, etc.) are so variable that I wonder if its a good starting point.

The process is to create a text file (notepad works fine as long as you save it as plain text), upload it to either the SD card or the ESP32 board, and then use the macro tab to “point” to it.

For the record, I didn’t bother to make a macro for beam leveling. I sent the code manually for the 38.2 probe, then I just used the up arrow to reselect that same command each time I wanted to send it. This is basically because I only level my beam/Z at one Y, then I surface the table to be level to it. For just two locations, I didn’t think I needed a macro.

My apologies if a lot of this is not applicable. I’m coming from a Lowrider perspective. I had built a MPCNC previously, but I don’t know why you’d need to probe more than Ryan refers to above with that machine. I only manually use it to level the beam on my LR3.

1 Like

You are correct in that I don’t need to use the probe other than leveling my Z. I had seen some videos in which people have created a macro and was wondering more about creating a macro in general. Just trying to understand the process of creating one. Your answer about creating a text file in notepad is the answer that I have been searching for!

I really appreciate your time in answering this question.

After you’re done you want to rename the file from whatever.txt to whatever.g for the board to recognize it. Then you edit the macro button to run that file name when pushed.