At our school, we have a great system. It's called "Tardy Round-Up".
When the tardy bell rings, the teachers all close their doors and they are locked. Without a pass, the students are not permitted in the room.
They must go to a designated location on-campus to get a tardy slip. The tardies are logged in a computer and the consequences begin after the SECOND tardy in one six weeks. This would be the second tardy FROM ANY CLASS.
After the second and third one, they get a D-hall. After the fourth and fifth, a couple days in ISS, and I think the sixth one is an automatic suspension.
Students are EAGER to get to class on time to avoid those consequences.