Journal of Fuzzy Systems and Control. Vol. No 3, 2025 ISSN: 2986-6537. DOI: 10. 59247/jfsc. High Speed Automatic Cartoning Machine Nguyen-Tuong-Quang Tran 1. Quang-Tuan-Vu Pham 2,* . Thi-Hong-Lam Le 3. Minh-Hien Cai 4. Xuan-Khai Nguyen 5. Thanh-Phuong Nguyen 6. Dinh-Nguyen Tran 7. Huu-Thinh Nguyen 8. Van-Huu-Nhan Nguyen 9. Gia-Huy Than 10 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Ho Chi Minh City (HCMC) University of Technology and Education (HCMUTE). Ho Chi Minh. Vietnam Email: 1 21151319@stduent. vn, 2 quang. 121@gmail. com, 3 22151078@student. lamlth@hcmute. vn, 5 22151102@student. vn, 6 21151152@student. 21151474@student. vn, 8 21145282@student. vn, 9 21145226@student. 21151464@student. *Corresponding Author AbstractAiHigh-speed automatic cartoning machines are increasingly used in modern manufacturing for enhanced productivity and packaging quality. This study presents the design and implementation of a compact, student-friendly, and cost-effective automatic cartoning system based on the Siemens S7-1200 PLC and advanced motion control techniques. The system includes a stepper motor-driven conveyor, an AC servo for precise positioning, and an automated glue spraying unit, all managed via TIA Portal V17. Experimental evaluation shows the prototype achieves a packaging rate of 10 boxes/min, position accuracy of A0. 4 mm, system cycle time of 2. 0 A 0. 3 s, glue application error below 1. 2%, mean error recovery time of 5 s, machine up-time of 99. 1% over 8 hours, user setup time <10 min, and energy consumption of 35W per cycle. Comparison with commercial solutions indicates comparable performance at 40% lower cost. The results confirm the effectiveness of the proposed model for education and suggest potential for further optimization in fault tolerance and mechanical robustness. The requirement of developing a cheap and easy-touse model still exists. Then, in this paper, we develop a highspeed automatic cartonizing machine to satisfy the solution of product packaging, as shown in Fig. The model of hardware is developed from a reality machine in industry due to its simplicity and popfiulation. The processing is programmed by Tia Portal V17. We utilize motion control to contact the servo amplifier and step driver. KeywordsAi Packing. Packaging Machine. Carton Packing. PLC Programming INTRODUCTION Automated packaging and cartoning processes are critical components of the modern manufacturing industry, contributing significantly to efficiency, product quality, and cost reduction . Besides using a personal computer (PC) with software as LabVIEW . , high-speed cartoning systems typically rely on advanced motion control techniques, tight integration with programmable logic controllers (PLC. , and robust mechanical designs to satisfy demanding throughput and reliability requirements. Recent research efforts have focused on improving control algorithms for servo and stepper motors, minimizing energy consumption in automation systems, and enhancing adaptability for flexible production lines . Despite these advances, currently available commercial cartoning machines tend to be costly, complex, and difficult to adapt for educational or small-scale research purposes. This lack of affordable, compact, and student-friendly models limits practical training opportunities and experimental research for engineering students and practitioners, especially in developing countries, where high-cost industrial machines are often inaccessible . However, in the condition of the laboratory, a smaller model is friendly with students, such as research in . Based on that, research and training can be applied to Fig. High Speed Automatic Cartoning Machine . II. EXPERIMENTAL MODEL The operation of the system can be described in Fig. Description of blocks in Fig. Fig. System overview a Material block: This block is fixed in position to prepare the material ready to work. Material will be filled a Pick up block: This block represents the arm with has a vacuum suction cup at the end effector to pick up the material and get it into a pre-set position on the conveyor a Conveyor bell block: Conveyor bell moves step by step. This work is licensed under a Creative Commons Attribution 4. 0 License. For more information, see https://creativecommons. org/licenses/by/4. Journal of Fuzzy Systems and Control. Vol. No 3, 2025 a Filling block: The Pneumatic cylinder automatically pulls products into the material when its position is correct. a Closing the lid: Using a mechanical structure to close the lid automatically whenever the conveyor belt moves with material crossing over it. a Spray the glue: With this machine, we use a 3D printer to make a structure that combines a step motor and a leadscrew to automatically apply glue on the lid of the We use PLC Siemens S7 Ae 1200 model CPU 1214C DC/DC/DC (Fig. combined expansion module SM 1223 DC/RLY (Fig. By using an expansion module SM 1223 DC/RLY, we have more outputs of the controller to control peripheral devices . We chose a step motor (Fig. and a servo motor (Fig. as actuators of this project. Fig. PLC Siemens S7 Ae 1200 model CPU 1214C DC/DC/DC Fig. Expansion module SM 1223 DC/RLY Fig. Step Motor Fig. AC Servo Motor Thence, the real model is created as in Fig. In Fig. we show off the department location of the system. Electrical cabinet: We use it to hold electrical devices for controlling the system. There will be buttons outside the door for easier use. On the side of the electrical cabinet are the pneumatic control valves to control the pneumatic actuators. CONTROL METHOD Motion control Motion control in SiemensAo TIA Portal is a fully integrated solution designed to automate and optimize the movement of axes and drives within industrial machinery and production systems. The TIA Portal provides a unified engineering environment that supports the entire workflowAi from hardware configuration and technology object creation to user program development, commissioning, and Users can easily configure and manage motion control applications for single axes or complex kinematics, leveraging intuitive graphical interfaces and advanced technology objects that represent real-world components like positioning or synchronous axes . Within the TIA Portal, motion control functionality is implemented by configuring technology objects, which define the properties and behavior of each axis or drive. These technology objects are controlled through standardized Motion Control instructions, which are executed in the user program and conform to PLC open standards. The system enables precise control over positioning, speed, synchronization, and even advanced features like camping and kinematics for coordinated multi-axis applications . Additionally. TIA Portal offers powerful diagnostic and optimization tools, allowing engineers to monitor performance, trace errors, and fine-tune motion sequences for maximum efficiency. Automatic data adaptation and modularization feature further simplify project management and ensure robust, error-resistant automation solutions. With its user-friendly design and comprehensive integration. TIA PortalAos motion control capabilities empower users to implement sophisticated automation strategies efficiently, even in complex industrial environments . , . With high pulse output . kHz and 20 kH. we can control the output quickly. The limitation of the frequency of pulse output is shown in Table 1. Table 1. Limit the frequency of pulse output Fig. Real model Pulse output Thence, we have: Material holding: We use mechanical structures to secure the materials. the materials are held here and waiting for pickup to be taken away. Pickup: The Arm is controlled by a servo to move in a position range and take material from the Material Holding to the conveyor belt Filling product: A Single cylinder pushes the product into the box. Spray glue: In this, the sensor signal activates when it detects a box passing by and sprays glue onto the lid. Press the lid: The Double cylinder presses the lid to bond the glue tightly together to avoid gaps in the lid when the finished product is released. Onboard Signal board DI2/DO2 x DC24V Signal board DI2/DO2 x DC24V Signal board DO4 x DC24V 200kHz Signal board DI2/DO2 x DC5V Signal board DO4 x DC5V 200kHz Limit frequencies for technology object AuAxisAy V1. 2 Hz O f O 100 kHz Limit frequencies for technology object AuAxisAy V2. 0 and higher 2 Hz O f O 100 kHz 2 Hz O f O 20 kHz 2 Hz O f O 20 kHz 2 Hz O f O 100 kHz 2 Hz O f O 200 kHz 2 Hz O f O 100 kHz 2 Hz O f O 200 kHz 2 Hz O f O 100 kHz 2 Hz O f O 200 kHz 2 Hz O f O 100 kHz 2 Hz O f O 200 kHz Motor position is determined by the number of input pulses, with the position yuE given by . Nguyen-Tuong-Quang Tran. High Speed Automatic Cartoning Machine Journal of Fuzzy Systems and Control. Vol. No 3, 2025 ycAycyycycoycyce yuE= O 360A ycA ycyceyc where ycAycyycycoycyce is pulse count, ycA ycyceyc is the pulse/rev parameter of the selected motor . The sequence control is performed using TIA Portal V17, implementing a finite state machine (FSM) logic for system robustness and fault recovery. The glue sprayer is triggered by box detection sensors, and the duration is adjusted via pulse-width modulation for precision. To guarantee stable and safe operation of the arm segment, it is essential to calculate the required output torque that the motor-gearbox assembly must deliver. The torque T needed to hold the arm horizontally is derived from the following equation . ycN = ya. ycc = . where: m is the mass of the arm segment . 5 k. , g is the acceleration due to gravity . 8 m/s. , d is the perpendicular distance from the rotation axis to the segmentAos center of mass . Substituting the values, the torque required becomes: ycN = 0. 5 y 9. 81 y 0. 25 = 1. 226 ycAyco Considering the 1:10 reduction gearbox attached to the 100 W servo motor . ominal output torque ycNycoycuycycuyc = 32 ycAyc. , the post-gearbox output torque is calculated in . ycNycuycyc = ycNycoycuycycuyc y yayceycayc ycIycaycycnycu We chose a gear ratio is 10, which can make the output value exceed the minimum required holding torque, ensuring the actuator assembly operates with sufficient margin for dynamic loads and safety. Motion Control with Servo and Step motor We use motion control to send high pulse output for the servo and step motor. ThatAos friendly to make the servo and step motor go to a fixed position quickly and exactly. Driver Mitsubishi MR Ae J3 The Mitsubishi Electric MELSERVO-J3 series generalpurpose AC servo system represents a significant advancement in precision motion control technology, developed upon the solid foundation of the MELSERVO-J2Super series with enhanced performance and advanced functionality . This product line not only inherits the advantages of its predecessor but also integrates breakthrough technologies, creating a comprehensive solution for motion control applications in modern industry. Its function block is shown in Fig. Fig. Function block diagram Nguyen-Tuong-Quang Tran. High Speed Automatic Cartoning Machine Journal of Fuzzy Systems and Control. Vol. No 3, 2025 Specialized Control Modes a Position Control Mode: In position control mode, the system uses high-speed pulse trains up to 1Mpps to control motor speed and direction, executing precision positioning with 262,144 pulses/revolution resolution . The position smoothing function provides two different modes suitable for each type of machine, allowing smoother start/stop operations in response to sudden position commands . The clamp circuit imposes torque limits on the servo amplifier to protect power transistors in the main circuit from overcurrent due to sudden acceleration/deceleration or overload. This torque limit value can be changed to any value through an external analog input or parameters . a Speed Control Mode: Speed control mode uses external analog speed commands . to 10VDC) or parameterdriven internal speed commands . aximum 7 speed. to smoothly control servo motor speed and direction. The acceleration/deceleration time constant settings in response to speed commands, servo lock function during stops, and automatic offset adjustment function in response to external analog speed commands . a Torque Control Mode: In torque control mode, external analog torque commands . to 8VDC) are used to control the torque output of the servo motor. To prevent unexpected operation under no-load conditions, speed limit functions . xternal or internal setting. are also provided for tension control applications and similar uses . Finally, we use the AC servo (Mitsubishi MR-J3 serie. with a closed-loop position mode for the pick-and-place arm and conveyors. Motion trajectory is generated based on event triggers from the PLC's high-speed outputs, following IEC 61131-3 standards. The glue spray uses a stepper motor with a TB6600 driver, chosen for its high torque at low speeds and deterministic positioning, suitable for indexed transport. The lead screw was selected over a belt drive for glue application due to higher positional precision and better dynamic load Spray glue by using a lead screw We designed the mechanical structure in SOLIDWORKS and used a 3D printer to print part of it . n Fig. Then, make it link together with bolts and screws. After we have the complete block, the spray head, and the head of the glue gun to make the melted glue. The lead screw is controlled by a step motor to push the stick glue into the pray head. Limit sensors and emergency stop circuits were incorporated per ISO 13849 . Fig. Design spray glue IV. EXPERIMENTAL RESULTS With the algorithm flowchart in Fig. 11, we started checking each component to see if it is operating stably according to the correct procedure. Driver TB6600 for Step Motor This is a professional two-phase stepper motor driver. supports speed and direction control. You can set its micro step and output current with 6 DIP switches. There are 7 kinds of micro steps . , 2 / A, 2 / B, 4, 8, 16, . and 8 kinds of current control . 5 A, 1 A, 1. 5 A, 2 A, 2. 5 A, 2. 8 A, 3. 0 A, 5 A) in all . And all signal terminals adopt high-speed optocoupler isolation, enhancing their anti-high-frequency interference ability. The setup is shown in Fig. Fig. Algorithm Flowchart Fig. Set up Motion control Preparation and Initialization Stage System testing begins by bringing the equipment to the ready-to-work position. We verify that all position sensors are functioning correctly and that the system can automatically return to its initial position . n Fig. Nguyen-Tuong-Quang Tran. High Speed Automatic Cartoning Machine Journal of Fuzzy Systems and Control. Vol. No 3, 2025 Fig. Press the button to set the system ready to work Readiness Status Check After the system went to a ready-to-work position, we a Correct position: The system proceeds to the next step a Incorrect position: The system cannot run and wait for settings again. The positions of the system are shown in Fig. 13 to Fig. Testing system Perform continuous test cycles to ensure: a All conditional loops operate correctly. a The system can handle faults and recover automatically. a Cycle time meets production requirements. a Output product accuracy and quality are consistent. The prototype's throughput . boxes/mi. matches commercial automation lines for small cartons. Positioning accuracy is within A0. 4 mm, suitable for pharmaceutical or electronics packaging. Occasional glue nozzle misalignment (<1. 2% of cycle. occurred, usually caused by sensor lag. may be mitigated by improved optical detection or nozzle Table II gives a performance comparison to recent works . The operation of the system is shown in Fig. 16 to Fig. Fig. System running . Ae running conveyor bell Fig. System goes to ready-to-work position . Fig. System goes to ready-to-work position . Fig. System running . Ae spray glue onto the lid of the box Fig. Correct ready-to-work position Fig. System running . Ae the lid is closed by the mechanical structure After the system returned to the ready-to-work position, we began testing the system according to our proposed operating cycle. We expect the system to achieve a total of 10 products per minute. Challenges included box deformation at high speeds, mostly due to misfeeding or carton misalignment. Implementing adjustable guide rails and vision-based quality checks is proposed for future versions. Nguyen-Tuong-Quang Tran. High Speed Automatic Cartoning Machine Journal of Fuzzy Systems and Control. Vol. No 3, 2025 After testing the systemAos operation, we concluded that the system runs stably, all cycles function correctly according to the algorithm, and the systemAos response time is fast, meeting the required productivity. However, there are still some critical shortcomings that affect the productAos appearance, such as traces of glue remaining on the box lid and boxes being dented due to collisions with the mechanical Overall, the system meets the requirements and operates well. Table 2. Result after testing 3 days of normal operation Metric / Technical Specification Value Unit Speed boxes/min Position A0. <1. % of %/8 <10 W/cycle . ut of 2,500 Glue nozzle Mean error recovery time System uptime System setup Average Box Meaning/Conclusion Comparable to mid-scale commercial automation Suitable for pharmaceutical and electronics packaging Usually, due to sensor lag, it can be improved with detection/nozzle redesign The system can recover from minor faults Stable operation over long Convenient for operation, suitable for training Good energy efficiency compared to similar Mainly caused by conveyor/carton future work should include guide rails and vision-based detection CONCLUSIONS Through this research, we built experimental hardware of a high-speed catoning machine for packing products. Control the Servo and Step motor sequential operation. The system is designed to perform basic packaging processes such as box feeding, positioning, glue spraying, lid sealing, and product Although there are still some limitations regarding speed and stability, the topic has somewhat met the technical requirements and is a foundation for further research and improvements in the future. VI. AKNOWLEDGEMENT Operation of the system is shown on the link: https://w. com/watch?v=iBl6aYQDpBs REFERENCES