_ If im not wrong, i've read somewhere from osprey's books, i think it's title is "roman military tactics" or something like that. In that book, the author not only writes about legion formation, how roman groups up their army, march, battle line etc ... but also a small part how to use pilum in charging !
_ And i remember there is one picture about how roman charge : in close formation, when they want to charge, 1st rank goes run 1st, raise their pilum, aim, run for a distance, and throw their pilum ( like in olympic ), THEN they raise their scutum, use the bottom of the shield as a shock force, draw their short sword, and charge straight to enemy, while holding sword to be ready to stab after the impact.
_ While the 1st rank on charging, 2nd and 3rd rank repeat exactly like 1st rank ( sure, after a short break ) untill all groups get in combat. 4th rank will not throw their pilum, because in their turn, 1st rank are in very close melee range with enemy line, so they will not want to friendly fire ! That's it how Roman uses pilum when go offensive, to make enemy's shield useless, panic and some " hole " in enemy's line before they charge in.
_ In defensive, of course they will try to use pilum every time they can, but i don't think 1st line groups can do that efficiently, because they want to make formation close to defend, so the job is done from 2nd line, or " pro " javelinmen
Btw, each soldier in heavy infantry group can hold only one pilum, because its heavy ( plus their heavy equipments) and holding more pilum will make them slow. One pilum is far from enough to do the job, pilum can be swap from rear to front line in order to fire repeatly in defensive stance. Only javelinmen hold more than 1 jav, it's their job to throw pilum/javelin as a range troops, not heavy infantry.