One of the major concerns of a flexible manufacturing system (FMS) is the just-in-time production and coping up to the market demand with rapid speed and accuracy. To survive in the competent market avoidance of downtime and ramp-up time delay is very important. The control logic plays vital role in an agile manufacturing system for proper functioning of the FMS. This demands control programs to be more flexible and reusable. These days consumer product life cycles are constantly shortening consequently, the introduction of new products into FMS becomes more frequent. As programmable logic controllers (PLCs) control most of the automation section, designing new PLC program and implementing for new product production will effect on performance of FMS. In addition, modern manufacturing units are becoming more complex and safety critical. There is a need of method to validate PLC program without causing any interruption in system i.e. avoiding downtime and ramp-up time. In this thesis, we present XML based generic model formalized by finite state machine extended with time for the offline validation. Offline validation of PLC program is a method to detect error in PLC program before implementing in a real system to prevent hazardous accident and to avoid downtime and ramp-up time. The generic model mimics the dynamic behavior of devices in a work cell and provides real system like environment to PLC programmer for validation. To emulate the system behavior, IGRIP digital manufacturing package and XML based generic model simulator are used. It will be a complementary approach for offline validation of the PLC program.