## 1 Introduction  
Validation activities are a critical stage of the equipment design process for medical devices and pharmaceutical manufacturers, enabling them to provide documentary evidence that the equipment is performing as per specification and ensuring consistent product quality is maintained at all times [1]. As industry transitions from the third to the fourth industrial revolution, new approaches to equipment and process validation will be required to enable the adoption of Industry 4.0 technologies [2]. The Industry 4.0 concept has been described as the utilisation of digital technologies to transform manufacturing facilities into Smart Factories [3]. This transformation is being driven by an increased customer demand for personalised products, leading many manufacturers to shift from mass production of their products and to begin to implement mass customisation strategies to satisfy this demand [4]. One strategy to enable mass customisation is the development of flexible manufacturing systems which can be rapidly modified to account for changes to product configuration,parts availability and variations in order levels [5]. Manufacturers are attempting to achieve this flexibility using reconfigurable manufacturing equipment and system control software [6]; however, the implementation of Industry 4.0 practices has led to an increase in equipment complexity and an increasing percentage of the equipment functionality being achieved via software configuration [7]. Consequently, the control software for manufacturing equipment must be continuously updated to accommodate modified or new functionalities [8]. This leads to a requirement to re-test existing equipment to ensure that the modified functionalities do not negatively impact product quality. However, with equipment availability being a key element of maintaining a profitable manufacturing enterprise [9], the requirement to regularly stop production for days, or even weeks, to test new equipment functionality is simply not feasible. If product manufacturers in regulated manufacturing sectors, such as medical device and pharmaceutical production, are to implement flexible manufacturing practices, an equipment validation methodology is required which enables this approach but without the requirement to stop production for testing for long periods of time. The objective of this work was to present a proof of concept, using industrially relevant tools and equipment, which demonstrates how Model-Based Design (MBD) practices can be used to enable automated validation and generation of equipment control codes for medical devices and pharmaceutical manufacturers. Currently, the validation and programming of software for Programmable Logic Controllers (PLC) in regulated manufacturing environments is a manual process. The research carried out in this paper proved that an MBD approach to equipment validation is technically feasible and enables the automatic generation of validation documentation and the associated PLC code required for the equipment to function. Adoption of this approach is expected to provide multiple benefits to manufacturers of regulated products, including shorter validation timelines, reduced validation costs, improved software quality, automated generation of validation documentation and automatic generation of the equipment's PLC code. This would enable engineers to adopt an agile approach to equipment design to create the reconfigurable manufacturing systems that are required to satisfy the mass customisation demands of Industry 4.0. Realisation of flexible manufacturing systems is a significant benefit for the medical device and pharmaceutical manufacturers as this industry is shifting towards personalised medical products based on the individual patient's unique medical requirements. This paper is structured as follows: Background information on relevant topics is presented in Section 2. Section 3 introduces the proposed methodology and describes the development of a proof-of-concept model to demonstrate the proposed methodology.