Setting up and Testing Limit Switches

NOTE: AS OF GRBL 1.1 some of the instructions below have been updated
Download Universal Gcode Sender  (Cant use Easel For this)
Open the Grbl Firmware settings:
Change $10 to 16   – DO NOT CHANGE $10 FOR GRBL V1.1
Set Hard limits and homing to 0 
 You must still turn off Hard limits for GRBL V1.1
Ok and close this, then re open it and make sure these settings took hold!!!
Tick these boxes
And you should see a whole bunch of data flowing
For GRBL V 0.9:
Take note of the last three Zeros
These three correspond to the limit switch states in this order : Z Y X
So of they are all 0’s then the limit switch is not depressed.
In the image below I have pressed the Y limit switch, and so the middle changes to a 1.

If Z Y and X turn to 1’s when you hit the switcehs (in the correct order), everything is good and you can change all the settings back
Take note of the last 5 characters on the line.
PN:X> shows up when you are pressing the X Limit Switch

PN:Y> shows up when you are pressing the X Limit Switch

PN:Z> shows up when you are pressing the X Limit Switch


If the correct wording shows when the limits are pressed then you can move on and put settings back.


Change all the settings back:


Report mask = 3  (GRBL .9 only, don’t change GRBL V1.1 just leave this at 0 or 1)
Homing = 1
Hard limits = 1
Ok and close this, then re open it and make sure these settings took hold!!!
Now move onto a homing cycle
Turn the homing speed and rapid speed on all axis down so we don’t break switches and have time to hit the estop if somethings not right.
Move the machine into the middle of each axis and run a homing cycle.  Read the below before hitting $H!!!
We have slowed down the speeds of the homing so that we can 1st asses the direction of the motors during a homing cycle (these may need updating).
Watch the Z Axis, if it starts going up then all ok, lean in and trip the Z axis limit switch to see if it stops as expected, – if it goes down do a soft reset or cut power immediately.
If it went up and stopped, all good run the homing cycle again and make sure that after the Z homes that the X and Y start running towards the back right, and if they do go trip those limit switches as well to make sure they stop their respective axis.  If not again pull the power or hit soft reset.
If when you tripped these switches by hand the respective axis did not stop or change direction momentarily then you need to re validate your limit switch wiring.
If the motors were going in the wrong direction (other than up back and right) then you need to look at your value for 

$23=1 (homing dir invert mask:00000001). Read more about this here and here

Once you have validated that your switches work inside a homing cycle you can let it run on its own. 
More info on homing and directions here, maybe read this before trying the homing.
Once you have finished setting up the homing you will want to turn the speed back up as it will be painfully slow.  The two homing speeds to update are 
$24=XXX (homing feed, mm/min)
$25=YYY (homing seek, mm/min)
Set XXX somewhere between 25 and 50, lower the better
The value for YYY this is up to you, start low and move it up to where you are comfortable.  Too slow and you will be waiting forever for a homing cycle to complete, too fast and it will smash the limit switches.  Start at 1000 and try a bit faster until you think you have found a good balance.