Ok, you need to get a test program in. You need to narrow it down. Do one test with just moving the axis down and back. Then do another with turret index only (if it passes the first one), then if it passes that one, do one with spindle on/off. That will narrow down what we are looking for. The LC40's of that vintage have several banks of ice cube relays, my guess is one of those if failing. Pretty common now with the age of those things. Relays are cheap.