Hi everyone, hoping for some guidance on finalizing how I am using GRBL to

Hi everyone, hoping for some guidance on finalizing how I am using GRBL to run tool paths (from Fusion 360) using UGS… Here’s a pic my machine - the whiteboard was done using manual Gcode commands with a marker mounted. The whole things is still WIP, but I’m now trying to cut air to confirm all is functioning properly.

I think part of the challenge is simply familiarity with typical/proper operating, process even after many YouTube videos…

This picture was taken after homing. Y is far left, and X is close to camera. Z is homing up high. The home switches are installed and the machine homes to all 3 fine. But… in this position, UGS will indicate that the Machine Position is at the negative soft limits. My travel limits in GRBL are (X=500, Y=900, Z=100). So in the home position, my Machine Position is (-498, -898, -98). So all Axis move in a positive direction from home, but from a negative number… Does not seem correct. Thoughts?

But,… when I begin to run a Gcode file, all 3 Axis move diagonally to the opposite side from Home before as the program begins… So effectively the machine went from Homing to a Machine Position of full negative limits on each axis (-498, -898, -98) to starting the job from a Machine Position of (0,0,0). Am I using the UGS “Reset Zero” correctly? Should I flip the operation of my steppers motors? Should I being setting some other Work Coordinate System as well as adding a line of Gcode to my file to tell it to go to that working coordinate space to begin?

And finally, the Axis of my machine are (partly?) inverted. Definitely my Z Axis is moving down the the bottom of the work surface that then ‘machining upwards’, raising upwards to cut. It seems like my X Axis is a mirror image too, but maybe my Y Axis is not… All are wiring the same. Feels like I should flip the motor coils, but I am not sure what that will do to my Homing. Maybe I need to flip the coils and also flip the GRBL Home direction setting?

And finally what is the most common practice for aligning the origin of the CAD model in Fusion360 for example, relative to the stock as it is placed within the physical machine?

I am sure with a bit of experience with it working the right way, it will all make sense. But for now, the combination of these things all not quite right, make it difficult to pinpoint what needs fixing. Thanks for any guidance!!


Here are my GRBL settings as well…

$0=10 (step pulse, usec)
$1=25 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=0 (dir port invert mask:00000000)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.010 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=0 (report inches, bool)
$20=1 (soft limits, bool)
$21=0 (hard limits, bool)
$22=1 (homing cycle, bool)
$23=7 (homing dir invert mask:00000111)
$24=200.000 (homing feed, mm/min)
$25=1000.000 (homing seek, mm/min)
$26=25 (homing debounce, msec)
$27=2.000 (homing pull-off, mm)
$100=250.000 (x, step/mm)
$101=250.000 (y, step/mm)
$102=250.000 (z, step/mm)
$110=3000.000 (x max rate, mm/min)
$111=3000.000 (y max rate, mm/min)
$112=1000.000 (z max rate, mm/min)
$120=40.000 (x accel, mm/sec^2)
$121=40.000 (y accel, mm/sec^2)
$122=40.000 (z accel, mm/sec^2)
$130=500.000 (x max travel, mm)
$131=900.000 (y max travel, mm)
$132=100.000 (z max travel, mm)

The home position should be the front left corner so where your drill case is in that photo. So y and x should be positive as you move away. Z normally works in negative numbers going further down. Pretty much anything can be made to work just pays to pick a standard and keep with it. I use tinyg and chilli pepper, I’d recommend you look at the cp workspace for grbl. In fusion you can set up your model stock and origins any way you want. I try to use the front left corner as origin normally but sometimes it’s easier to use another feature. Doesn’t matter if the gcode has a mixture of positive and negative positions.

To test your job the first few times you generate, you can just set your z zero well above your work piece and run it to see if it behaves as expected.

@Paul_Shaw Thanks Paul, I will try moving my home to the front right in my picture. I’ll have to flip the direction of travel of the Y-axis to make that happen. I’ll give Chilli Pepper a try, to see if it clarifies any of this setup for me.

Regarding Fusion - presumably though when a part in fusion is say, tall in the X direction, it will be built on the CNC with that same tall dimension in the X direction, correct? So when I touch off on the stock on the machine, I physically go to the point that is the origin within Fusion? And at that point on the stock, do I Reset Zero on my machine? Maybe that will be more clear for me in CP.

@Henrik_Larsen Thanks I’ve been able to do that to simply see the machine go through the G-code motions. My z-axis is running inverse to the G-Code. Same for at least the X-axis too. With things inverted I’m trying to get my head around what needs to be changed to get it setup right.

Henrick, how and when are you setting the coordinates for the workspace where the part is to be cut as compared to setting the machine working envelope with the homing process?

@brian_alley Brian, in my photo, which corner would that be - the upper left? Does that have any implications to how a component you design in something like Fusion 360 ends up being positioned within the CNC machine work space?

I suggest you follow standard. Home should be set so other users intuitively understand it, that is lower left corner when you stand in front of the machine. You should use the parking function to position the milling head out of the way.

When I turn on the machine and start the PC, I home it. From then on homing is not needed anymore unless a job crashes the mill into the workpiece.

When I load a job i want to run, i first zero the axis to the point of stock where the job has zero defined.

Homing is for the cnc software to know where the spindle is in the entire workarea.

Zero is the point where a job start, so this is relative to stock position.

If you move stock you must zero again.

If you move the spindle by other means than by cnc software you must do home again.