## 5 Discussion  
The shift to Industry 4.0 and flexible manufacturing systems will significantly change how equipment is designed, validated and operated in manufacturing environments. One of the major trends emerging in the medical device and pharmaceutical industries because of Industry 4.0 is personalised healthcare [55]. This promises the delivery of custom medical products based on the individual patient's condition and physiology. Although a significant research effort is being invested in the development of patient specific products, ranging from custom drug delivery solutions [56] to bespoke orthopaedic implants [57], this approach generally appears to be clinically driven and is usually only taken in exceptional circumstances where semi-urgent care is required. If personalised healthcare is to be accessible to every individual, the effects of this shift on the manufacturers of regulated products must be considered. It is expected that personalised healthcare will result in many manufactures having to embrace the \"batch of one\" concept, where each batch contains its own unique product [55; 58]. This will require manufacturers to be able to rapidly reconfigure and validate machine functions to produce patient specific products. While manufacturers in regulated industries are generally slow to adopt new manufacturing concepts and technologies, they recognise that there is a requirement for a new approach to validation to account for recent developments in Industry 4.0 [2]. If manufacturing equipment configurations are to change repeatedly to accommodate changes to the product design for customised products, there must be a method to ensure the validated state of the equipment is maintained. The current approach to validation, the GAMP 5 V model, is a rigid process which would result in equipment repeatedly being taken offline to carry out manual validation activities and is, therefore, not suitable to the proposed flexible manufacturing approaches. Additionally, the cost of repeatedly validating equipment would be prohibitive to the majority of manufacturers. The digital validation workflow presented in Figure 3 was developed with the objective of addressing these issues. With the model as the focus of all stages of the design process, engineers can continually test and validate new functions virtually before the code is generated and sent to the physical equipment. The digital validation modelling architecture described in Figure 4 was structured to minimise the amount of validation required when changes are made to the model. By separating the custom code models from the standard function blocks, a design engineer is only required to revalidate the custom code which interacts with these function blocks when a functional change is requested. In contrast to the traditional checking approaches described in [44; 45; 46], where the PLC code is written first and is then converted into a model to be analysed by a model checking tool, this paper proposes that Simulink be used to create a model of the system control logic. This model can then be used as the basis to generate test cases for validation and to generate PLC code using the built in PLC code generator. Designing the control logic in this manner eliminates any issues associated with translation between PLC code and the model. Furthermore, adoption of this approach enables testing to occur much earlier in the development cycle, resulting in the identification of errors or bugs in the control logic before the code is generated. Leveraging the automated test generation capabilities of Simulink Design Verifier in this work enabled complete coverage testing of the control logic while also eliminating the requirement to manually create test scripts to validate the system model. Combining this with the capabilities of Simulink Requirements to link model elements and requirements with their associated tests, this paper has shown that it is feasible to automatically generate documented evidence that the model performs as specified to satisfy regulatory requirements.