Here is a post addressing how ballista were used by the Romans which might also tell you something about how they were used in medieval warfare -- mainly in a siege, and not against the walls but against the people manning the walls or the defending artillery.