Could be faulty pto switch or loose wiring. Check the wires on the alternator are tight and making good connection and is it actually charging good. Belt tight? Also pto control relay in fuse box may need swapped with a known good one. The insulation on the wires going to the pto control valve is known to break down.Can be got at through the round plate on the left side in front of the left trumpet housing.Behind the lower fuel tank(if you have one). Had this on my 8240--the wires were completely bare,internally from the rubber grommet to the valve.
Don't believe there was a fuse.The wires were touching on mine.Would have expected a fuse to have blown but didn't find one.The wires can be felt through the round plate and were on spade terminals IIRC. A fidgety job but do-able. However,if the pto valve is the problem,the top lid would need removing.
I'm with agrimax, it's probably the wiring through the side of the gearbox, mine was.
You can check which side of the switch is the problem by popping the switch out and if you apply a 12v feed to the bulb it will engage the pto solenoid. If it is still intermittent it's the wiring.
Pop the top off the twisty knob that engages the PTO in the cab and make sure the screw inside is tight.
The test bypasses the alternator, the solenoid, the switch and the fuses. Best make it a fused feed then.The test that you refered to (running hot wire to on/off light) is that to test the internal PTO wiring to the solenoid, or is it to test the on/off switch wiring. Should the tractor engine be running for this test? Also, does this bypass the need for the signal from the alternator to engage the PTO?
We really appreciate all of your help,
Thanks
Wires are a pair, 25cm long with rubber grommet in middle. They go through the side of the back end behind the lower plastic diesel tank. Diesel tank can rub on wires etc over the years.
Back left wheel off, slide diesel tank away from tractor, drain back end oil, round steel plate behind tank to remove, insert hand (to elbow) undo spade connectors single handed. Pry old rubber grommet out from outside, withdraw 2 wires. Insert new wires, bit of lube on grommet and use a piece of pipe to tap it home. Reconnect in reverse etc.
buy a cd workshop manual, they're only a few quid. Have fun