Question on Macros

Hello all - thank you in advance for your insight.
I have 1.6.1 and just getting to the macros. Still learning. A few questions:

  1. What are typical reasons you would use a macro?
  2. I guess if you made a product or a few different ones, you could load the code into the macro buttons, so you don’t have to upload Gcode files each time. Is this a usual use for macros?
  3. Can you code a file to add Gcode to the loaded script? for example, I just learned how to use the WCS to make duplicates. Currently, I have to manually add the X & Y coordinates to the Gcode files - these lines:

N21 G10 L2 P1 X0 Y0 (for part 1 – always stays at 0,0)
N22 G10 L2 P2 X0 Y9.008 Z0 (for part 2)
N23 G10 L2 P3 X0 Y18.231 Z0 (for part 3)
N24 G10 L2 P4 X16.106 Y.019 Z0 (for part 4)
N25 G10 L2 P5 X16.106 Y8.995 Z0 (for part 5)
N26 G10 L2 P6 X16.106 Y18.274 Z0 (for part 6)

Could I create a macro which added this code to the loaded Gcode file in the correct location in the file - so I didn’t have to edit the Gcode file each time when making this design?
4) anything else about macros I should know?

thanks,
J

  1. MACROS are new to us, but you can get an idea of the more obvious use cases here https://forum.onefinitycnc.com/t/macros-files-for-bb-official-thread/25091
  2. Yes, that seems like a possible macro use, for repeat production use.
  3. I don’t think macros can modify other files. I haven’t used work offsets, and am not an expert but it does seem like you could setup macros to change your work origin (Home) to various preset absolute machine coordinates.

Hope this helps!

1 Like