Some heavy weapons guy tips:

Your main weapon is not the chaingun. Your main weapon is the super shotgun. This is because defending the base is not about standing in one spot and expecting the other team to come to you. As the most imposing class in the game, they will be trying their best to avoid you, so standing there like a lemon for 2 1/2 seconds is not the best strategy here. The idea is to empty seven rounds of super shotgun (not eight or it will automatically reload)into an attacker to get their attention, and if they bite, chew them up with the chaingun. If they run away, chase them with your shotgun, which still has eight rounds left in it.

Times you'd want to use the chaingun
When you're facing three or more soldiers in a ramp room, and you know you're going to die
When you're facing lots of scouts in a ramp room, you're covering all the exits, and you know they're going to die
When you've just been hit by a concussion grenade. You don't move around while the chaingun's firing.
When a soldier's just fired his fourth rocket at you
When you can track a flag carrier for long enough to puree him

Times you'd not want to use the chaingun
On a spiral staircase
When you're standing on a grenade (especially napalm)
When there's millions of teammates kicking around
When you're standing at a fort entrance
When you're hunting snipers

Miscellaneous tips
To deal with someone circle strafing you: Get the chaingun out, and spin in the opposite direction - You'll hit them once every 180 degrees, as opposed to not at all if you're on a modem
On most maps the only way to get to 300 armour is by virtue of an engineer. So be nice to them and look after their sentry guns.