UGS Macro looking for help

Hi everybody, I am new to UGS. I am looking for help to create a macro that moves the CNC to TOP-RIGHT (opposite home) and not depend on what coordinate is the machine when I trigger the macro… is thee possible? that anyone helps me to achieve this.

Use Machine coordinates.
On my machine, MACHINE zero is back right with the Z at the top of its range (this is the grbl default).
Your macro could be:
G21 - forces mm mode (default, may be omitted)
G90 - forces absolute mode (default, may be omitted)
G53 G0 X-5 Y-5 Z-5 - In machine coordinates, move to the position X-5 Y-5 Z-5 (5mm less than their zero)

Set those -5 values to the MACHINE position you want yours to end up.

Alternatively, if you don’t use them, you could jog to where you want the machine to go and set your G30 position by sending G30.1 (same for G28). Then your macro could just be:
G30

You should learn what some of the basic Gcodes do.

G20/G21
G90/G91
G0/G1

A UGS macro is just a line of Grbl acceptable gcodes separated by a semicolon.

If your home switches are front left then that should become x0,y0 after homing. My x carve shows up as a negative number with my x controller, so I just close the software after homing, reopen it, and then reset the zeros.

gcodes

Not necessarily. The default for grbl (and most CNC routers/mills?) is to have 0,0 in the back right.

@MartinW.Mcclary, I see you edited as I typed. I know you like that 0,0,0 when you home (you can actually change that behavior in the firmware).

That’s because 0,0 is in the back right. The work envelope, by default, is in the negative XY quadrant.

I’ve read here that you can reflash the Arduino to correct that negative number showing up. I’m not that computer savvy and don’t feel that lucky :-).

It’s just easier to keep home 0,0 by closing and opening the software after homing…a couple clicks and it’s 000. I’ve experienced enough failures with grbl and the x carve that this technique reduces some of the potential things that can go wrong. We have more than our share of power failures here. I can always easily just re -home and start over this way.

The OP wrote he wants to move to top right…opposite home, which to me means home is left front…same as mine or his home is front-right…which is a possibility too I guess. Depends on what you consider opposite…LOL.

The OP can chime in so we all know…

There’s a bit of weirdness with the x controller and GRBL that you have to learn too. Changing from mm to inches sometimes stays in the mm mode when jogging. GRBL isn’t Mach3…but it can get the job done.

The couple options I gave him will work.

Maybe someday I’ll convince you to skip the power off / power on part of your workflow. :wink:

1 Like

I just fired up my K2 machine with Mach3 last week. It has been a while. I had to re-think what the heck I was doing.

1 Like

Thanks both for answer and explanation