Share this

Design of a Flat Knitting Machine Control System Based on FPGA

2026-04-06 05:41:57 · · #1
Abstract: Based on the analysis of the functional requirements and implementation methods of the control system of computerized flat knitting machines, this paper introduces a fully automatic computerized flat knitting machine control system developed based on embedded technology. It proposes using a 32-bit ARM processor and an FPGA as the master and slave controllers of the embedded fully automatic flat knitting machine. The computerized flat knitting machine control system based on this design concept has high cost-effectiveness and integration, and has good application value. Keywords : Computerized flat knitting machine, ARM, FPGA Fully automatic computerized flat knitting machines are high-tech machines in the knitting industry. They integrate a large number of digital switch control, electronic drive, mechanical mechanisms, motor drive, and other technologies, and can knit very complex garment structures that cannot be completed by hand-cranked flat knitting machines. With the popularization of computerized knitting, computerized flat knitting machines with high cost-effectiveness and high integration are becoming increasingly popular, and the demand for such products is also increasing. However, most computerized flat knitting machine controllers on the market currently use microcontrollers as the main processor or are developed based on industrial control computers. There are also control systems composed of 32-bit ARM processors and group microcontrollers. Using microcontrollers as the main processor has disadvantages such as low integration and poor stability. The computerized flat knitting machine control system, developed based on industrial control computers, runs its main program on the industrial computer, offering fast processing speed and stable operation. However, during normal operation, the large amount of information required by the front-end control points necessitates extremely short response times, resulting in low control precision, large size, and high cost. While a control system using a 32-bit ARM processor and a group of microcontrollers simplifies the structure and improves stability and reliability by integrating various peripheral chips into an ARM chip, the coordination of multiple microcontrollers and anti-interference issues in industrial environments remain unresolved, and the system's mean time between failures (MTBF) needs further improvement. Based on an analysis of the functional requirements of the computerized flat knitting machine and the implementation of the control system, we propose using a 32-bit ARM microprocessor and an FPGA as the master and slave controllers, respectively, which largely solves the aforementioned problems. In this system, the ARM acts as the host computer, primarily managing processing data, while the FPGA interprets and executes commands from the host computer, monitors the operation of each subsystem, and sends alarms to the host computer when anomalies are detected. The control system framework is shown in Figure 1. [align=center] Figure 1 Control System Framework Diagram[/align] 1. Requirements of the Computerized Flat Knitting Machine Control System The computerized flat knitting machine control system mainly includes: needle selection control module, yarn guide control module, cam control module, density adjustment control module, head drive control module, tension and take-up control module, presser foot control module, transverse movement control module, and on-site synchronization and fault signal preprocessing module. The core of the flat knitting machine control system is to complete the various specific actions required for knitting through the synchronization signals generated by the detection unit using actuators such as electromagnets, stepper motors, and AC servo motors. Therefore, its basic control objects are electromagnets and motors. The controlled motors include 2 sets of AC servo motors, 18 sets of stepper motors, and 8 sets of DC fabric winding motors: ① 1 set of AC servo motors serves as the main drive motor, driving the machine head via a belt; ② 1 set of AC servo motors serves as the rocking bed motor, controlling the rocking bed's movement during knitting; ③ 8 sets of DC motors control the fabric winding and pulling mechanism; ④ 8 sets of stepper motors adjust the presser needle density; ⑤ 4 sets of stepper motors control the presser feet; ⑥ 6 sets of stepper motors are used to complete the scissor-cutting action. There are as many as 160 controlled electromagnets, mainly divided into: ① 2 groups of yarn feeder selection electromagnets, each group containing 8 electromagnets; ② 4 groups of triangle control electromagnets, each group containing 6 electromagnets; ③ 8 groups of needle selector controllers, each group containing 10 electromagnets. The flat knitting machine control signals are shown in Table 1. 2 Hardware System Design The computer flat knitting machine control system is an online real-time control system. During design, both the reliability and cost-effectiveness of the control must be considered. As mentioned earlier, microcontrollers and industrial control computers have drawbacks such as low integration, poor stability, and high cost. Therefore, we chose ARM as the main processor of this system. Since the computer flat knitting machine has a total of 265 input and output signals, the processing of different signals requires following specific timing and logic. The system also has multiple interrupt signals and control signals, but the I/O port resources of the main processor are limited. Therefore, based on ARM as the main processor, three Cyclone series FPGA chips were added as slave processors. This system uses SAMSUNG's S3C44BOX as the main processor. It is a 16/32-bit ARM 7TDMI RISC processor (66MHz) that provides rich internal settings including 8KB cache, internal SRAM, LCD controller, 2-channel UART with automatic handshaking, 4-channel DMA, system manager, and 5-channel customizer with PWM function [2]. The three FPGAs are Altera's Cyclone series EP1C6Q240, which is manufactured using a 0.13um process. It has a phase-locked loop, RAM block, logic capacity of 5980 LEs, and a maximum of 185 user I/Os. The internal RAM block is only M4K, which can realize true dual-port, simple dual-port and single-port RAM, and can support shift register and ROM mode. There are 8 internal global clock networks, supporting DDR memory interface and high-speed LVDS interface [3]. The ARM is responsible for LCD display and keyboard processing to realize a good user interface, and writes commands to the FPGA through the data bus, address bus and control bus (including interrupt request line and read/write control line), transmits/reads data, and the FPGA collects a number of external detection signals, performs corresponding processing, and feeds back important signals to the host computer for real-time display. The three FPGAs work in the mode of slave processors in conjunction with the master processor, as the direct dialogue part between the master control system and the underlying actuator, to realize the drive and control of multiple motors and electromagnets. Specifically, FPGA(A) handles the monitoring of 3 user inputs (start, stop, and jog), 8 DC motors, 2 AC servo controls, and 29 detection signals, including 8 position sensor signals, 7 fault alarm signals, 11 zero-position sensor signals, and 3 position counting signals, fully reflecting the current working status of the flat knitting machine. FPGA(B) and FPGA(C) control the engagement and disengagement of 18 stepper motors (density control, presser foot control, and scissor control) and 160 electromagnets (yarn feeder selection, cam control, and needle selector control). Due to the limited driving capability of FPGAs, we use LVC245 to enhance the circuit's driving capability, with a maximum current of 100 mA. Furthermore, this control system has multiple power supplies, and strong and weak electrical signals must be isolated; we use optocouplers 2501 to achieve this isolation function. The system hardware structure is shown in Figure 2. [align=center]Figure 2 System Hardware Structure Diagram[/align] 3 Software System Design The flow of control information for a computerized flat knitting machine can generally be summarized as follows: A pattern image is obtained from the input device. After processing by the pattern preparation system, this image is converted into a pattern data file. This file contains not only the pattern information itself but also needle selection data and other control data. This data is output to the host computer module of the computerized flat knitting machine controller via an information carrier. After preprocessing by the host computer module, it is transmitted to the lower-level sub-modules. The lower-level sub-modules process the signals in real time based on the field signals and then output the control signals to the execution units of each sub-controller, thus completing the entire control task. Based on the analysis of the above process, the software of this computerized flat knitting machine control system includes low-level device drivers, application programs, and process execution programs. The knitting control program implements software control of the knitting process based on the device driver interface. The driver service program includes automatic configuration and initialization subroutines, subroutines serving I/O requests, and interrupt service subroutines. Since the process execution section has 29 detection signals connected to the FPGA, these signals are centrally collected by the FPGA's interrupt management module and interrupt requests are sent to the host computer. When an interrupt is requested, the interrupt service routine is executed. Subroutines serving I/O requests control the actions of electromagnets and motors through a series of entry functions. We use Borland C/C++ for software development. The host computer program includes initialization, main program panel management subroutines, pattern information processing subroutines, interrupt service subroutines, and communication subroutines. When the system starts, some parameters are set, and various motor and electromagnet circuits undergo self-testing and reset to ensure the knitting head is at both ends of the machine. Then, the main control module of the pattern information processing program is entered. Before knitting, the designed pattern data file is read from the USB flash drive via the USB interface. Then, the needle bed origin is set, and the input/output signals are tested. After successful testing, the trial knitting submodule in the knitting module is called to knit a line of data before the actual knitting begins. Most complex embedded systems use real-time operating systems; we chose UC/OS-II as the operating system for this control system. UC/OSⅡ is an open-source (C code) embedded real-time operating system. It is simple and easy to learn, and provides basic functions of embedded systems. Its core code is short and concise. If it is optimized for hardware, it can also achieve higher execution efficiency [2]. UC/OSⅡ is mainly responsible for the management and scheduling of various functional tasks in this control system. It is the software running environment of the entire control system. By using the task scheduling and mailbox message passing of UC/OSⅡ, communication and task-level scheduling between various functions can be realized, and the coordination of control of various complex components of the flat knitting machine can be realized. 4 Conclusion This paper studies a new type of computer flat knitting machine control system based on ARM and FPGA. It has the characteristics of fast processing speed, stable operation and good real-time performance, which makes the problems brought about by the flat knitting machine control system with single-chip microcomputer and industrial control computer as processors well solved. Compared with the traditional control system design method, the system designed in this project improves the control accuracy on the basis of shortening the front-end control time, and can also reduce the size of the current huge control system.
Read next

CATDOLL Jo Soft Silicone Head

You can choose the skin tone, eye color, and wig, or upgrade to implanted hair. Soft silicone heads come with a functio...

Articles 2026-02-22