The paradigm change in IT(Information Technology) industry happens very fast from ten to two years. In this fast changing environment, many enterprises focus on human resources to make them selfmotivated in catching up new technologies. PLCs (Programmable Logic Controller) are at present the basic and universal tool for the automation of manufacturing processes in various industries. However, the education process of PLC programming is not clear enough to train PLC engineers effectively. The essential requirement of PLC programming is knowledge of the process-control algorithm that provides a basis for writing an application in controller`s programming language. This paper proposes an approach to remove all potential errors of control programs by analyzing the behavior of manufacturing devices on a shop floor. The proposed approach has been applied for real cases and the benefits are also provided.