Computerized flat knitting machine control method, control system, device and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]本申请主要是提供电脑针织横机的控制方法、控制系统、设备及存储介质,解决传统架构中链路节点多、通信路径长,导致端到端时延增加,且多级中转会引入额外排队、协议封装和上下文切换开销,在高速工况或密集动作场景下更易出现响应滞后和控制抖动的问题
[0015]本申请的有益效果是:本申请通过参数与总线层统一处理编织参数并解析编织控制指令,控制决策层可直接从参数与总线层读取编织控制指令和编织参数,并根据编织控制指令、编织参数及电脑针织横机的状态参数生成目标动作,从而将目标动作下发到执行反馈层,使得执行反馈层获取目标动作并驱动电脑针织横机动作,消除了传统架构中从编织控制单元依次通过串口、主控单元、通信总线单元到各个执行控制模块的多级中转环节,整体链路节点少、通信链路短,大大降低了指令的传输时延,减少了因协议转换、排队及上下文切换引入的开销,使系统在高速编织及密集动作场景下响应更迅速、控制更及时,有效避免了响应滞后与控制抖动。
Smart Images

Figure CN122546897A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of textile technology, and in particular to control methods, control systems, equipment and storage media for computerized flat knitting machines. Background Technology
[0002] Current computerized flat knitting machine control systems typically adopt a multi-vendor, independent development model, meaning different manufacturers implement their own knitting processes, main control processes, and human-machine interaction processes. (See also...) Figure 1 As shown, this type of solution generally includes a braiding control unit 11, a main control unit 13, a communication bus unit 14, and an execution control module 15 in engineering. In the traditional architecture, the action commands generated by the braiding control unit 11 are generally first reported to the main control unit 13 via serial port 12, and then parsed, scheduled, and forwarded by the main control unit 13, and finally sent to each execution control module 15 via the communication bus unit 14.
[0003] However, the traditional architecture has many link nodes and long communication paths, which leads to increased end-to-end latency. In addition, multi-level relay introduces additional queuing, protocol encapsulation and context switching overhead, making it more prone to response lag and control jitter in high-speed or intensive operation scenarios. Summary of the Invention
[0004] This application mainly provides a control method, control system, equipment and storage medium for computerized flat knitting machines, which solves the problems of increased end-to-end latency caused by multiple link nodes and long communication paths in traditional architectures. In addition, multi-level relays introduce additional queuing, protocol encapsulation and context switching overhead, and are more prone to response lag and control jitter in high-speed or intensive operation scenarios.
[0005] This application provides a control method for a computerized flat knitting machine, applied to the control system of the computerized flat knitting machine. The control system includes an interface layer, a parameter and bus layer, a control decision layer, and an execution feedback layer. The control method includes: The process pattern file is obtained through the interface layer, and the process pattern file includes weaving parameters and weaving control instructions. The knitting parameters are written into a parameter object through the parameter and bus layer, and the knitting control instructions are parsed. The control decision layer obtains the parsed knitting control commands, knitting parameters, and status parameters of the computerized flat knitting machine to generate the target action. The target action is obtained through the execution feedback layer, the computerized flat knitting machine is driven to move based on the target action, and feedback values are collected. The feedback value is obtained through the control decision layer, and the target action is regenerated based on the feedback value.
[0006] In some embodiments, the step of obtaining the parsed knitting control command, knitting parameters, and state parameters, and generating the target action specifically includes: Obtain the parsed knitting control commands and the status parameters of the computerized flat knitting machine; Based on the knitting control command, the knitting parameters required for the current control cycle are obtained from the parameter object; Based on the status parameters of the computerized flat knitting machine, determine the current mode of the computerized flat knitting machine; The target action is generated based on the current mode and the weaving parameters.
[0007] In some embodiments, the weaving parameters include process parameters, machine parameters, system parameters, and cache space parameters, and the step of writing the weaving parameters into a parameter object specifically includes: Create the parameter object and write the process parameters, machine parameters, system parameters, and cache space parameters into the parameter object; An address mapping processing table is established, which defines the mapping relationship between each parameter in the parameter object and a preset unified logical address.
[0008] In some embodiments, the step of obtaining the weaving parameters required for the current control cycle from the parameter object specifically includes: Based on the address mapping processing table, determine the unified logical address corresponding to the weaving parameters required for the current control cycle; Based on the unified logical address, the corresponding parameter position is obtained from the address mapping processing table; Based on the parameter position, the weaving parameters required for the current control cycle are read from the parameter object.
[0009] In some embodiments, the control system further includes a task orchestration layer, and the step of writing the knitting parameters into a parameter object and parsing the knitting control instructions through the parameter and bus layer further includes: The communication task group, the master control task group, and the knitting task group are launched sequentially through the task orchestration layer. The communication task group is used to realize data communication of the control system, the master control task group is used to realize the control of the computerized flat knitting machine, and the knitting task group is used to realize the execution of the knitting process.
[0010] In some embodiments, the control method further includes: The feedback value is obtained through the interface layer; The feedback value is analyzed, and the analyzed feedback value is compared with the preset state conditions to determine the state of the computerized flat knitting machine. When the status of the computerized flat knitting machine is determined to be abnormal, the status of the computerized flat knitting machine is displayed and an alarm signal is output.
[0011] In some embodiments, the control system further includes a safety and health layer, and the control method further includes: The computerized flat knitting machine is identified through the security and health layer, and its operating status is recorded. Based on the operating status, it is determined whether there is an abnormality. If the operating status is abnormal, the control system enters the fault handling process.
[0012] This application also provides a control system for a computerized flat knitting machine, comprising: The interface layer is used to obtain the process pattern file, which includes weaving parameters and weaving control instructions. The parameter and bus layer is used to write the weaving parameters into a parameter object and parse the weaving control instructions; The control decision layer is used to obtain the parsed weaving control command, the weaving parameters and the state parameters, and generate the target action; An execution feedback layer is used to obtain the target action, drive the computerized flat knitting machine to move, and collect feedback values.
[0013] This application also provides an electronic device, including: at least one processor and a memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the control method described above.
[0014] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the control method described above.
[0015] The beneficial effects of this application are as follows: This application unifies the processing of knitting parameters and the parsing of knitting control instructions through the parameter and bus layer. The control decision layer can directly read the knitting control instructions and knitting parameters from the parameter and bus layer, and generate the target action based on the knitting control instructions, knitting parameters, and the status parameters of the computerized flat knitting machine. The target action is then sent to the execution feedback layer, which obtains the target action and drives the computerized flat knitting machine to move. This eliminates the multi-level relay links in the traditional architecture, which pass through the serial port, main control unit, and communication bus unit to each execution control module from the knitting control unit. The overall link nodes are fewer and the communication links are shorter, which greatly reduces the transmission latency of instructions and reduces the overhead introduced by protocol conversion, queuing, and context switching. This makes the system respond more quickly and control more timely in high-speed knitting and dense action scenarios, and effectively avoids response lag and control jitter. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a schematic diagram of a structural embodiment of the conventional architecture provided in this application; Figure 2 This is a flowchart illustrating an embodiment of the control method for a computerized flat knitting machine provided in this application; Figure 3 This is a schematic diagram of the control system of the computerized flat knitting machine provided in this application; Figure 4 yes Figure 2 A flowchart illustrating an embodiment of step S120; Figure 5 yes Figure 2 A flowchart illustrating an embodiment of step S130; Figure 6 This is a flowchart illustrating another embodiment of the control method for a computerized flat knitting machine provided in this application; Figure 7 This is a flowchart illustrating another embodiment of the control method for a computerized flat knitting machine provided in this application; Figure 8 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application; Figure 9 This is a schematic diagram of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation
[0017] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0019] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0020] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly indicating the number, specific order, or primary and secondary relationship of the indicated technical features.
[0021] See Figures 2-3 As shown, Figure 2 This is a flowchart illustrating an embodiment of the control method for a computerized flat knitting machine provided in this application; Figure 3 This is a schematic diagram of the control system of the computerized flat knitting machine provided in this application. The control method of the computerized flat knitting machine in this embodiment is applied to the control system 20 of the computerized flat knitting machine. The control system 20 includes an interface layer 210, a parameter and bus layer 230, a control decision layer 240, and an execution feedback layer 250. The control method includes: Step S110: Obtain the process pattern file through the interface layer 210. The process pattern file includes weaving parameters and weaving control instructions.
[0022] The interface layer 210 refers to the software module or hardware interface through which the control system 20 interacts with the user. It typically manifests as graphical software on a computer, a touchscreen, or a control panel, allowing the user to input, load, edit, and monitor knitting tasks. The process pattern file is a data file containing all the information needed to complete a specific knitting pattern. Knitting parameters are static setting data in the process pattern file, such as knitting speed, knitting density, yarn type, and yarn tension, used to define the overall rules and conditions of the knitting process. Knitting control instructions are dynamic action instructions in the process pattern file, such as needle selection instructions and color change instructions, used to describe the specific action sequence and timing of various machine components.
[0023] In some embodiments, the user uploads or submits a process pattern file through the interface layer 210 as the process input for the current cycle (such as the knitting cycle of a garment), so that the control system 20 reads the process pattern file and performs the knitting task based on the process pattern file.
[0024] In some embodiments, the interface layer 210 can be customized according to user requirements to meet personalized needs.
[0025] Step S120: Write the weaving parameters into the parameter object through the parameter and bus layer 230, and parse the weaving control instructions.
[0026] The parameter and bus layer 230 refers to the data layer in the control system 20 used to receive process data (process pattern files) input from the upper layer (interface layer 210), and to process and convert the process data into standardized information that can be uniformly managed and used within the system. A parameter object is a structured data entity created and maintained by the parameter and bus layer 230 in software memory or storage space; it is the encapsulation body and unique storage carrier for weaving parameters.
[0027] In some embodiments, the parameter and bus layer 230 extracts the weaving parameters from the process pattern file through the interface layer 210 and writes the weaving parameters into the parameter object to complete the centralized storage of parameters. At the same time, it extracts the weaving control instructions from the process pattern file and parses the weaving control instructions into standard internal instructions.
[0028] In some embodiments, the parameter and bus layer 230 has an instruction processing entry point, which supports multiple communication protocols, such as Modbus communication protocol, Controller Area Network (CAN), and Inter-Integrated Circuit (I2C). After the braided control instructions are parsed, they can directly enter the control decision layer 240 and execution flow according to unified rules. Compared with the long-link mode in the traditional architecture where the braided control unit reports to the main control unit via serial port and then the main control unit forwards the information via the communication bus unit (CAN), this embodiment moves the instruction processing entry point forward, constructing a direct processing mechanism oriented towards the control path. This effectively reduces intermediate forwarding links, reduces the overhead of repeated protocol encapsulation and parsing, and significantly shortens the end-to-end control latency, thereby improving the real-time performance and overall execution efficiency of the system.
[0029] In some embodiments, the weaving parameters include process parameters, machine parameters, system parameters, and buffer space parameters.
[0030] Among these, process parameters refer to the knitting process settings that determine the final appearance and texture of the fabric, including but not limited to knitting speed, knitting density, yarn tension, and number of knitting cycles. Machine parameters refer to the adaptation and calibration values configured for the computerized flat knitting machine, including but not limited to the motor's zero-point position, needle bed alignment parameters, and sensor calibration coefficients. System parameters refer to the configuration and real-time data of the internal operating logic and status of the control system 20, including but not limited to system operating modes and fault codes. Cache space parameters refer to the pre-allocated memory buffer information used to optimize data flow and real-time performance.
[0031] See Figure 4As shown, Figure 4 yes Figure 2 A flowchart illustrating an embodiment of step S120; step S120 in this embodiment includes the following steps: Step S121: Create a parameter object and write the process parameters, machine parameters, system parameters, and cache space parameters into the parameter object.
[0032] Specifically, the parameter and bus layer 230 first establishes a logical data container or data structure instance as a parameter object, and reads process parameters, machine parameters, system parameters and cache space parameters through the interface layer 210 and writes them into the parameter object.
[0033] Step S122: Establish an address mapping processing table. The address mapping processing table defines the mapping relationship between each parameter in the parameter object and the preset unified logical address.
[0034] The address mapping table refers to an internal system data structure or configuration file. A unified logical address is an abstract address defined by the system software, independent of the underlying hardware and communication protocols. For example, the knitting speed parameter might be mapped to a unified logical address of 0x1001.
[0035] In some embodiments, when the parameter and bus layer 230 writes process parameters, machine parameters, system parameters and cache space parameters into the parameter object, it simultaneously registers the actual location of each parameter in the memory of the parameter object and the unified logical address assigned to that parameter in the address mapping processing table.
[0036] Step S130: Obtain the parsed knitting control instructions, knitting parameters, and status parameters of the computerized flat knitting machine through the control decision layer 240, and generate the target action.
[0037] Among them, the control decision layer 240 is the calculation and logic processing unit of the control system 20. It is used to integrate all input information (weaving control commands, weaving parameters, and state parameters) and calculate the precise action sequence required to drive the machine to complete the weaving task through internal algorithms and logical judgments.
[0038] The status parameters of a computerized flat knitting machine refer to the real-time operating data of each actuator and sensor of the machine, such as the real-time motor speed, the current position of each yarn guide, and the real-time position of the needle bed. Optionally, these parameters are collected in real time by sensors (such as encoders, position switches, and tension sensors) in the execution feedback layer 250 and uploaded to the control decision layer 240.
[0039] The target action refers to the highly specific action instructions output by the control decision layer 240. It is a series of action descriptions that can be directly parsed and executed by the execution feedback layer 250, such as moving the No. 1 yarn feeder to coordinate (X, Y) at speed S, starting the main motor to run at speed R for N revolutions and then stopping.
[0040] In some embodiments, the control decision layer 240 is configured to directly read the knitting control instructions and knitting parameters from the parameter and bus layer 230, and, in conjunction with the status parameters of the computerized flat knitting machine, generate a series of target actions through real-time calculation and logical judgment.
[0041] In some embodiments, a process pattern file is a weaving cycle, and a weaving cycle includes multiple control cycles.
[0042] The knitting cycle refers to the entire process required to complete a complete and independent knitting task unit. A knitting task unit typically corresponds to a complete garment piece, a complete pattern cycle, or a defined knitting stage as specified in the process pattern document. The control cycle refers to the minimum, fixed time interval for the control system 20 to operate and issue commands.
[0043] For example, within a single weaving cycle, the machine needs to perform thousands or even millions of tiny, continuous movements, and the decision-making and execution of each tiny movement are completed within an independent control cycle.
[0044] See Figure 5 As shown, Figure 5 yes Figure 2 A flowchart illustrating an embodiment of step S130; step S130 in this embodiment includes the following steps: Step S131: Obtain the parsed knitting control instructions and the status parameters of the computerized flat knitting machine.
[0045] Specifically, it acquires the parsed knitting control commands output by the bus layer 230 and the status parameters of the computerized flat knitting machine uploaded by the execution feedback layer 250.
[0046] Step S132: Based on the weaving control instructions, obtain the weaving parameters required for the current control cycle from the parameter object.
[0047] Specifically, based on the obtained and parsed weaving control instructions, the weaving parameters required for the current control cycle are determined, and the corresponding weaving parameters, such as basic speed, variable angle configuration, multi-piece unfolding configuration, and machine branch parameters, are read from the parameter object through the parameter and bus layer 230.
[0048] In some embodiments, firstly, a unified logical address corresponding to the weaving parameters required for the current control cycle is determined according to the address mapping processing table. Then, based on the unified logical address, the corresponding parameter position is obtained from the address mapping processing table. Finally, based on the parameter position, the weaving parameters required for the current control cycle are read from the parameter object.
[0049] In some embodiments, the current process pattern file context is acquired, and the weaving parameters required for the current control cycle are obtained from the parameter object.
[0050] The acquisition of the current process pattern file context refers to all key dynamic information acquired and summarized by the control system 20 in real time at the beginning of each control cycle. This information describes the specific progress status and on-site conditions of the weaving process up to the current moment. Examples include the current row number, direction, speed range, action flag, and abnormal flag.
[0051] Step S133: Determine the current mode of the computerized flat knitting machine based on the status parameters of the machine.
[0052] The current modes of computerized flat knitting machines include, but are not limited to, standard knitting modes, special modes, correction modes, or protection modes.
[0053] Specifically, based on the acquired status parameters, logical judgments are made to determine which working mode the computerized flat knitting machine is currently in.
[0054] Optionally, mode determination can be performed based on state machine rules. Here, state machine rules refer to a set of formal logical rules that clearly define how the working mode of a computerized flat knitting machine switches according to specific conditions (events).
[0055] Step S134: Generate the target action based on the current pattern and weaving parameters.
[0056] Specifically, by combining the current mode and weaving parameters with the built-in control algorithm, a series of executable target actions are calculated, such as the stepper motor pulse target position, the servo speed target quadrature encoder interface (QEI), and related mechanism action flags. Then, the target actions are sent to the execution feedback layer 250 in the form of unified control commands.
[0057] Step S140: Obtain the target action by executing the feedback layer 250, drive the computer knitting flat knitting machine based on the target action, and collect feedback values.
[0058] The execution feedback layer 250 is located between the control decision layer 240 and the physical execution device. As the interface for converting commands into physical actions and the state perception hub, the execution feedback layer 250 is used to parse and convert the target action (digital quantity) of the control decision layer 240 into specific control signals (such as pulses, analog voltages, and communication messages) required to drive the actuator (such as a servo motor or cylinder). Through an integrated sensor network, it collects, preprocesses, and reports data reflecting the actual physical state of the actuator in real time, thereby forming a feedback loop for closed-loop control.
[0059] Feedback values refer to the set of measurement data that are detected in real time by sensors and collected and processed by the execution feedback layer 250, and are used to quantitatively characterize the actual physical state of the actuator or process.
[0060] In some embodiments, the execution feedback layer 250 receives the target action from the control decision layer 240, parses the target action, and sends the parsed target action to the corresponding actuator in the computerized flat knitting machine, such as a servo motor, stepper motor, cylinder, etc., through the corresponding communication interface, and then collects feedback values synchronously through sensors.
[0061] Optionally, the feedback layer 250 utilizes diverse standard hardware interfaces to convert various forms of signals (digital messages, analog voltages, pulse frequencies, etc.) into digital data that the control system 20 can process, i.e., feedback values, in real time and synchronously.
[0062] The standard hardware interfaces include, but are not limited to, CAN, I2C, analog-to-digital converter (ADC), and pulse width modulation (PWM) interfaces.
[0063] Step S150: Obtain feedback values through the control decision layer 240, and regenerate the target action based on the feedback values.
[0064] In some embodiments, the control decision layer 240 receives feedback values from the execution feedback layer 250 in real time, and calculates new target actions based on the feedback values.
[0065] Specifically, the received feedback value (actual state) is compared with the expected value in the target action issued in the current cycle or the previous cycle. Based on the deviation obtained from the comparison, and combined with the preset control algorithm, a new control command, i.e. a new target action, is calculated to eliminate or reduce this deviation.
[0066] For example, if the feedback shows that the actual position of the motor is 10 pulses behind the target position, the newly generated target action may increase the number of pulses on the original basis to make up for the 10-pulse gap.
[0067] In this embodiment, the knitting parameters and knitting control commands are uniformly processed and parsed through the parameter and bus layer 230. The control decision layer 240 can directly read the knitting control commands and knitting parameters from the parameter and bus layer 230, and generate the target action based on the knitting control commands, knitting parameters, and the status parameters of the computerized flat knitting machine. The target action is then sent to the execution feedback layer 250, which obtains the target action and drives the computerized flat knitting machine to move. This eliminates the multi-level relay links in the traditional architecture, which pass through the serial port, main control unit, and communication bus unit to each execution control module from the knitting control unit. The overall link nodes are fewer and the communication links are shorter, which greatly reduces the transmission latency of commands and reduces the overhead introduced by protocol conversion, queuing, and context switching. This makes the system respond more quickly and control more timely in high-speed knitting and dense action scenarios, effectively avoiding response lag and control jitter.
[0068] See Figure 6 As shown, Figure 6 This is a flowchart illustrating another embodiment of the control method for a computerized flat knitting machine provided in this application; the control method for the computerized flat knitting machine in this embodiment includes: Step S510: Obtain the process pattern file through the interface layer 210. The process pattern file includes weaving parameters and weaving control instructions.
[0069] Step S510 in this embodiment is the same as step S110 in the above embodiment, and will not be described again here.
[0070] Step S520: The communication task group, the main control task group, and the knitting task group are started sequentially through the task arrangement layer 220. The communication task group is used to realize data communication of the control system 20, the main control task group is used to realize the control of the computer knitting flat knitting machine, and the knitting task group is used to realize the execution of the knitting process.
[0071] Among them, the task orchestration layer 220 is the core scheduling and initialization management layer in the control system 20. It is responsible for the orderly startup, scheduling and collaborative management of all key functional modules (task groups) in the system in a defined order, timing and logic.
[0072] In some embodiments, after the control system 20 is powered on, the interface layer 210 receives the process pattern file, first enters the task scheduling layer 220, and first starts (activates) the communication task group, such as the Modbus task group, to realize the data communication of the control system 20, that is, to build the data communication foundation of the system and ensure that the parameter interaction channel is available. Then, the main control task group is started to realize the control of the computer knitting flat knitting machine, such as being responsible for the head control, drive management, status maintenance and system-level command processing. Finally, the knitting task group is started to realize the execution operation of the knitting process, such as the execution of row data generation, process status advancement and action scheduling and other business logic.
[0073] Optionally, the task orchestration layer 220 starts the communication task group, the master control task group, and the weaving task group in a deterministic order of communication first, master control next, and weaving last.
[0074] In this embodiment, the communication task group, the master control task group, and the weaving task group are started sequentially through the task orchestration layer 220. This achieves the establishment of a stable parameter and command channel first, followed by the start of control execution logic, and finally the entry into specific weaving business processing. This avoids the race condition problem caused by the control task running but the communication parameters not being ready in the traditional architecture.
[0075] Step S530: Write the weaving parameters into the parameter object through the parameter and bus layer 230, and parse the weaving control instructions.
[0076] Step S530 in this embodiment is the same as step S120 in the above embodiment, and will not be described again here.
[0077] Step S540: Obtain the parsed knitting control instructions, knitting parameters, and status parameters of the computerized flat knitting machine through the control decision layer 240, and generate the target action.
[0078] Step S540 in this embodiment is the same as step S130 in the above embodiment, and will not be described again here.
[0079] Step S550: Obtain the target motion by executing the feedback layer 250, drive the computer knitting flat knitting machine to move based on the target motion, and collect feedback values.
[0080] Step S550 in this embodiment is the same as step S140 in the above embodiment, and will not be described again here.
[0081] Step S560: Obtain feedback values through the control decision layer 240, and regenerate the target action based on the feedback values.
[0082] Step S550 in this embodiment is the same as step S150 in the above embodiment, and will not be described again here.
[0083] In this embodiment, the communication task group, the master control task group, and the weaving task group are started sequentially through the task orchestration layer 220, avoiding race conditions caused by disordered task start-up timing, and building a stable and predictable software execution foundation for the entire control system 20.
[0084] See Figure 7 As shown, Figure 7 This is a flowchart illustrating another embodiment of the control method for a computerized flat knitting machine provided in this application; the control method for the computerized flat knitting machine in this embodiment includes: Step S610: Obtain the process pattern file through the interface layer 210. The process pattern file includes weaving parameters and weaving control instructions.
[0085] Step S620: Write the weaving parameters into the parameter object through the parameter and bus layer 230, and parse the weaving control instructions.
[0086] Step S630: Obtain the parsed knitting control instructions, knitting parameters, and status parameters of the computerized flat knitting machine through the control decision layer 240, and generate the target action.
[0087] Step S640: Obtain the target motion by executing the feedback layer 250, drive the computer knitting flat knitting machine to move based on the target motion, and collect feedback values.
[0088] Step S650: Obtain feedback values through the control decision layer 240, and regenerate the target action based on the feedback values.
[0089] In this embodiment, steps S610, S620, S630, S640, and S650 are the same as steps S110, S120, S130, S140, and S150 in the above embodiment, and will not be repeated here.
[0090] Step S660: Obtain feedback values through interface layer 210.
[0091] In some embodiments, after the feedback layer 250 collects the feedback value, it transmits it back to the control decision layer 240 and the interface layer 210 in real time.
[0092] Step S670: Analyze the feedback value, compare the analyzed feedback value with the preset state conditions, and determine the state of the computerized flat knitting machine.
[0093] Specifically, the interface layer 210 parses the acquired feedback value and determines whether the computerized flat knitting machine is in normal condition based on the parsed feedback value and the preset state conditions.
[0094] In some embodiments, the feedback values include the execution result (of the target action), the sampled data (of the actuator), and the status, and the interface layer 210 directly obtains the execution result, the sampled data, and the status.
[0095] Step S680: When it is determined that the status of the computerized flat knitting machine is abnormal, display the status of the computerized flat knitting machine and output an alarm signal.
[0096] Specifically, the interface layer 210 determines the abnormal status of the computerized flat knitting machine based on the parsed feedback value and preset status conditions, displays the status of the computerized flat knitting machine, and outputs an alarm signal to facilitate users to detect the fault and handle it in a timely manner.
[0097] In some embodiments, the interface layer 210 displays the acquired execution results, sampled data, and status. If the status is abnormal at this time, an alarm signal is output.
[0098] This embodiment clearly displays specific status information through interface layer 210, providing users with intuitive and accurate fault location information, greatly shortening fault diagnosis time, assisting them in making correct maintenance decisions quickly, and thus significantly improving the maintainability and operation and maintenance efficiency of the equipment.
[0099] In some embodiments, the control system 20 further includes a safety and health layer 260, which verifies the identity of the computerized flat knitting machine, records the operating status of the computerized flat knitting machine, and determines whether there is an abnormality based on the operating status. If the operating status is abnormal, the control system 20 enters the fault handling process.
[0100] Among them, the safety and health layer 260 refers to the architecture layer used for access security, status monitoring and systemic failure management of the control system 20.
[0101] In some embodiments, the identity verification of the computerized flat knitting machine is achieved through an encrypted chip identity number (ID), ensuring the authenticity of the device (computerized flat knitting machine) and preventing control risks caused by unauthorized replacement and tampering.
[0102] In some embodiments, the operating status of the computerized flat knitting machine is continuously recorded by flash memory (Flash) heartbeat counting. The system determines whether there is an abnormality based on the operating status, ensuring that the system can detect abnormal restarts. If the operating status is abnormal, the control system 20 automatically enters a predefined fault handling process to achieve degraded operation.
[0103] See Figure 3 As shown, the control system 20 of the computerized flat knitting machine in this embodiment includes: Interface layer 210 is used to acquire process pattern files, which include weaving parameters and weaving control instructions; The parameter and bus layer 230 is used to write the weaving parameters into a parameter object and parse the weaving control instructions; The control decision layer 240 is used to obtain the parsed weaving control command, the weaving parameters and the state parameters, and generate the target action; The execution feedback layer 250 is used to obtain the target action, drive the computerized flat knitting machine to move, and collect feedback values.
[0104] In some embodiments, such as Figure 3As shown, the control system 20 also includes a task orchestration layer 220 and a safety and health layer 260. The task orchestration layer 220, control decision layer 240, execution feedback layer 250 and safety and health layer 260 form a control execution closed loop, and the parameter and bus layer 230, control decision layer 240, execution feedback layer 250 and safety and health layer 260 form a business interaction closed loop.
[0105] Compared to traditional architectures, the control system 20 in this embodiment no longer separates the braiding, main control, and communication forwarding logic. Instead, it adopts a central control hub (control decision layer 240), where users only need to customize the interface layer 210. This allows for differentiated development based on device model and brand without altering the core control. Since users only need to develop around the interface and a small amount of adaptation logic, they do not need to repeatedly implement the complete braiding control kernel, reducing repetitive work and significantly lowering development costs. Furthermore, core processes can be centrally maintained, and defect repairs and version upgrades can be implemented once and reused by multiple parties, improving code governance efficiency and significantly reducing maintenance costs.
[0106] Figure 8 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application. Figure 8 As shown, the electronic device includes a processor 21 and a memory 22 coupled to the processor 21. The memory 22 stores program instructions for implementing the control method of any of the above embodiments; the processor 21 executes the program instructions stored in the memory 22 to implement the steps of the above method embodiments. The processor 21 may also be referred to as a CPU (Central Processing Unit). The processor 21 may be an integrated circuit chip with signal processing capabilities. The processor 21 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor may be a microprocessor or any conventional processor. Figure 9 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium provided in this application. Figure 9As shown, the computer-readable storage medium 30 of this application embodiment stores program instructions 31. When executed, these program instructions 31 implement the control method provided in the above embodiments of this application. The program instructions 31 can be formed into a program file and stored in the computer-readable storage medium 30 in the form of a software product, so that a computer device (which may be a personal computer, server, or network device, etc.) or processor can execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned computer-readable storage medium 30 includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.
[0107] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or modules may be electrical, mechanical, or other forms. Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules. The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A control method of a computerized flat knitting machine, characterized in that, A control system for a computerized flat knitting machine, comprising an interface layer, a parameter and bus layer, a control decision layer, and an execution feedback layer, wherein the control method includes: The process pattern file is obtained through the interface layer, and the process pattern file includes weaving parameters and weaving control instructions. The knitting parameters are written into a parameter object through the parameter and bus layer, and the knitting control instructions are parsed. The control decision layer obtains the parsed knitting control command, knitting parameters, and status parameters of the computerized flat knitting machine to generate the target action. The target action is obtained through the execution feedback layer, the computerized flat knitting machine is driven to move based on the target action, and feedback values are collected. The feedback value is obtained through the control decision layer, and the target action is regenerated based on the feedback value.
2. The control method according to claim 1, characterized by, The step of obtaining the parsed weaving control command, weaving parameters, and status parameters, and generating the target action specifically includes: Obtain the parsed knitting control commands and the status parameters of the computerized flat knitting machine; Based on the knitting control command, the knitting parameters required for the current control cycle are obtained from the parameter object; Based on the status parameters of the computerized flat knitting machine, determine the current mode of the computerized flat knitting machine; The target action is generated based on the current mode and the weaving parameters.
3. The control method according to claim 2, characterized by, The weaving parameters include process parameters, machine parameters, system parameters, and cache space parameters. The step of writing the weaving parameters into the parameter object specifically includes: Create the parameter object and write the process parameters, machine parameters, system parameters, and cache space parameters into the parameter object; An address mapping processing table is established, which defines the mapping relationship between each parameter in the parameter object and a preset unified logical address.
4. The control method according to claim 3, characterized by The step of obtaining the weaving parameters required for the current control cycle from the parameter object specifically includes: Based on the address mapping processing table, determine the unified logical address corresponding to the weaving parameters required for the current control cycle; Based on the unified logical address, the corresponding parameter position is obtained from the address mapping processing table; Based on the parameter position, the weaving parameters required for the current control cycle are read from the parameter object.
5. The control method according to claim 1, characterized by, The control system further includes a task orchestration layer, and before the step of writing the knitting parameters into a parameter object and parsing the knitting control instructions through the parameter and bus layer, the system further includes: The communication task group, the master control task group, and the knitting task group are launched sequentially through the task orchestration layer. The communication task group is used to realize data communication of the control system, the master control task group is used to realize the control of the computerized flat knitting machine, and the knitting task group is used to realize the execution of the knitting process.
6. The control method according to claim 1, characterized by, The control method further includes: The feedback value is obtained through the interface layer; The feedback value is analyzed, and the analyzed feedback value is compared with the preset state conditions to determine the state of the computerized flat knitting machine. When the status of the computerized flat knitting machine is determined to be abnormal, the status of the computerized flat knitting machine is displayed and an alarm signal is output.
7. The control method according to claim 6, characterized by The control system further includes a safety and health layer, and the control method further includes: The computerized flat knitting machine is identified through the security and health layer, and its operating status is recorded. Based on the operating status, it is determined whether there is an abnormality. If the operating status is abnormal, the control system enters the fault handling process.
8. Control system of a computerized flat knitting machine, characterized in that, include: The interface layer is used to obtain the process pattern file, which includes weaving parameters and weaving control instructions. The parameter and bus layer is used to write the weaving parameters into a parameter object and parse the weaving control instructions; The control decision layer is used to obtain the parsed weaving control command, the weaving parameters and the state parameters, and generate the target action; An execution feedback layer is used to obtain the target action, drive the computerized flat knitting machine to move, and collect feedback values.
9. An electronic device, comprising: include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the control method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by the processor, implement the control method as described in any one of claims 1-7.