Read the size of the working space from GRBL's $130, $131 and $132 parameters. Then on every movement request compare the distance from the current position to the limit and do not allow jogging beyond that distance. This will keep the movement from triggering a limit switch or hitting a hard stop which will cause GRBL to loose its position or the steppers miss steps.
Read the size of the working space from GRBL's $130, $131 and $132 parameters. Then on every movement request compare the distance from the current position to the limit and do not allow jogging beyond that distance. This will keep the movement from triggering a limit switch or hitting a hard stop which will cause GRBL to loose its position or the steppers miss steps.