I'm thinking about PLC hardware going bad or any other thing that acts up from time to time. The fact that it does not go into autcycle on the first try could be an area to look for. We are thinking of replacing hardware starting with the most obvious but this can be a costly way to go. However the customer is nervous and willing to try anything. Right now we are cooling the cabinet (90 deg environment) to see if that changes anything.
With a SLC, if anything was wrong with the CPU or the backplane comms to any of the cards, it would definitely fault the processor. Logic doesn't stray, or get flaky, because the CPU constantly checks for this and will wipe itself out and shut down. Same thing with the cards in the rack, any little hiccup on the backplane will cause a fault.
It is rare, but possible for a card to have a problem on its field side, but it is even more rare for that problem to be intermittent. The one type of PLC card that can be intermittent is the relay output card (look for OW or OX in the part number).
If the machine craps out every twenty minutes, it should not take very long to prove beyond a doubt the root cause by monitoring logic.
I should insert a caveat here, that the absolute worst written program I have ever seen was a small bag making machine that was so horribly written, it took four hours to figure out the root cause of a simple problem. I ended up writing a new program for that one.
So, you might discover a program written by a person trying to win a code obfuscation contest, but then you can share that with us and we can help you fix it.
I am not a fan of shotgunning parts at a machine. It might seem like the fastest way to solve a problem, but in my opinion it is always faster to find proof for the solution you think you need.