Macros: Post em up!

Didn’t find any type of macros listing on the forum, so go ahead and post yours. I’ve got a few that are buttons in UGS to automate jogging around and switching between lasers. I’ll update once I fix the border scan and again once I create my tool length offset probe for toolchange.

Move to XY Job 0
G53 Z-1 G90 G0 X0 Y0

Move to XYZ Job 0
G53 Z-1
G0 X0 Y0
G1 Z1 F1000

Raise Z
G53 G0 Z-1

Move to Home Position
G53 Z-1; G53 X-1 Y-1

Set Bottom Left Zero (when parked at WCS Home)
G53 G0 Z-1; G53 G0 X-800 Y-356

Move to Tool Change Position
G53 Z-1; G53 X-300 Y-200

Scan Border (works on bCNC, not yet on UGS)
G53 z-1; G90; G0 X[xmax] Y[ymax]; G1 X[xmin] F1000; G1 Y[ymin] F1000; G1 X[xmax] F1000; G1 Y[ymax] F1000

Laser Mode On

Laser Mode Off

Laser Beam .002 seconds (for positioning)
G1F1; M3S10; G4P0.002; M5S0

1 Like

Interesting, that looks pretty specific to CNCjs. Are the % lines universal or does that set up code within CNCjs?

Some are pure gcode. Most are specific to CNCjs but will work with modification with bcnc.
UGS doesn’t have a mechanism for anything interesting.

I find it faster to type the one liners and send them through the console.

DISCLAIMER: I feel bad for posting this but I don’t know which wiki or previous post I should be looking at…

Macros sound awesome, I’m using Carbide motion and my assumption is that I just have to manually type these into the MDI line interface OR is there a secret button I’ve been missing OR is there a secondary application I should be running at the same time to do this?

Most of those should work when entered into the MDI — the problem is that the ones which use variables (the values in square brackets) won’t work, and for the others they have to be entered accurately with the correct values for your machine.

@WillAdams you mention variables won’t work; is that a CM thing or a GRBL thing? That might help me figure out why I can’t get them working in UGS, but they work fine in bCNC. I’m dying for a [max] and [min] capability to test clamp clearance.

It’s a gcode thing.
bCNC and CNCjs handle the variables, they do not make it to the controller. Anything like that needs to happen in the software on the controlling computer.

Why not use bCNC or CNCjs?

1 Like

bCNC stalls on large jobs and CNCjs stalls shortly after starting any job, using a Raspberry Pi 3. Once I started using adaptive clearing toolpaths from Fusion, it was game over for bCNC. Looking into upgrades now though, since bCNC does run smoother for smaller jobs and UGS is sluggish.

This topic was automatically closed after 30 days. New replies are no longer allowed.