Automating a Festo Manufacturing Machine with an Allen-

Corresponding Author: Praneel Chand Centre for Engineering and Industrial Design, Waikato Institute of Technology, Hamilton, New Zealand Email: praneelchand10@yahoo.co.nz Abstract: Industry equipment such as machinery utilising Programmable Logic Controllers (PLCs) become outdated and obsolete over time. Support for older machines and controllers becomes limited and they become incompatible with new computer operating systems. In the end, they are no longer used by industry. However, obsolete machines can be refurbished and used for teaching or demonstration purposes. Hence, this study presents the reconditioning of a Festo manufacturing machine by replacing the old Festo PLC with an Allen-Bradley PLC so that it’s compatible with the miniindustrial network in the mechatronics lab. The machine is a Festo MPS storage and retrieval station featuring three axis electromechanical gantries, a gripper, DC motors with encoder feedback, reed switches and a pneumatic actuator. The I/O connections from these components to the old PLC is traced and a new interface to the Allen-Bradley PLC is established while keeping connectivity with the old Festo PLC for legacy control. This upgrade allows the machine to be used for student training in the automation courses. It also leaves an option for utilising the old Festo PLC if needed. A sample program has been developed to test and verify correct interfacing and operation of the Allen-Bradley PLC and Festo storage and retrieval station.


Introduction
Advances in technology to improve manufacturing and production eventually leads to industrial equipment becoming obsolete. In areas such as manufacturing and automation, advances can be due to changes in the software and hardware components of intelligent control systems (Chen et al., 2020) (Li et al., 2016) (Pini et al., 2019). The advances could also be due to changes in the physical set up of manufacturing processes and systems (Hagel et al., 2015). Two effects of these advances are:  Old controllers with programs that can no longer be updated or edited. This is mainly due to the programming software being incompatible with newer computer systems. In such cases, the old controller is replaced with an equivalent new controller that can carry out the functions of the process. The older controllers essentially become ewaste that needs to be recycled in an environmentally responsible manner (Recycle, 2021)  Old hardware associated with manufacturing processes that must be changed due to failure or factory upgrade. The new hardware upgrades are intended to improve the efficiency and reliability of the processes and systems. This can result in machinery waste that needs to be disposed or recycled (Machinery, 2019) Old industrial machinery can relatively easily be overhauled and parts can be reused for other purposes. On the other hand, e-waste such as controllers have limited parts reusability. However, they can be connected to legacy computer systems for demonstrating industrial systems. Moreover, both machinery and controllers could be repurposed for training or for other applications where efficiency may not be critical.
Engineering education relies on laboratory equipment for the development of practical skills. This is important for developing work ready skills through assessments such as projects and labs (Chand et al., 2021a) (Dean et al., 2020) (Jollands, 2016). Because equipment for engineering laboratories is expensive, innovative solutions are needed to produce cost-effective solutions.
One approach is to make use of old automation systems by refurbishing the old industrial machinery with newer controllers. An automation system for PLC programming projects that combines a Festo sorting machine with a Schneider M221 PLC is presented in (Chand et al., 2021b). The Festo sorting machine was part of an older manufacturing system that previously utilized Festo PLCs.
Refurbishing machines and integrating PLCs to improve productivity in the automation sector in a cost-effective manner is discussed in (Deep and Bainoor, 2015) (Sukanya and Kishorini, 2020). A case study involving refurbishing an old filament coil machine with a new PLC for automatic control is presented in (Deep and Bainoor, 2015). Several factors are considered such as checking functionality of the existing machine, designing control circuits for automation, building the control panel and developing a control program using PLC software. Similarly, the retrofitting and automation of a milling and drilling machine using a PLC is described in (Sukanya and Kishorini, 2020).
Older manual machines such as jig borers can also be automated. An automatic positioner implemented via a relay logic control box has been added to a manual jig borer in (Zelinski, 2017). The positioner synchronises material feed with the motion of the non-CNC machine's air cylinder. This brings efficiency to secondary operations since the operator can walk away and leave the machine running.
Wellington Institute of Technology (Weltec) delivers automation courses with practical projects. The main purpose of the course is to learn modern automation systems and practice used in industry. Some of these projects include traffic light systems and a stamping press machine. The projects are intended to develop skills in programming and operating industrial networks and applying SCADA/HMI software packages. Students can benefit from developing skills via more hardware projects.
In this respect, Weltec has a collection old Festo automation equipment based on the MPS 500 system (Schober, 2012). The Festo PLCs in this equipment are outdated and are programmed using Windows XP. While being outdated, the PLCs have been used for supplementary control in robotics courses. However, the automation course relies on newer modern PLCs that are utilised in local industry such as Allen-Bradley PLCs which are programmed with RS Logix 5000 or Studio 5000 (Romanov, 2021).
Hence, this study presents a solution for integrating an Allen-Bradley PLC with the Automatic Storage/Retrieval System (AS-RS) of the Festo MPS 500 system. This upgrade will allow the old Festo machine to abe used for student training in automation courses.

Overview of the Design Process and Proposed Solution
The major steps followed to achieve a functional system that combines the automatic storage/retrieval station and the Allen-Bradley PLC are as follows:  A review of the user manuals for the automatic storage/retrieval station and the Allen-Bradley PLC to understand the intended operation of the machine and PLC compatibility  Inspection and testing of the automatic storage/retrieval station. This involved a visual inspection of the machine components and wiring. The station was then powered up and the movement of actuators and sensor responses were tested via the manual mode remote control. Any faulty or defective parts were replaced  Inspection and testing of Allen-Bradley PLC. This involved a visual inspection, followed by a poweredon test. The PLC was connected to the mini-industrial network and basic programs were created to check the input/output functionality of the PLC  Integrating the Allen-Bradley PLC to the station while keeping connectivity with the old Festo PLC for legacy control  Developing PLC test programs using RS Logix 5000 to demonstrate functionality. The programming languages used are Ladder Diagram (LD), Sequential Function Chart (SFC) and Structured Text (ST) A block diagram of the proposed solution is shown in Fig. 1.

Festo MPS 500 System and Automatic Storage/Retrieval Station Operation
The Festo MPS 500 system is a multi-configuration expandable system that comprises several individual stations. As shown in Fig. 2, work pieces circulate via a central conveyor belt system (G). In the complete system that utilises all stations, the operation is as follows:  Work pieces enter the system via a distribution station (A)  The testing station (B) checks the state of the work pieces and removes any faulty pieces. Acceptable pieces re-enter the central conveyor belt system  Next, the processing station (C), a loaded PIC-alfa station, processes the work piece and returns it to the central conveyor belt  Following processing, work pieces are tested for shape tolerance in the vision station (D)  After being returned to the central conveyor, the work pieces enter the automatic storage/retrieval station (E). Work pieces are stored and, on demand, are returned to the central conveyor belt system  The final station is the sorting/commissioning station (F). Work pieces are sorted based on colour and a certain number of them are released for commissioning Each station has its own PLC for distributed control. The modular Festo PLC system is based on the IPC FEC standard for industrial use (Ebel et al., 2005). Standard 24 V DC is used by the PLC for input/output circuits. The specific model used on the MPS 500 stations is FC640 and it has 32 digital inputs and 16 digital outputs. The FC640 is programmed using FST software that runs on Windows XP.
Since the PLCs and programming software are outdated, the system has been split up into individual machines/stations. Some of these stations (e.g., A, B, D, F) have been used in different courses or for final year student project work. The automatic storage/retrieval system had not been utilised for several years. The state of the decoupled machine is illustrated in Fig. 3.
The purpose of the automatic storage/retrieval station is to store, retrieve and relocate work pieces. Electric motors (24 V DC) control movement in the x-axis and zaxis. Pneumatic cylinders control movement in the y-axis and the gripper. The station can be controlled as a separate unit via the control panel at the front of the station.
A separate wired remote-control unit can be connected to the station for sending input/output commands in manual mode. This remote control, shown in Fig. 4, was used to verify that components of the station were in good working condition.

Allen-Bradley PLC System
Weltec has a mini-industrial network setup for the automation course in the mechatronics lab. It consists of a network switch, five Windows PC's with Rockwell PLC programming software suite installed, four Allen-Bradley 1769-L23E-QBFC1B Compact Logix PLCs and two machines with ethernet I/P point I/O modules. A separate Allen-Bradley 1769-L32E Compact Logix PLC (Automation, 2013) was found unused in a lab storage room. This PLC was not associated with any specific hardware so it was selected for use. It also belongs to the same series as the other four PLCs so it is compatible with the existing industrial network. Figure 5 shows the PLC which has an analogue I/O card with 4 outputs and 2 inputs, a digital input card with 16 inputs and a digital output card with 16 outputs. There are sufficient I/O terminals to connect the automatic storage/retrieval system.

Interfacing the Allen-Bradley PLC to the Automatic Storage/Retrieval Station
The existing connection between the Festo FC640 PLC and station I/O hardware terminals was investigated. Three cables connect the PLC with the control panel ( Fig. 6(a)), main station terminal (Fig. 6(b) and motor terminal (Fig.  6(c)). Connection to the control panel is achieved via a standard Festo syslink cable (IEEE 488 24-pin) with pins for the control switches, lamps and power (Table  1). Similarly, connection to the main station terminal is achieved via another standard Festo syslink cable with wires for 8 digital inputs, 8 digital outputs, 24 V DC power and ground (Table 2). A separate Festo syslink cable with a 9-pin RS-232 plug at one end connects to the motor terminal for motor power supply and encoder feedback (Table 3). Figure 7, the Allen-Bradley PLC is enclosed in an ABS plastic case with pre-wired banana socket ports for input/output connections. Based on the three station hardware I/O terminals, 24 connections are needed from the Allen-Bradley PLC to the automatic storage/retrieval station. Hence, the simple approach of replacing one end of spare Festo syslink cables (IEEE 488 24-pin) with banana plugs was taken. Each plug was carefully labelled based on the colour-coded wiring inside the cable.

Basic Control Program Design/Development
The main flowchart for automatic control is shown in Fig. 8. The station is initialised and moves to a default initial position when powered on. The operation sequence then runs for a specified number of cycles depending on the states of the Stop, Start and Reset buttons.
One of the goals of the refurbished system is for students to develop skills in programming and operating industrial networks and apply SCADA/HMI software packages. Hence, the basic control system is programmed with a variety of PLC programming languages such as ladder logic, sequential function charts and structured text.
A typical operation sequence is as follows:  A work piece arrives via a carrier in front of the station  The gripper grasps the work piece from the arrival location  The work piece is moved to the first unoccupied place in the storage shelves (filling the shelves from left to right and bottom to top)  The gripper moves back to the arrival location and waits for another work piece More details about the program are included in the results section.

Station Hardware Test: I/O Connections and Component Testing
The station hardware functionality has been tested with the manual wired remote-control unit. Test results are shown in Table 4. The control lines, actuators and sensors are all functional.

I/O Connections to Allen-Bradley PLC and Testing
The final I/O connections between the Festo hardware and the Allen-Bradley PLC are shown in Table 5. The table also lists the corresponding tags and memory allocations used in RS Logix 5000 software. Fig. 9 shows the banana plug connections from the Festo syslink cables to the Allen-Bradley PLC.
The motor encoder feedback was tested via an oscilloscope for PLC input programming suitability (Fig. 10). The DC motor encoder pulse frequency operates at 1.5-1.7 kHz in fast move and 110-150 Hz in slow move. Unfortunately, the signal frequencies are too high for the PLC digital inputs which can only detect up to 62.5 Hz. A separate high-speed counter module is needed to detect the encoder inputs. To keep the refurbishing costs to a minimum, a workaround using a timer has been implemented. This study appropriately since the speed regulator of the motor functions adequately with the low weight of the work pieces. Figure 11 shows the sample structured text code to select the x and z axes target locations based on timer preset values.

PLC Program and Operation
RSLogix 5000 from the Rockwell Automation software suite has been used to program the Allen-Bradley PLC. The configuration of the PLC is shown in The PLC program branches from a main routine into several sub-routines as shown in Fig. 13. The flowchart of the main routine which comprises the operation sequence and reset operation is as shown in Fig. 8. A flowchart illustrating the connection of the main steps of the operation sequence is shown in Fig. 14. A video demonstration of the Festo automatic storage/retrieval station being controlled by the Allen-Bradley PLC is available here. The demonstration shows that the implemented system can successfully grasp work pieces from an initial position and place them in target locations.     Fig. 11: Selecting x and z axes targets using timers

Conclusion
This study has presented a solution for integrating and automating an old Festo automatic storage/retrieval station with a newer PLC. The old Festo FC640 PLC, with an outdated Windows XP based programming software suite, has been successfully replaced with a more popular New Zealand industry used Allen-Bradley Compact Logix PLC. The I/O connections between the machine and old PLC have been successfully traced and a new connection with the Allen-Bradley PLC has been established. This enables the Festo machine to be used for projects in automation courses. The sample automatic program demonstrates that the system is functional and operates correctly.
Future improvements to the system will include the acquisition and integration of a high-speed counter module so that encoder feedback can be used for position control instead of relying on timer control. In addition to this, Human Machine Interface (HMI) control can be implemented with Rockwell's Factory Talk View to remotely control and monitor the system. With additional remote I/O modules it is possible to integrate other old and idle Festo stations into a larger, more complex control system.