Y axes won't back off homing sensor

Hey everyone, I’m new here and I’m new-ish to the system I’m using now.

I saw a couple of posts that seem similar to the problem I’m having but the fixes there don’t seem to apply here because there are different factors, and I tried the things mentioned in those threads to no avail.
The problem started a couple weeks ago when i came in for the day (this is my job) and the Y2 sensor wasn’t activating at all. Cool, no biggie, I changed the cable out and ever since then my Y axes have been having trouble homing. Usually now, they will both home until the sensor activates, but then one of them won’t back off the sensor, but the other side does, and then Mach throws the code “!!!WARNING: A motor seems to be stuck backing off of a home switch! Check the diagnostics tab to see if the Home switch indicator is active when the switch is not!”

Sometimes which side backs off after homing swaps. But usually the side that doesn’t back off is Y2 while Y1 seems to be perfectly functional. My boss knows more about this system than me so we tried a software restore from back when it was working fine, but that didn’t help. He said that rules out software error and so it must be a problem with the cables or sensors, so we ordered new ones, I replaced them, but still the same problem. Again, sometimes the side that is correctly backing off switches from Y1 to Y2 and the other side is not backing off, but I can’t get both of them to back off correctly.
the motors work fine when not homing but we ordered an extra of those so i went ahead and changed Y2 (the more frequent problem-side) too to rule it out. No change. I haven’t changed the Y1 motor, though.
The fact that the sides switch and it’s not consistent has always told me that it’s software rather than hardware, such as a settings issue, but my boss says its hardware because the software restore we did he said rules that out. I have all new of those listed components, though.

I saw a different thread here that said their similar problem was due to slop in the worn down drive gears. Would these be the gears with the belt that is attached to the motor? I can try that next, but it’s still interesting to me, and frustrating, that it’s not just one isolated side - it’s both of them switching back and forth inconsistently.

I also tried the fix mentioned where you replace the machine.ini with a previous functional one, but, interestingly, there is a huge gap in these files between august and well after this problem started. I don’t know that the program was working correctly in august, but I tried replacing it after saving the “original” from today’s date elsewhere, and it seemed to have no effect.
Can anyone help me figure out what settings or other component to change or check?
We are running Mach 4. let me know what other info would be helpful!

Thank you!

Is this a Mach system? If so, check the troubleshooting guide here: Troubleshooting