# The Vision-Based Data Reader in IoT System for Smart Factory
## 2 Materials and Methods  
### Problem Definition  
This research was performed on a real case about production process improvement in a plastic cutting board factory by IoT technologies. The photo of machines in the factory is shown in Figure 1. There are four types of plastic injection molding machines, including horizontal injection molding, vertical injection molding, the robot servo motor is driven, and swing-arm robot. They are responsible for the production of plastic cutting boards of various sizes.  
Additionally, each of those machines has at least three versions in the development process of the factory, such that it makes the corresponding Programmable Logic Controller (PLC) panel almost totally different, and the control systems are all stand-alone. Through the study in a small sized plastic injection factory, many control panel or PLC panels of those machines are stand alone and one cannot apply the existing communication interface to them directly. If someone disassembled the machine and installed the communication interface by himself, it would violate the warranty of the machine. This will not be acceptable to the factory. Therefore, it is difficult to monitor those machines using the general IoT technology. It results in great difficulty for the existing IoT deployment to monitor those machines. Under the cost consideration, the proposed lightweight system applied digit recognition to replace direct smart instrumentations that can measure and send the measurement directly to the PLC. Some PLC panels are shown in Figure 2.  
The current major production item of the factory in this study was a plastic cutting board. Figure 3 shows the temperature mapping picture corresponding to the production process. It includes six steps: (1) pellet input, (2) front-end processing, (3) mid-stage processing, (4) back-end processing, (5) nozzle injecting, and (6) molding. The line segments represent the ideal temperature setting at a different step. Melting plastic materials at high temperatures and injecting them into the mold is the basic process for producing a plastic cutting board. Processing time and temperature are important factors for production performance. The flow rate of the plastic material into the machine can be adjusted directly  
Figure 1: Injection Molding Machine.  
Figure 2: The operation control panel.  
by the PLC parameters setting but temperature control depends on the water-based cooling system which can only be adjusted manually by experienced operators. If the temperature is too high, PLC gives the alarm and stops the working process to prevent faulty products. The operator then increases the cooling water and waits for a suitable temperature to restart the process. The \(y\)-axis is just a concept showing the difference of temperature among different steps of the production process. But the exact temperature will be changed for different products such that there is no point label in the \(y\)-axis.  
The parameter setting on PLC of plastic injection generally depends on five main conditions: temperature, pressure, speed, time, and measurement. Each of them shows the current condition of the machine by numbers on the monitor screen of the control panel. According to digit detection and recognition, the current parameters can be obtained from images of the screen, such that the IoT system can control the entire process of production automatically. For example, if the temperature of the mold is too high, it may produce defective products. At this moment, the system should try to cool down the mold immediately. The IoT system may decrease the temperature by increasing the velocity of cooling water in the system.