Most causes of cannon problems are the wire harness.
Double check and make sure there is no break in any of the wires within the insulation that can cause intermittent shorts.
Pay extra attention to the Opto wires.
They may "appear" fine in a continuity test until they are moved into a certain position.
Check the harness connector for looseness.
Clean the optos and double check that they are aligned and stay that way while the cannon is in motion.