CNC system for shearing production line based on ARM

Publisher:王大雷Latest update time:2016-08-03 Source: e-worksKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Preface

  With the rapid development of my country's manufacturing industry, the requirements for machining accuracy and production efficiency of machined parts are getting higher and higher, and the degree of automation of the production process of enterprises is also very high. Bars are the main raw materials for the production of various die forgings, roll forgings, and rolled parts, and the bar shearing machine is the shearing and cutting equipment for preparing blanks for these forging processes. The early electrical control of the shearing system generally uses AC contactors and relays for control. After years of use, the components are aged and the equipment fails frequently. During maintenance, due to the large number of discrete components and poor integration, many faults cannot be handled in time, which brings many inconveniences to the production of enterprises.

  Since the PLC servo control system has the characteristics of high positioning accuracy, fast response speed, strong anti-interference ability, and stable operation, the application of high-precision automatic shearing production lines using programmable controller (PLC) control systems is becoming more and more widespread. However, both PLC and soft PLC technology have the disadvantage of weak real-time performance, making it difficult to achieve complex and fast timing control, and the network support capability is poor. Therefore, PLC is not applicable when it is necessary to perform high-speed A/D conversion and real-time sampling of sensor signals and realize intelligent, information-based, and networked management of enterprise production processes. The emergence of ARM-based embedded systems provides a better development and application platform for industrial control. It has rich peripheral resources, various interfaces, and provides expandable interfaces for easy expansion; it uses an embedded real-time operating system with powerful software processing capabilities to achieve complex control; it has many characteristics of a PC, but is cheaper than a PC and an industrial computer; the hardware and software (including the operating system) can be tailored and configured flexibly; it supports large-screen LCD display and can provide a visual interface display; it has networking capabilities and can be directly connected to the local area network or remote network through the network port, which provides the possibility for remote real-time monitoring and management of production.

  Based on the above comparison, this paper proposes an ARM-based embedded bar shearing production line CNC system. The system is based on an ARM processor and is equipped with an embedded Linux operating system. It has expandable input and output control I/O nodes and a variety of field bus interfaces, and can realize automatic shearing control, material stopper control, automatic flip feeder control, and improve bar processing accuracy; it supports large-size LCD display screens, supports networks and embedded databases, has good intelligence and real-time performance, and is convenient for coordinated supervision and monitoring of the production process. The embedded database can realize effective management of processing data, automatically complete various adjustments and controls of processing trajectories, and realize adaptive model parameter adjustment.

1 Overall Design

  The entire shearing production line system includes a central control machine, a cutting system, a material stopper and an automatic flipping feeding system. The overall block diagram is shown in Figure 1.

Overall block diagram

Figure 1 Overall block diagram

  The actual electrical components include operation panel buttons, display lights, various control switches and motors. The operation panel includes rotary encoders, self-locking buttons, ordinary buttons, key buttons, two-position rotary buttons, conversion switches, counters, and display lights; control switches include proximity switches, pressure switches, liquid level switches, travel switches, cam switches, photoelectric switches; solenoid valves, AC relays, and AC contactors; motors include main motors, discharging motors, baffle motors, and lubrication motors. In addition, there are transformers, circuit breakers, and noise filters.
 

2 Central control system

  The central control system is centered on the ARM9 core board. Through the GPIO expansion board, the limited input and output I/O are expanded into a sufficient number of input and output control nodes. It can receive input switch signals such as various buttons, cam switches, photoelectric switches, etc. in the system; according to the program and pre-set parameters, the output switch quantity is given to control the action of the solenoid valve, relay, and contactor. At the same time, a certain number of pulses are sent to the servo driver through high-speed pulse output to control the operation of the servo motor. The input and output interfaces use photoelectric isolation modules, which not only achieves the purpose of anti-interference, but also can realize the level conversion of the interface part. According to the ARM output signal, the frequency converter controls the forward and reverse rotation and speed of the motor, thereby realizing the release and recovery of the coil. The servo driver controls the rotation position and speed of the servo motor according to the number and frequency of pulses sent by the high-speed pulse output terminal of the ARM board, so as to accurately give the feeding length. The 10-inch LCD screen provides users with a good human-computer interaction interface. Users can directly set parameters through the screen, and the working status and action information of the entire shearing system can be intuitively reflected to users. ARM communicates with the inverter and server through the RS232 serial port to achieve real-time data exchange such as program download, parameter setting, status query, etc., ultimately enabling the entire production line equipment to operate in a coordinated manner. The block diagram of the central control machine is shown in Figure 2.

Central control machine block diagram

Figure 2 Block diagram of the central control machine

  2.1 ARM core board

  The ARM core board is based on the ARM processor S3C2410X and adopts a 6-layer board design. The S3C2410X uses the ARM920T core and has a full-performance MMU (memory processing unit) inside. It has excellent characteristics such as high performance, low power consumption, rich interfaces and small size. The chip integrates a large number of functional units, including: internal 1.8V, memory 3.3V, external I/O 3.3V, MMU; built-in external memory controller; LCD controller, 1 LCD dedicated DMA; 4-way DMA with external request line; 3 general asynchronous serial ports, 2-channel SPI; a multi-master IIC bus, an IIS bus controller; SD master interface version 1.0 and multimedia card protocol version 2.11 compatible; 2 USBHOST, a USBDEVICE (V1.1); 4 PWM timers and an internal timer; watchdog timer; 117 general I/O; 24 external interrupts; power control modes: standard, slow, sleep, power-off; 8-channel 10-bit ADC and touch screen interface; 16/32-bit RISC architecture, using the powerful instruction set of the ARM920TCPU core.

  The core board integrates 64MSDRAM, 64MNandFlash, 1MBootFlash, RJ-45 network card, audio input and output, USBHost, USBSlave, standard serial port and other device interfaces on the smallest possible board surface. Most importantly, it uses 2.0mm pin slots to lead out most of the CPU signal pins, including the GPIO pins that have not been used in the system.

  ARM920T with MMU's advanced architecture supports WINCE, EPOC32, LINUX, etc. The free and open source embedded Linux operating system is selected in this paper. Based on this hardware platform and embedded Linux, software work such as operating system transplantation, driver writing and application development is done.

  2.2 Control motherboard

  The central control chassis uses a motherboard + ARM core board + I/O expansion board. The motherboard is used to connect to the ARM9 board to realize functions such as network port USB, serial port, voltage conversion, and connection to the LCD screen. At the same time, the motherboard also includes a certain number of available GPIOs, including 10 inputs and 12 outputs. I/O input and output use DB head connectors for easy connection. The switching power supply in the central control machine is 24V, and the current can reach 4A. The power supply circuit realizes the conversion of 24V voltage to 12V/9V/5V/3.3V to meet the needs of different circuits. The voltage regulator chip uses LM338. The ARM9 core board itself has 3 RS232 serial interfaces. Considering the transmission distance and anti-interference requirements, a special conversion module is designed on the bottom board to convert RS232 to RS485 level. The ARM9 core board comes with USBHOST, which is divided into multiple channels using USBHUB, which can be used for keyboard circuits and mice respectively, and the other channels are output to the outside.

  2.3 GPIO expansion and isolation

  GPIO expansion and isolation circuits are designed to independent circuit boards to achieve the expansion of the number of I/O ports, which are interchangeable. Each expansion board includes 64 inputs and 64 outputs. The expansion board is placed above the motherboard and supported by metal columns. The height can ensure that the two do not interfere with each other. The expansion board and the motherboard are connected by flat cables. The expansion board's expansion I/O input and output also use DB header connectors. There are two solutions for GPIO expansion. One is to use CPLD expansion. Currently, there are about 20 I/O ports available on the ARM board. If the simplest expansion method is used, 8 I/Os are used as data lines and 4 I/Os are used to generate 16 decoding chip select signals, which can be expanded to 128 I/Os. If the external buttons are scanned, some pins can be saved. This solution is feasible as long as ARM ensures that a certain number of I/O pins are provided. ARM can operate on ordinary I/O ports, and programming control is easier, but it takes some time to program CPLD. The second solution is to use a dedicated expansion chip to achieve expansion. There are two types of serial bus interfaces in the existing ARM board expansion port: IIC bus and SPI bus. If you use a ready-made I/O expansion chip, such as MAX6957, which is an IIC interface, one chip can expand 28 I/Os, and if you use 4 chips, you can expand to more than 100 I/Os. This solution requires the development of ARM's driver for IIC devices. The 74HC595 and 74HC166 chips are actually used in this article. Multiple chips are connected in series, and fewer I/O pins are used to successfully achieve parallel-in, serial-out and serial-in, parallel-out control.

  After GPIO is expanded, it can provide a sufficient number of input I/O and output I/O. A large number of switches or display lights in the system can be connected to these extended I/O as switch input or output. Since most of the level values ​​of these switch quantities are not TTL level or CMOS level, level conversion is required; the display lights require sufficient drive current, and the relays require a certain drive voltage and current; and there are a large number of strong electrical signals in the system, in order to fully consider improving the anti-interference ability of the system. Based on the above considerations, an electrical isolation and drive module is designed. The ordinary slower switching signal uses TLP521 isolation optocoupler, and the high-speed optocoupler is used for high-speed pulses.

  2.4 Motor Control

  According to the output signal of the ARM board, the inverter controls the forward and reverse rotation and speed of the motor, thereby realizing the release and recovery of the coiled material.

  For the inverter, the input control signal comes from the isolation expansion board. By setting different short-circuit and open-circuit combinations, forward, reverse, high-speed output and low-speed output can be achieved. High speed and low speed can be preset through the speed selection port. Other parameters related to characteristics and status can be preset through the operation panel.
 

3. CNC system software design

  The CNC system software needs to realize functions such as user interface, shear control, fault detection, database management, and networking. Since the system software introduces an embedded operating system, each task can be executed in parallel, and tasks can be realized through message passing, queues, etc. The software flow chart is shown in Figure 3. Due to space limitations, only the processes of the three tasks of user interface, shear control, and fault detection are drawn, and the two modules of database management and networking are omitted. In order to realize functions such as user interface, shear control, fault detection, database management, and networking, it is necessary to study the embedded operating system and Bootloader transplantation, driver development, application layer shear control program software development, and database development, so as to support the entire system software process and realize system functions. The system software flow chart is shown in Figure 3.

System software flow chart

Figure 3 System software flow chart

  3.1 Embedded Operating System and Bootloader Porting

  Linux transplantation is to rewrite the original Linux source code according to the specific target platform, mainly to modify the architecture-related parts, install them on the target platform, and make them run correctly. In order to boot the operating system, it is necessary to rely on the Bootloader to initialize the hardware devices at power-on and prepare the software environment. Therefore, in the project, the ARM9 hardware system is used as the platform, VIVI is selected as the Bootloader, and the transplantation of the Bootloader and embedded Linux operating system is completed.

  The basic process is:

  (1) Obtain the VIVI source code and modify it;

  (2) Obtain the Linux 2.4.18 kernel source code and the ARM patch for this version, and make necessary modifications to the source code;

  (3) Prepare the cross-compilation environment. The cross-compilation environment tool chain generally includes Binutils tools, ARM-GCC, GLIBC, etc.;

  (4) Cross-compile Bootloader, generate image file and download;

  (5) Add GPIO and other peripheral drivers;

  (6) Cross-compile the Linux kernel, generate the kernel image file, and download the kernel image file.

  3.2 Driver and communication program development

  According to actual needs, the system motherboard is developed with ARM9 as the core, and the hardware driver is developed according to actual needs. The GPIO driver includes support for buttons, LED displays, and I/O such as relay control. When compiling the kernel, choose to dynamically insert the kernel when needed to increase flexibility. For cross-platform communication, compile a code conversion program, configure the Linux operating system environment, and complete the code format conversion between the upper computer GB2312 encoding and the lower computer AMR9-LinuxQTEUNICODE encoding; the system software supports 10-inch DSTNLCD and TFT true color LCD, and uses Qt/EmbeddedC++ of the embedded graphics system for program development, which is convenient for cross-platform transplantation, database connection and development process, and increases the reliability of the product.

  3.3 Shear control procedure

  3.3.1 System control requirements

  (1) Operation mode. The main equipment of the production line has two working modes: manual and automatic. When the automatic working mode is adopted, the system will work in a continuous cycle according to the pre-set process flow. The manual working mode is used in the single operation, debugging and maintenance stages of the equipment.

  (2) Real-time display. The operation status of each process in the system, alarm information, feeding length, quality, and number of processed workpieces are required to be displayed on the screen.

  (3) Fault detection. The system can automatically detect whether each process is running normally. If an abnormality occurs, an error message will be displayed on the screen and the production line will stop running. After the fault is resolved, press the start button and the production line will continue to run.

  (4) Emergency stop. When an emergency occurs, press the emergency stop button and all running equipment will stop.

  (5) Safety protection. During the program design process, multiple protections are set for key links to avoid personal and equipment accidents. The system will start automatically after power-on.

  3.3.2 Basic Operations

  For the first operation, switch the console's online-offline state to the offline state, and manually press the fixed length +/fixed length- on the console to control the stopper to move to the origin. After the system is zeroed and the bar diameter, weight compensation, specific gravity, stopper origin and other values ​​are entered, the system will automatically calculate the length value to be cut and display it. When "automatic compensation" is pressed, the system will adjust the stopper position. When the "calculated length" is consistent with the "actual length", a "synchronous signal" is issued, the synchronous output light turns green, and the machine tool can perform the shearing action. In addition, the system can also make the bar shearing more accurate through "weight compensation". The system control starts in the forward high-speed working state, and changes to the "low-speed forward" working state when it is close to the target; when the system is working, it monitors the position of the stopper in real time. Whenever the stopper moves in series, the CNC machine automatically adjusts and has an "emergency stop" button to stop the machine tool; the system can automatically filter out wrong operations.

  3.4 Embedded Database

  The embedded database adopts the three-level model of relational database, supports standard SQL, supports data query, insertion, update, and deletion of multiple standard SQL statements, fully meeting the needs of embedded application development; has transaction processing function, automatically maintains the integrity and atomicity of transactions; supports multiple communication protocols, backup and recovery, error logs, etc.; has high flexibility, scalability and stability; and provides a flexible application programming interface for the development of embedded applications: C language routine interface, low memory requirements, and high execution efficiency. At present, many embedded devices are data-centric. If there is only a file system, it is far from enough to rely on the operating system and file system without structure in concurrency, sharing, and structured access. Therefore, the embedded database is used to complete the collection and storage of industrial control data, and the storage and issuance of instructions, so as to realize the convenient and fast movement of the control machine, large data storage, and current and historical data query. By collecting data from the CNC network system, the real-time restoration of the machine tool processing program is completed, and new solutions are formulated based on feedback information, providing the original basis for the analysis of quality management. The integration of management information and control information is realized. The database driver written in C/C++ - dynamic link library (DLL) is called through JNI to perform data operations, solving the problem that the embedded database does not provide Java JDBC data access interface.

4 Conclusion

  The paper adopts the cost-effective embedded processor ARM9 to replace the old industrial control microcomputer, and carries out the Linux operating system cutting and transplanting, independently develops the hardware control driver, adopts the TCP/IP protocol, the beautiful and elegant QT user graphical interface and the embedded database that conforms to the international standard SQL. The shearing system that applies this CNC technology has strong high-speed data acquisition and multiple direct I/O node control capabilities, can realize arbitrary setting of processing parameters, and has the information processing, storage, and network transmission capabilities of PC CNC machine tools, and meets the modern industrial control concept of high precision, small size, and low power consumption. It is a technological innovation of the existing CNC technology.

Keywords:ARM Reference address:CNC system for shearing production line based on ARM

Previous article:Advanced ARM Learning (1) - Configuration of ARM Development Environment
Next article:Design of wall wire position measuring instrument based on LDC1000 inductive digital sensor

Latest Microcontroller Articles
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
    Since development under LINUX is still quite troublesome, is there a more convenient and simple development method under WINDOWS? The answer is yes. Of course, it is not a development tool like ADS, because it ...
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
  • Learn ARM development(18)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号