Memory Clearing?

I have a Shapeoko 5 pro. When I get limit switch issues, I turn the power off to the main box so I can move VFD towards the center. I then turn the switch back on and try to initialize. At this point, machine starts initializing, but when the - Z axis hits the homing switch, it gives me the GRBL Alarm 8. No matter how many times I try clearing and reinitializing, I get the same error. Fast forward to the next day, I try initializing and it works fine. So the only thing I can think of is it retains the memory for a certain amount of time? Anyone have issues with this and is there a way to clear? Thanks

There is no memory. You may need to adjust the sensor closer. It might just be an intermittent issue with the sensor not being set when the Z gets to the top. That may be why it works sometimes and sometimes not. Also could be a connection problem. Look at the connectors and make sure no wires are loose in the connectors. Push them in and see if they move in more. This is most likely a connection problem. Could be a flaky switch but try adjusting it first. Get your Z all the way up and then adjust the switch till it almost touches the mate on the Z.