So we have an 06 JCB 214s extenahoe. Today our issue started. We went to fire up the machine and it started just fine but when our operator applied pressure to the gas pedal the warning light lit up and the battery light lit up. There is a strange screech coming from the motor as well but only when given gas. I thought it was the alternator but when I disconnected the neutral it stayed running.
Sounds like belts slipping. i would have a look at the belts and pullys for wear and tension. Being 18yo, i would expect all the alt, fan and crank pullys to be worn down into the vee. Only just replacing belts wears them quickly.
Try not to pull the battery cables with the engine running on any vehicle or piece of equipment. It's bad practice and can smoke any electronics that happen to be in the electrical system. Been there, done that. You can spray some 3M spray adhesive on the belts as a test to see if that stops the noise and the problem. The adhesive won't last long, but enough to see if it is the belts.
Remove the belt, clean the pulleys and install a new belt. Make sure it is the proper size, width and length. As was said above disconnecting a battery cable while running is not advisable. It will cause the alternator to full field which will put out 18v or so and can damage any electronics. One other pace to look at for the noise is the the crank pulley. If it is a harmonic balancer the rubber could have failed causing the outer ring to slip. This is where the belt rides. You can mark it with a sharpie and then make it squeal and check if your marks are lined up. If not, you need a new balancer.
Check the ac pump hasn't ceased.