I will explain this as best I can. When the machine is "zeroed", the axes travel to home switches and then back away from the switches to a specified offset. This grid offset becomes the zero point when the machine is in use. This alarm you are getting indicates that the margin is too close to the switch.
You can also look for chips on the trip flag. Chips can sometimes cause the switch to trip too early. You didn't mention any other problems with the machine, such as excessive backlash, but this can also cause a grid margin alarm in extreme cases.
Sometimes, no problems can be found and then axis simply needs a grid offset adjustment.
In Zero Return mode, the distance to go that is displayed on the screen is the amount that the motor rotated away from the switch to the grid offset. The alarm will occur if the distance to go becomes less than .0295 or greater than .2065. The ideal amount is .118.
Here is the procedure for setting the grid offset:
1. Set the grid offset to zero. (Parameter 125,126, 127, 128, or 170, (depending on the axis being set.) Always write down the original value.
Setting #7 (Parameter Lock) must be OFF and Emergency Stop button pressed in before any parameters can be changed.
2. Press Zero Ret, then the axis you are setting (X, Y, Z, A, or B), and then press Zero Singl Axis.
3. Calculate grid offset using the following formula, and write the result in Parameter 125 (X-axis),126 (Y-axis), 127 (Z-axis), 128 (A-axis), or 170 (B-axis).
(Distance to Go - .118) x Ratio = Grid Offset.
The Ratio (steps/unit) for the X, Y, Z, A, and B axes are the values in Parameters 5, 19, 33, 47, and 155, respectively.
When finshed, cycle the power on the machine and test it.