Automation Storage System Based on SCADA using PLC CP1H and CP1L

—The warehousing system is a means of supporting production activities and industrial operations that function to store goods to be distributed, which are still using a manual system and must adapt to technological developments. The problem that often arises in the warehousing system that is still done manually is that the flow of goods into the warehouse is not well organized, and this makes it difficult when the goods are about to be removed, so it requires a longer search time. Previous research has shown actual data on storage racks that use Arduino Mega as a controller and VB as an interface, but there is no actual data on the state of the lifter or the selection of lifter movement speed modes to facilitate operators in monitoring and operating goods storage. Control systems with industry standards greatly affect the effectiveness and optimization of the production process. Based on these problems, this research aims to simplify the managerial and monitoring process in the warehouse with a prototype of automatic multilevel storage using PLC CP1H and CP1L as system control and Wonderware Intouch as an interface with the SCADA system. The prototype has 12 cells, and each cell can accommodate 2 boxes; each cell is distinguished by the height and color of the box. In testing this research, the SCADA system can work optimally. The interface is capable of displaying the actual data of the rack with a success rate of 100%, the hardware error rate is less than 1%, and the interface can display the actual data on the state of the lifter.

manufactured goods will be grouped based on the same type of material or goods. These products are then stacked using pallets, or stored in boxes [6]. Usually, product boxes are distinguished by being marked such as color or other codes that can distinguish objects [7], [8]. Boxes that have the same identity indicate that these boxes have the same type of material. In addition, so that the warehouse area can be utilized more optimally, the storage system is made vertically in the form of shelves, so that the storage capacity increases up to 3 times for the same area [9].
Along with the times, the application of SCADAbased automation technology is needed in the warehousing system to monitor and control the warehouse [10], as well as being able to acquire data contained in the warehouse and make the process of storing and retrieving products run more easily and regularly compared to being done manually. Storage and retrieval of products that are carried out automatically are more consistent, not much influenced by external factors and have a high level of accuracy [11]. Storage of goods in warehouses that are still manual with the help of a lifting machine also has a high risk of damage due to equipment accidents, for example, such as tools that hit storage shelves or work accidents due to human negligence [12].
In a previous study conducted in 2019 discussed a multilevel shelf storage system [13], using an Arduino Mega-based lifter [14]. The detection of goods in this study uses a color sensor and infrared as an object height detector where each shelf can only be filled with the same product. The interface used is labVIEW which is used to provide information to the user and calibrate the color sensor [6]. Then the development was continued in 2020 with the addition of system functionality and fixing the weaknesses in the use of the components used, where the storage process can be done automatically or manually [15]. Automatic storage uses 2 sensors that become classifiers, namely the TCS34725 sensor as a color classifier and an infrared obstacle sensor as a height sensor where each object can be filled with the same two products [16]. Previous studies have shown actual data on storage racks which use Arduino Mega as a [1], but there is no actual data from the state of the Lifter to make it easier for operators to monitor and operate goods storage [8]. Control systems with industrial standards greatly affect the effectiveness and optimization of the production process [12]. Based on the description that has been explained, it is necessary to create a system to facilitate the managerial and monitoring processes in the [16], with a prototype of an automatic multilevel storage area using [15] and [13] as an interface with the SCADA system [17].

II. research Methods
The implementation method used in this research is based on VDI 2206 including Products Requirements, System design, Domain specific design, System Integration, Verification/validation, modeling and model analysis, and Product/Unit [18], [19].

A. System Overview
The implementation of SCADA in this system uses a computer to display the status of sensors or actuators on a plant, display it in graphic form, store it in a database, and even display it on an interface. This SCADA system consists of a number of RTUs that collect data and send it back to the master station via the communication system. The master station displays the received data and allows the operator to perform remote control. The RTU provides interfaces for digital and analog sensors at each location. The communication system provides a path for communication between the master station and the site.
In this research, the system is divided into 3 parts, namely lifter, rack, and initial position. Inputs that function to detect and identify objects, namely color sensors, infrared, and limit switches are placed in the initial position. Infrared sensors are mounted vertically to be able to read the height of the product. The color sensor is placed on the shelf facing the lifter to be able to read incoming objects. The limit switch is placed at the bottom of the cell so that it can accept the load from the product. Then, the shelf is also stored limit switches in each cell to provide information whether the shelf is filled or not. In the lifter there is only a stepper motor to drive the x, y, and z axes. Figure 1 shows the system will start when the limit switch detects an object. After the object is detected, the next step is to identify the height of the object by the infrared sensor. Followed by identifying the color of objects using the TCS34725 color sensor. After the identification of the object is complete, the system will immediately scan the shelf. When the desired shelf has not been filled, the storage process will continue, while when the intended shelf is filled there will be a warning on the interface and the storage process will end. And finally, the lifter will return to its original position. the system starts by reading whether or not the product is in the initial position to start the system using the limit switch sensor. Once the product is detected, the sensor reads the color and size of the product to determine where to place the product using the infrared sensor and the TCS34725 color sensor. This system uses 3 infrared sensors, each of which can detect objects with a height of 6cm, 9cm, and 12cm. After the box is detected and has entered its classification, the PLC will regulate the movement to be carried out by the stepper motor and the motor will move according to the intended rack. The system is equipped with an interface on a laptop so that users can see the number of products that have been stored and their location directly, namely by Wonderware Intouch software and communication between the PLC and the interface using Kepware software via Ethernet. The interface provides a list of incoming goods data so that users can see through the computer what items are available on the storage rack. Figure 2 shows that the planning of the mechanical domain is divided into 2 parts, namely the shelf as a place for receiving and storing goods and the elevator as an introduction or mover. The mechanical system in the lift consists of three stepper motors on each X, Y and Z axes. Pulleys and belts are used to support movement on the X and Y axes, as well as leadscrew and axles for the Z axis. [1]

C. Electrical Design
The electrical domain section contains the electrical design of the drive circuit and sensor circuit. This electrical circuit connects the controller, stepper motor, stepper motor drive, color sensor, infrared sensor, and limit switch on lift and rack devices.
In Figure 3, the Electrical Circuit of the Power supply System and the step down shows a series of color sensors, infrared sensors. The electrical circuit on the CP1H PLC has a 220 Volt AC source with security using the MCB on the L line where the AC voltage functions to activate the 24Volt power supply. The DC voltage output on the 24Volt power supply with the on/off selector will activate the PLC as a controller for each component, as the input voltage for the stepper motor, and as the input voltage for the red, yellow and green pilot lamp indicators. Then the 24volt power supply is connected to a 5volt step down which will activate the Arduino Uno and as the input voltage for the stepper motor driver. Color settings using Arduino Uno microcontroller. Where the Arduino pin is connected to the relay and activates the PLC CP1H input pin which serves to provide color information which will then carry out the data collection process to be executed according to a predetermined program.
In Figure 4, the Electrical Circuit of Limit Switch and Stepper Motor shows a series of stepper motors, stepper motors, and limit switches at zero position. The sensor circuit on the rack shows a series of sensors using a limit switch on the rack which functions to inform the 24 number of boxes on the rack. The stepper motor driver used in this  plant is TB6560 where the stepper motor driver uses 5v power input and 24v output to run the HS4401 stepper motor. The green pilot lamp indicates that the storage process is in progress, the yellow pilot lamp is active if the reset process is in progress, and the red pilot lamp is activated when the emergency button is pressed. Figure 5 shows the electrical circuit on the CP1L PLC with a 220 Volt AC source with security using the MCB on the L and N lines where the AC voltage functions to activate the CP1L PLC and 24Volt power supply. The DC voltage output on the 24Volt power supply will activate the I/O PLC as used for object detection/sensor limit switches which will then send information to the interface for processing.

D. Informatics Design
In informatics design, the system will be designed using PLC as a controller. Programming is done using PLC CP1H and CP1L. 1

. Interface design: This research warehouse uses
Wonderware Intouch software with Kepware software. The interface will have several functions, namely: 2. The security password section: which has the function of managing users who are allowed to use the Intouch application. 3. Alarm section: which functions to display actual data from plant conditions. 4. The indicator section: serves to display the classification result data from the sensor. 5. Control section: which serves to provide manual selection to controllers. 6. Lifter movement section: which serves to display the condition of the lifter movement. 7. And the last is the database: which has a function to record data so that data can be stored.

III. result and dIscuss
A. Implementation of Informatics Domain.
The flow chart that has been made in the design of the informatics domain is made into a program using PLC CP1H X40 DT-D and PLC CP1L. The program created aims to produce a system according to needs. Figures 6 shows the Ladder diagram programming in this study using CX-Programmer. As shown in Figure  7 shows the rack condition of the limit switch sensor by PLC CP1H. Where when channel 0.10 (12 cm green object) for object 1 is active and channel 0.11 (12 cm green object) for object 2 is active, channel w3.12 as a full shelf reading indicator (warning) will be active and will provide information to the interface as well as information for the PLC if there is a reading of the same object will be processed then the process will not continue. Figures 7 shows the stepper motor clockwise or counter clockwise with a certain pulse through the stepper motor driver, use the PLS2(887) command on the cx programmer. Where as shown in Figure 15 there is a port specifier for the pulse output address on the PLC (at each PLS2(887) pulse output address there are two PLC pins that will be connected to the stepper motor driver and each pin can be seen in the PLC datasheet and adjusted as needed). Control data is to determine the rotation and type of pulse used in the stepper motor (CW or CCW mode selection), the first parameter word is the setting table for the pulse used, and the first start frequency word is for the frequency used. The memory/setting table data used in this system can be seen in the appendix.

B. TCS34725 Sensor Testing
The TCS34725 color sensor test can be seen in Table 1.
From Table 1, it can be concluded that the value produced by the TCS34725 color sensor is very stable. In the Red, Green and Yellow color table there is no change in the output value of the TCS34725 color sensor in 5 experiments. While the blue table shows a slight change in the output value that is not too high from the sensor.

C. Infrared Sensor Testing
Testing 3 infrared sensors that have been arranged vertically with a distance of 3 cm to detect the height of objects, namely 6 cm, 9 cm and 12 cm.
Based on the data from Table 5, the results of testing the infrared sensor as an altitude sensor were successful with an error value of 0%. There is no such error because each sensor does not collide with each other or be blocked by other objects.

D. Stepper Motor Testing
Testing on the stepper motor is carried out by measuring the displacement of the lifter from the initial position. Measurement of lifter displacement using a steel ruler. The stepper motor testing itself is divided into 3 parts, namely: X Axis Stepper Motor Testing, Y Axis Stepper Motor Testing, and Z Axis Stepper Motor Testing, where each section has its own distance.

X -axis Stepper Motor Testing
From Table 3, by giving 19,550 pulses of pulses for the X-axis stepper motor position which is 29 cm from the motor's initial position, the measurement results from the steel bar show the same results, which are 29 cm and produce an error of 0%.

Z.-axis Stepper Motor Testing
Based on the test in Table 4, there were 5 experiments of which 4 were measured by a steel rule of 15 cm and 1 experiment was 15.1 cm. This is due to the mechanics of the tool and makes an error of 0.132%.

Y.-axis Stepper Motor Testing
From the test results in Table 5, by giving a pulse of 1.250 pulses for the position of the z-axis stepper motor which is 15cm from the initial position of the motor, it can be concluded that the measurement results by the steel ruler are the same as the calculation results. It makes no errors or in other words, an error value of 0%.

E. Automatic Selection Testing
In this section, data from automatic delivery will be   displayed, in which the rack selection will be carried outby infrared sensors and color sensors as classifiers. It can be seen from the results of the shipping test in Table 6, the success of shipping on 9 shelves (5 columns of storage racks) reaches 100%. These results are due to the accurate identification of objects by infrared sensors and color sensors. The automatic selection test was successfully carried out on 5 rack columns from 12 storage rack columns, so that the automatic delivery success rate for the entire rack column was 41.6%.

F. Manual Selection Testing
In this section, the delivery process will be managed by the operator's command through the interface by pressing the rack button to be selected. In manual selection delivery, the sensor used is only a limit switch sensor which functions as a detector for the presence or absence of a box. While the 2 classifier sensors, namely infrared sensors and color sensors are not used.
Judging from Table 7, manual testing was carried out for all available shelves, namely red object shelves, green object shelves, blue object shelves and yellow objects shelves. Where the results of the execution of objects that have been processed are in accordance with the results of the identification of objects. the success of sending objects by manual command from the interface reaches 100%. The data above also shows that the communication between the interface and the controller is running well. Figure 8 shows the display of the actual data on the condition of the rack as seen on the interface shown in the image. From Figure 8, it can be seen that the shelves in the column (red 6cm, red 12cm, green 9cm, green 12cm, blue 9cm, blue 12cm, yellow 6cm, yellow 9cm) are fully filled and the condition of the shelves displayed on the interface is the number of boxes and notifications. full, the shelf in the red column is 9cm, there are no objects/boxes and the condition of the shelves displayed on the interface is a save notification, the shelves in the column (green 6cm, blue 6cm, yellow 12cm) have been filled with 1 object/box and the condition of the shelves displayed on the interface is the number of boxes.

G. Shelf Condition Testing
From the above categories, the save condition indicates that the shelf is empty and the full condition indicates that the shelf is full. Then it can be concluded that the actual conditions on the shelves can be displayed on the actual interface. This data is obtained based on information from the limit switches on the rack.
In Table 8 the shelf condition test shows the readings on the HMI that have been made where the condition when 6cm Blue objects (M6.1 and M6.2) are placed on the shelf, the HMI shows the reading conditions on the column of the object's shelf. Likewise, when objects are Yellow, Blue and Green with their respective heights, HMI reads the state of the shelves on these objects. However, of the 24 available shelves, there are 2 shelves that are not legible by HMI, namely the 9cm Red shelf (M9.1) and the 12cm Yellow shelf (K12.2). So that the reading error is 0.083 % with a success rate of 91.6%.

H. Warning Test
The warning display test aims to determine the success of the system in detecting problems, namely when the rack is full and the operator tries to insert the same object. Objects that have been stored in the initial position will not be processed and a warning will appear on the interface.
In Figure 9, the actual condition of the shelf when  it is full, it can be seen that the red 6cm, red 12cm, red 9cm, green 9cm, green 12cm, yellow 6cm and 9cm yellow shelves are full (filled with 2 boxes for each shelf). Then in the initial position, a 12cm green object is placed to be put back into the shelf, then in Figure 10, a warning will appear and alert the user that the shelf for the detected object is currently full. Then, the product will not be processed.

I. Real time Testing on Interface
This test aims to determine the success of the system in displaying conditions in real time on the interface with the processes that occur at the plant. Figure 11 shows the current state of the lifter movement, where the detected object is a 12cm blue object then the lifter will execute the object to the shelf to be addressed according to the detection results and according to availability on the storage rack. On the interface, every stepper motor movement appears, where the lifter consists of 3 stepper motors, namely the x-axis stepper motor, the y-axis stepper motor and the z-axis stepper motor. The movement of each stepper motor can be seen directly on the interface.

J. Alarm Testing
Alarm testing aims to record normal and abnormal conditions in the current condition of the plant process.
In the alarm window display in Figure 12, there are several data displayed, namely date, time, state, name, value, provider, priority and group as notification of conditions to the user. As shown in Figure 48 shows the abnormal reading of the shelf condition. Where on shelf B9 (Blue 9 cm) is fully filled which then appears in the alarm window with the name ACKB9 and the UNACK state, which means that the alarm condition is not yet known by the user. Then after the ACK button on the alarm window is pressed, the condition of the alarm changes from UNACK to ACK which indicates that the alarm condition on the rack has been known by the user.

IV. conclusIon
Based on the tests carried out on the system that has been built, the interface system is capable of giving commands for manual selection by using Wonderware Intouch. The use of infrared sensors as the box-size detector can function properly without any obstacles. The lifter can move in the direction of the X, Y, and Z axes and has a very small error value of less than 1%. Errors that occur in HMI readings are caused by a disconnected electrical circuit in the PLC and limit switch. Automatic color and height-based goods storage system with SCADA-based PLC CP1H and CP1L.