Hello Fatima, I have a different question. Have you analyzed why people are coming late?
Some of them may be undisciplined or lethargic, but not everyone. Try to find out the area or reason that will make them feel excited about reaching on time. Interview a few of them informally to know the real reasons (e.g., are they working long hours in the office every day?).
Check the location of your office or factory and where most of them are staying. Is it too far? Allowing a grace period is a good suggestion, but it should be practical. If the location is on the outskirts, people are bound to be somewhat late, especially when driving through their means.
Applying a penalty for frequent latecomers is obvious. Yes, negative motivation is necessary to maintain decorum.
Nevertheless, I would like to suggest you devise something that works as positive motivation, e.g., bonus points if an employee attends the office within the given time in a month. You may convert these bonus points into some sort of gift or a vital point connecting to the appraisal parameters.
Hope it helps. All the best!