## 1 Introduction
Materials can be transported across the factory floor using obstacle avoiding AIVs, coordinating with fleet mates, and pinpointing where pickups and drop-offs are needed. The above discussion helps the reader to understand that the Industry 4.0 vision of _'smart factory'_ is not possible without the deployment of a MES and AIVs. As mentioned earlier, this work focuses on the integration of an MES and AIV (as shown in Figure 2), which is necessary to build a fully connected, automated smart manufacturing environment. The Robot Operating System (ROS) is an open-source platform which consists of a set of software libraries and tools that help to build robot applications. To integrate an MES with an AIV, a middleware is needed to perform the command translations in order for the MES and ROS-based AIV to communicate. Here, a LabVIEW-based scheduler is developed as the middleware. LabVIEW communicates with the MES through webservices and also has support for ROS. The scheduler development is divided into three main parts for: (a) LabVIEW-MES communication, (b) LabVIEW-AIV communication, and (c) the Main scheduler. In part (a), the scheduler imports MES webservices and generate equivalent LabVIEW VIs. The generated LabVIEW VIs are edited and configured using the.NET functions of LabVIEW. In part (b), the scheduler uses the LabVIEW add-on _'ROS for LabVIEW'_ to establish communication with an AIV. Part (c) consists of one complete cycle of scheduler operation, which involves eight steps. These eight steps include checking of pickup locations status, selection of one pickup location, pick the product, confirm to the MES about completion of pickup operation, checking of drop-off locations status, selection of one drop-off location, drop the product, and confirm to the MES about the completion of the drop-off operation. The scheduler was tested in two phases, initially, the Turtlebot-3 (burger model) [14] robot was used for testing during scheduler development and finally, the scheduler was commissioned using the Robotnik _'RB-1'_[15] robot in a real factory environment. The scheduler supports three pickup and three drop-off locations. The pickup and drop-off locations are selected based on predefined priority rules. The developed scheduler interface is user friendly and can be easily used by a non-technical operator and it supports data logging (of each step of scheduler operation), as well as displays a live log of operation. Figure 3 below shows the overall architecture of the designed system. As mentioned previously, the scheduler is designed to sit as middleware between the MES and the AIV. Its function is to perform  
Figure 2: Proposed Manufacturing Execution System (MES) and Autonomous Intelligent Vehicle (AIV) integration. command/feedback conversions so that the MES can communicate with the AIV. Figure 3 describes at a high level, the system, and its method of operation. More in-depth and detailed information on the method of operation can be found in Section 3. The system is developed around the Scheduler, which acts as the conversion tool for all communication between the MES and AIV. At the top level, resides the MES, the brain of the factory. The communication between SAP MES and production equipment is provided by the Equipment Connector (ECo). This simplifies the interface of production equipment to an MES. The ECo is used in the standard SAP retweaver environment and uses the retweaver stack features like deployment, monitoring, logging, and internal database. The ECo communicates through webservices with the MES. For the integration of production equipment which does not have a webservice interface, an Equipment Protocol Adapter (EPA) is used, which translates the equipment specific protocol (e.g., XML, SPS, file transfer) to the ECo webservices. Here, the scheduler-MES and scheduler-AIV communication are in real-time; therefore, if something goes wrong during scheduler operation, then the scheduler will detect it at run-time and will indicate the error using flag indicators on the front-panel of the scheduler.