Not all alternators use the same connections, and there is no universal code for the terminals. You are best off getting the wiring diagram for your particular alternator
That being said, I would move the wire from the starter (which also goes to the battery) from the EXC terminal to the B terminal. The EXC terminal should be connected to the ignition wire, so the alternator will only be excited when the ignition is on. The S terminal is probably for external voltage sensing, and is jumpered to the B terminal in this installation
(you might get better performance if you ran a separate wire from S to the positive battery
terminal, but you have to fuse it and you can really screw things up if you switch to a different battery. The E terminal on this alternator appears to be for earth, or ground, but this installation
is probably grounded through the alternator case and mount.