Unit moving method, device and equipment of carton printing machine and storage medium
By pre-configuring the signal system for the units of the carton printing machine and adopting recursive iterative control logic, the problems of code redundancy and poor adaptability in the traditional unit movement control of the carton printing machine are solved, realizing efficient and flexible unit movement control, and improving production efficiency and the uniformity of control logic.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG DONGFANG PRECISION SCI & TECH CO LTD
- Filing Date
- 2026-01-09
- Publication Date
- 2026-05-15
AI Technical Summary
Traditional carton printing machines suffer from problems such as code redundancy, poor adaptability, and low debugging efficiency in unit movement control, resulting in redundant control logic, resource shortages, reduced response speed, and compatibility risks, making it difficult to meet the needs of multi-variety, small-batch orders.
The system employs a pre-configuration and dynamic adjustment of the signal system, along with recursive iterative control logic. By pre-configuring input signals, interlocking signals, iteration condition signals, and output signals for each moving unit, a control signal set is generated. Based on recursive iteration, unit movement control is achieved, and the signal system is dynamically adjusted to adapt to combined changes.
This technology achieves high efficiency and versatility in the unit movement control of carton printing machines, reduces code redundancy, saves PLC memory resources, improves the running response speed of the control program, reduces development cycle and maintenance costs, and ensures the uniformity and flexibility of control strategies for different orders.
Smart Images

Figure CN122034503A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of signal processing technology, and in particular to a unit movement method, apparatus, device, and storage medium for a carton printing machine. Background Technology
[0002] In the field of packaging and printing machinery technology, the opening and closing carton printing machine is a key piece of equipment for realizing the printing of graphics and text on the surface of cartons and the forming process. The accuracy and efficiency of its unit movement control directly affect product quality and production efficiency.
[0003] Traditional open-type carton printing presses typically employ an exhaustive method for unit movement control, meaning that control logic code is written separately for each possible combination of states of each functional unit of the printing press. However, this control method has revealed significant technical shortcomings in practical applications, specifically the following three core problems: First, there is a prominent issue of code redundancy. Because control logic needs to be developed separately for each unit combination, the amount of control program code increases exponentially with the number of units and the combination method. The logic entries are complex and highly repetitive, which not only occupies a large amount of PLC storage space and causes memory resource shortage, but also directly leads to a decrease in PLC running speed, causing control response lag and affecting the dynamic adjustment performance of the printing press.
[0004] Secondly, there is the problem of poor adaptability of control logic. Orders in the carton printing industry are characterized by multiple varieties and small batches. Customers' differentiated requirements for carton specifications, printing color groups, and processing technology will lead to frequent changes in the combination of printing press moving units. When using the exhaustive method, each combination change requires targeted modification of the control program code, which not only poses logical conflicts and compatibility risks, but also makes it difficult to achieve the unification and standardization of control logic. This results in a lack of universality in control strategies for different production lines and different orders, significantly increasing the program development cycle and maintenance costs.
[0005] Thirdly, there is the problem of low efficiency in the debugging process. In order to adapt to the new unit combination, the debugging personnel need to spend a lot of time modifying the program, calibrating the parameters and verifying the action sequence. Multiple rounds of testing and iteration are required to ensure the accuracy of the control logic, which seriously slows down the production preparation progress, resulting in a longer cycle from order receipt to formal production, and reducing equipment utilization and market response speed.
[0006] It is evident that existing technologies still need improvement and enhancement. Summary of the Invention
[0007] To overcome the shortcomings of existing technologies, the present invention aims to provide a unit movement method for a carton printing machine. By pre-configuring and dynamically adjusting the signal system and using recursive iterative control logic, the method overcomes the defects of code redundancy, poor adaptability, and inefficient debugging of the traditional exhaustive method, thereby achieving high efficiency and universality of unit movement control for the carton printing machine.
[0008] The first aspect of the present invention provides a method for unit movement of a carton printing machine, comprising: determining the number of moving units of the carton printing machine, and pre-configuring a signal system for each moving unit, the signal system including input signals, interlocking signals, iteration condition signals, and output signals; when a movement command is received, determining the command type of the movement command and the unit to be moved, generating a control signal set according to the command type and the signal system corresponding to the unit to be moved; implementing movement control of the unit to be moved based on the generated control signal set and recursive iteration; and when a configuration modification command is received, adjusting the signal system of the corresponding moving unit according to the unit combination information in the configuration modification command.
[0009] Optionally, in a first implementation of the first aspect of the present invention, determining the number of moving units of the carton printing machine and pre-configuring a signal system for each moving unit, the signal system including input signals, interlocking signals, iteration condition signals, and output signals, includes: determining the number of moving units of the carton printing machine and configuring a unique identifier for each moving unit; pre-configuring a signal system for each moving unit and associating the signal system with the corresponding unique identifier; the signal system including input signals, interlocking signals, iteration condition signals, and output signals; the input signals including a left-shift button operation signal, a right-shift button operation signal, a safe left-shift condition signal, and a safe right-shift condition signal; the interlocking signals including a left-adjacent unit interlocking signal and a right-adjacent unit interlocking signal; the iteration condition signals including a left-shift allow signal and a right-shift allow signal; and the output signals including a left-shift trigger signal and a right-shift trigger signal.
[0010] Optionally, in a second implementation of the first aspect of the present invention, the step of determining the instruction type of the movement instruction and the unit to be moved when a movement instruction is received, and generating a control signal set according to the instruction type and the signal system corresponding to the unit to be moved, includes: when a movement instruction is received, determining the instruction type of the movement instruction and the unit to be moved, wherein the instruction type includes a left-move instruction and a right-move instruction; when the instruction type is a left-move instruction, obtaining a left-move button operation signal, a safe left-move condition signal, an interlock signal, a left-move allow signal, and a left-move trigger signal from the signal system corresponding to the unit to be moved, to construct the control signal set; when the instruction type is a right-move instruction, obtaining a right-move button operation signal, a safe right-move condition signal, an interlock signal, a right-move allow signal, and a right-move trigger signal from the signal system corresponding to the unit to be moved, to construct the control signal set.
[0011] Optionally, in a third implementation of the first aspect of the present invention, the step of implementing movement control of the unit to be moved based on the generated control signal set and recursive iteration includes: determining a movement mode based on interlocking signals, wherein the movement mode includes a self-triggered mode and an iterative mode; when the movement mode is a self-triggered mode and the instruction type is a left-shift instruction, implementing movement control of the unit to be moved based on the left-shift button operation signal, the left-shift allow signal, and the left-shift trigger signal; when the movement mode is a self-triggered mode and the instruction type is a right-shift instruction, implementing movement control of the unit to be moved based on the right-shift button operation signal, the right-shift allow signal, and the right-shift trigger signal; and when the movement mode is an iterative mode, implementing movement control of the unit to be moved based on the generated control signal set and recursive iteration.
[0012] Optionally, in the fourth implementation of the first aspect of the present invention, when the movement mode is the iterative mode, the movement control of the unit to be moved is implemented based on the generated control signal set and recursively iterated, including: when the movement mode is the iterative mode and the instruction type is a left-shift instruction, the left-shift button operation signal of the unit to be moved is in a shielded state; the interlocking unit is determined based on the interlocking signal of the unit to be moved, the interlocking unit including the left adjacent unit and / or the right adjacent unit; when the interlocking unit includes the left adjacent unit and the right adjacent unit, the left-shift permission signal and the left-shift trigger signal of the left adjacent unit, and the safe left-shift condition signal of the right adjacent unit are obtained to confirm whether the unit to be moved is allowed to move left; if left-shift is allowed, the unit to be moved is controlled to move left, and the left-shift trigger signal of the unit to be moved is synchronously iterated to the right adjacent unit to realize the left-shift control of the right adjacent unit.
[0013] Optionally, in the fifth implementation of the first aspect of the present invention, when the movement mode is the iterative mode, the movement control of the unit to be moved is implemented based on the generated control signal set and recursively iterated, including: when the movement mode is the iterative mode and the instruction type is a right-shift instruction, the right-shift button operation signal of the unit to be moved is in a shielded state; the interlocking unit is determined based on the interlocking signal of the unit to be moved, the interlocking unit including the right adjacent unit and / or the left adjacent unit; when the interlocking unit includes the right adjacent unit and the left adjacent unit, the right-shift permission signal and the right-shift trigger signal of the right adjacent unit, and the safe right-shift condition signal of the left adjacent unit are obtained to confirm whether the unit to be moved is allowed to move right; if right-shift is allowed, the unit to be moved is controlled to move right, and the right-shift trigger signal of the unit to be moved is synchronously iterated to the left adjacent unit to realize the right-shift control of the left adjacent unit.
[0014] Optionally, in a sixth implementation of the first aspect of the present invention, the step of adjusting the signal system of the corresponding mobile unit according to the unit combination information in the configuration modification instruction when a configuration modification instruction is received includes: when a configuration modification instruction is received, constructing an interlocking signal status table according to the unit combination information in the configuration modification instruction, and writing the interlocking signal status table into a dedicated register; adjusting the interlocking signals in the signal system of the corresponding mobile unit based on the constructed interlocking signal status table, and modifying the input signals and iteration condition signals of the signal system accordingly based on the adjusted interlocking signals; performing a simulated self-test on the adjusted signal system of the mobile unit, and replacing the pre-configured signal system with the signal system that passes the simulated self-test.
[0015] A second aspect of the present invention provides a unit moving device for a carton printing machine, comprising: a configuration module, configured to determine the number of moving units of the carton printing machine and pre-configure a signal system for each moving unit, the signal system including input signals, interlocking signals, iteration condition signals, and output signals; a generation module, configured to, upon receiving a moving command, determine the command type of the moving command and the unit to be moved, and generate a control signal set according to the command type and the signal system corresponding to the unit to be moved; a control module, configured to, based on the generated control signal set and recursive iteration, implement the moving control of the unit to be moved; and an adjustment module, configured to, upon receiving a configuration modification command, adjust the signal system of the corresponding moving unit according to the unit combination information in the configuration modification command.
[0016] A third aspect of the present invention provides a unit moving device for a carton printing machine, the unit moving device of the carton printing machine comprising: a memory and at least one processor, the memory storing instructions; the at least one processor calling the instructions in the memory to cause the unit moving device of the carton printing machine to perform the various steps of the unit moving method of the carton printing machine described in any of the preceding claims.
[0017] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the unit movement method of the carton printing press described in any of the preceding claims.
[0018] In the technical solution of this invention, modularization and reuse of control logic are achieved through parameterized configuration of the signal system rather than hard-coded logic. Furthermore, the recursive iteration mechanism further avoids the separate enumeration of each combination state, significantly reducing code redundancy, saving PLC memory resources, reducing the risk of logic conflicts, and improving the response speed of the control program. Moreover, based on the dynamic adaptation mechanism of adjusting the signal system using configuration modification instructions, when unit combinations change, only the signal system of the corresponding moving unit needs to be adjusted, rather than modifying the control program code. This gives the control logic the flexibility to adapt to combination changes, signal adjustments, and flexible access, avoiding compatibility issues caused by code-level modifications. It achieves the unification and standardization of control strategies for different production lines and orders, significantly reducing program development cycles and maintenance costs. Attached Figure Description
[0019] Figure 1 A logic flowchart of a unit movement method for a carton printing machine provided in an embodiment of the present invention; Figure 2 A schematic diagram of the unit moving device of a carton printing machine provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a unit moving device for a carton printing machine provided in an embodiment of the present invention. Detailed Implementation
[0020] This invention provides a method, apparatus, device, and storage medium for unit movement of a carton printing machine. In this invention, the terms "first," "second," "third," "fourth," etc. (if present)," in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0021] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the unit movement method for a carton printing machine in this invention includes: 101. Determine the number of moving units of the carton printing machine, and pre-configure a signal system for each moving unit, the signal system including input signals, interlocking signals, iteration condition signals and output signals; In this embodiment, the total number of moving units of the current carton printing machine is first determined by equipment parameter detection or user preset. Then, an independent signal system is assigned to each moving unit. The configured signal system is a set of signals for unit movement control, which includes four types of core signals: input signals, i.e., external trigger or detection signals; interlocking signals, i.e., the association control signals between adjacent units, used to determine whether the units need to move collaboratively; iteration condition signals, i.e., the preconditions for the unit to move; and output signals, i.e., the signals that drive the unit to perform movement.
[0022] In this embodiment, a standardized signal system is used to decouple the control logic from the signal definition, laying the foundation for subsequent recursive iterative control. Furthermore, a pre-configuration method is adopted to avoid redefining the signal configuration every time an order changes, reducing repetitive work and lowering the risk of signal logic conflicts.
[0023] 102. When a movement command is received, the command type of the movement command and the unit to be moved are determined, and a control signal set is generated according to the command type and the signal system corresponding to the unit to be moved; In this embodiment, when the device receives a movement command, such as when a user triggers a movement button via the HMI, it first parses two core pieces of information about the command: the command type, which can be distinguished by the command code (e.g., left movement command code 0x01, right movement is 0x02); and the unit to be moved, which is confirmed based on the unique identifier carried in the command (e.g., "U4" or "U5"). Subsequently, based on the command type, signals are extracted as needed from the pre-configured signal system of the unit to be moved to construct a control signal set containing only the signals required for the current movement, excluding irrelevant signals. By generating the control signal set on demand, the problem of excessive resource consumption caused by calling all signals in traditional solutions is avoided, thus improving the operating efficiency of the PLC.
[0024] 103. Based on the generated control signal set, implement the movement control of the unit to be moved based on recursive iteration; In this embodiment, the interlocking signals of the control signal set are used as the core judgment basis to determine the movement mode of the unit to be moved, and the movement control is realized through a recursive iteration mechanism. Here, recursion means that the control logic of each unit is consistent with the logic of adjacent units, and the logic can be reused through a general subroutine. Iteration means that the control signals are directionally transmitted between adjacent interlocking units, ultimately driving the unit to be moved to perform a left or right movement. The specific implementation of recursive iteration is as follows: a general unit control subroutine is written in the PLC program, whose input parameters are the unit displacement identifier and instruction type. The subroutine automatically calls the signal system of the unit, eliminating the need to write a separate program for each unit. If an abnormal signal is detected in a unit during the iteration process, the movement of all interlocking units is immediately stopped, and an emergency stop alarm is triggered, effectively avoiding equipment collisions.
[0025] In this embodiment, by adopting a recursive iteration mechanism, the problem of exponential growth in code volume caused by the increase in the number of units in the traditional exhaustive method is solved, the storage space occupied by the PLC is reduced, and the running speed of the PLC is improved. Moreover, the iterative recursive mechanism ensures the coordination of multiple units when interlocking, and avoids the problem of action delay caused by the individual control of multiple units in the traditional solution, thereby improving the movement accuracy.
[0026] 104. When a configuration modification instruction is received, the signal system of the corresponding mobile unit is adjusted according to the unit combination information in the configuration modification instruction; In this embodiment, when a user needs to adjust the unit combination due to order changes, a configuration modification command can be issued. Based on the unit combination information in the received configuration modification command, only the interlocking signal status in the corresponding unit signal system is adjusted, without modifying the core control program. After adjustment, the system can adapt to the new unit combination. The configuration modification command includes a target unit combination list, such as (U3, U4), (U4, U5), and interlocking status (1 = interlocked, 0 = no interlocking). If the interlocking signal of a certain signal system changes from 0 to 1, the iteration condition signal of the adjacent unit is updated synchronously. After the adjustment is completed, the log of each configuration modification is automatically recorded for easy fault tracing.
[0027] This application discloses a unit movement method for a carton printing machine. By parametrically configuring the signal system instead of hard-coded logic, it achieves modularization and reuse of control logic. Furthermore, by employing a recursive iteration mechanism, it avoids the separate enumeration of each combination state, significantly reducing code redundancy, saving PLC memory resources, lowering the risk of logic conflicts, and improving the control program's response speed. Moreover, based on a dynamic adaptation mechanism that adjusts the signal system using configuration modification instructions, when unit combinations change, only the signal system of the corresponding moving unit needs to be adjusted, rather than modifying the control program code. This gives the control logic flexibility in combination changes, signal adjustments, and flexible access, avoiding compatibility issues caused by code-level modifications. It achieves unification and standardization of control strategies for different production lines and orders, significantly reducing program development cycle and maintenance costs.
[0028] In this embodiment of the invention, the determination of the number of moving units of the carton printing machine and the pre-configuration of a signal system for each moving unit, the signal system including input signals, interlocking signals, iteration condition signals, and output signals, including: 201. Determine the number of moving units of the carton printing machine and configure a unique identifier for each moving unit; In this embodiment, the unique identifier adopts the format of "U + number" (such as U1, U2...Un); this identifier is the core index for subsequent signal calling and instruction parsing. By setting a unique identifier for the unit, the problem of chaotic unit signals in the traditional solution is effectively solved, ensuring the accuracy of signal calling.
[0029] 202. Pre-configure a signal system for each mobile unit and associate the signal system with a corresponding unique identifier; In this embodiment, specific signal parameters are defined for the four types of signals of each mobile unit, and the signal system is bound to the unique identifier of the unit. For example, in the U4 signal system, all signals carry the "U4" identifier, ensuring that the program can call the complete signal system of the mobile unit only by the identifier, thus avoiding cross-unit signal interference.
[0030] The signal system includes input signals, interlocking signals, iteration condition signals, and output signals; The input signals include a left-shift button operation signal, a right-shift button operation signal, a safe left-shift condition signal, and a safe right-shift condition signal; the left-shift button operation signal and the right-shift button operation signal correspond to physical buttons, and the safe left-shift condition signal and the safe right-shift condition signal correspond to safety detection sensors of the moving unit, such as photoelectric limit sensors and emergency stop signals. If the sensor detects an obstacle, the safety signal is 0.
[0031] The interlocking signals include interlocking signals for the left adjacent unit and interlocking signals for the right adjacent unit. Assuming the units are arranged from right to left in the order U1→U2→U3→U4→U5, the left adjacent units are those with increasing numbers, and the right adjacent units are those with decreasing numbers. Then, the interlocking signal for the left adjacent unit, such as MU45 of U4, corresponds to the signal of the left adjacent unit U5; the interlocking signal for the right adjacent unit, such as MU34 of U4, corresponds to the signal of the right adjacent unit U3. Interlocking signals only exist between adjacent units. For example, U4 and U6 are not adjacent, so there is no direct interlocking relationship.
[0032] The iterative condition signals include a left shift enable signal and a right shift enable signal; the left shift enable signal V1Un depends on its own safe left shift condition and the interlocking state of adjacent units. For example, the left shift enable signal V1U4 of U4 needs to be 1 when the left shift button operation signal I3U4=1 and MU34=0, or 1 when MU34=1 and V1U3=1. The right shift enable signal V2Un is the same.
[0033] The output signals include a left-shift trigger signal and a right-shift trigger signal; the left-shift trigger signal and the right-shift trigger signal directly drive the walking motor of the unit (for example, when the left-shift trigger signal Q1U4=1, the motor driver of U4 receives the signal and drives the motor to move to the left).
[0034] In this embodiment of the invention, when a movement command is received, determining the command type of the movement command and the unit to be moved, and generating a control signal set according to the command type and the signal system corresponding to the unit to be moved, includes: 301. When a move instruction is received, the instruction type of the move instruction and the unit to be moved are determined, wherein the instruction type includes a left move instruction and a right move instruction; In this embodiment, the move instruction includes an instruction header and a data segment. The instruction header identifies the instruction type, and the data segment identifies the unit to be moved. For example, in the instruction "0x010x04", 0x01 is the left move instruction type, and 0x04 is the identifier of the unit U4 to be moved. After parsing, it is determined to control U4 to move left.
[0035] 302. When the instruction type is a left shift instruction, the left shift button operation signal, safe left shift condition signal, interlock signal, left shift allow signal and left shift trigger signal are obtained from the signal system corresponding to the unit to be moved, so as to construct the control signal set; In this embodiment, when the left shift command is triggered, left shift-related signals are extracted from the signal system of the unit to be moved to form a left shift control signal set; for example, the signal set for left shift of U4 includes: input signals: I1U4 (left shift button), I3U4 (safe left shift condition); interlocking signals: MU34 (interlocked with U3), MU45 (interlocked with U5); iteration condition signal: V1U4 (left shift allowed); output signal: Q1U4 (left shift triggered).
[0036] 303. When the instruction type is a right shift instruction, the right shift button operation signal, safe right shift condition signal, interlock signal, right shift allow signal and right shift trigger signal are obtained from the signal system corresponding to the unit to be moved, so as to construct the control signal set; In this embodiment, when the right shift instruction is triggered, it is symmetrical with the left shift logic, extracting the right shift-related signals of the unit to be moved to form a control signal set; for example, the signal set for the right shift of U4 includes: input signals: I2U4 (right shift button), I4U4 (safe right shift condition); interlocking signals: MU34 (interlocked with U3), MU45 (interlocked with U5); iteration condition signal: V2U4 (right shift allowed); output signal: Q2U4 (right shift triggered); the right shift and left shift signal sets are only different in signal type, and the structure and storage method of the signal sets are completely consistent, ensuring that the program can reuse the processing logic of the left shift signal set and reduce program redundancy.
[0037] In this embodiment of the invention, the step of implementing movement control of the unit to be moved based on the generated control signal set and recursive iteration includes: 401. Determine the movement mode based on the interlocking signal, wherein the movement mode includes a self-triggered mode and an iterative mode; In this embodiment, the interlocking signals in the control signal set, including the left adjacent unit interlocking signal MUn(n+1) and the right adjacent unit interlocking signal MUn(n-1), are used as the basis for judgment: If both interlocking signals are 0 (no adjacent unit interlocking), it is determined to be a self-triggered mode, in which case the unit movement depends only on its own signal; If any interlocking signal is 1, it is determined to be in iterative mode, in which case the movement of the unit depends on the signals of the adjacent interlocking units; If both interlocking signals are 1, such as MU34=1 and MU45=1 for U4, it is still determined to be in iteration mode, and the signal of the adjacent unit corresponding to the command direction is given priority: when moving left, the signal of the left unit U5 is given priority, and when moving right, the signal of the right unit U3 is given priority. By using dynamic modes to determine and adapt to different unit combinations, the problem of having to manually modify mode parameters, as in traditional solutions, is avoided.
[0038] 402. When the movement mode is self-triggered mode and the instruction type is left-shift instruction, the movement control of the unit to be moved is realized according to the left-shift button operation signal, the left-shift enable signal and the left-shift trigger signal; In this embodiment, when the left-shift button operation signal is 1 (I1Un=1) and the left-shift enable signal is 1 (V1Un=1), a left-shift trigger signal (Q1Un=1) is output to drive the unit motor to move left; if either condition is not met, Q1Un=0, and no movement is performed; the judgment logic of the left-shift enable signal is as follows: V1Un=I3Un∧(MUn(n-1)=0∧MUn(n+1)=0), meaning that its own safety conditions are met and there is no interlocking.
[0039] In this embodiment, a dual-condition judgment mechanism is used to ensure the security of the device in its own trigger mode. When the security condition is not met, the device will not move even if the button is pressed, thus solving the risk of false triggering caused by the traditional solution that relies solely on the button.
[0040] 403. When the movement mode is self-triggered mode and the instruction type is right-shift instruction, the movement control of the unit to be moved is realized according to the right-shift button operation signal, the right-shift allow signal and the right-shift trigger signal; In this embodiment, when the right-shift button operation signal is 1 (I2Un=1) and the right-shift enable signal is 1 (V2Un=1), a right-shift trigger signal (Q2Un=1) is output, driving the unit motor to shift to the right; if either condition is not met, Q2Un=0; the judgment logic for the right-shift enable signal is as follows: V2Un=I4Un∧(MUn(n-1)=0∧MUn(n+1)=0, meaning that the self-safety condition signal is satisfied and there is no interlocking.
[0041] 404. When the movement mode is iterative mode, the movement control of the unit to be moved is realized based on the generated control signal set and recursive iteration. In this embodiment, in iterative mode, the movement signal of a unit is transmitted iteratively by adjacent interlocking units, rather than originating from its own button. Coordinated movement of interlocking units is achieved through recursive logic: during left-movement iteration, the signal is transmitted to the right along the adjacent units on the left, such as U5 to U4 to U3; during right-movement iteration, the signal is transmitted to the left along the adjacent units on the right, such as U3 to U4 to U5; ultimately, all interlocking units execute movement actions synchronously. The recursive implementation is completed by calling a general iterative subroutine. The input parameters include the current unique identifier, instruction type, and interlocking signal. This subroutine automatically determines the interlocking status of adjacent units, and if interlocking exists, it sends an iterative signal to the adjacent units.
[0042] In this embodiment of the invention, when the movement mode is iterative mode, the movement control of the unit to be moved is implemented based on recursive iteration according to the generated control signal set, including: 501. When the movement mode is iterative mode and the instruction type is left shift instruction, the left shift button operation signal of the unit to be moved is in a shielded state. In this embodiment, when moving left in iterative mode, the left-moving button operation signal (I1Un) of the unit to be moved is forcibly set to 0, ensuring that the signal source for the unit's movement uniquely depends on the iterative signal of the adjacent interlocking unit, avoiding conflict between the button and the iterative signal, and ensuring the uniqueness of the control logic.
[0043] 502. Determine the interlocking unit based on the interlocking signal of the unit to be moved, wherein the interlocking unit includes the left adjacent unit and / or the right adjacent unit; In this embodiment, the two interlocking signals of the unit to be moved (left MUn(n+1) and right MUn(n-1)) are analyzed to determine all interlocking units: If MUn(n+1)=1, then the left-hand unit Un+1 is an interlocking unit; If MUn(n-1)=1, then the right-hand unit Un-1 is an interlocking unit; If both signals are 1, then Un+1 on the left and Un-1 on the right are both interlocking units (e.g., if MU45=1 and MU34=1 for U4, then the interlocking units are U5 and U3). If the left unit Un+1 is also interlocked with Un+2 (MUn+1(n+2)=1), then Un+2 is also determined to be an interlocking unit. For example, if U5 is interlocked with U6, then the interlocking units of U4 include U5, U6, and U3. By automatically expanding the interlocking unit, the problem of identifying multi-level interlocks is solved, and the flexibility of control is improved.
[0044] 503. When the interlocking unit includes a left adjacent unit and a right adjacent unit, the left shift permission signal and left shift trigger signal of the left adjacent unit, and the safe left shift condition signal of the right adjacent unit are obtained to confirm whether the unit to be moved is allowed to move left. In this embodiment, when the interlocking unit contains adjacent units on both the left and right sides, the following three types of signals need to be acquired to determine whether the unit to be moved (such as U4) is allowed to move to the left: The left shift enable signal (V1U5) of the left adjacent unit (U5) is used to determine whether the left unit is allowed to shift left; The left shift trigger signal (Q1U5) of the left adjacent unit (U5) is used to determine whether the left unit has started the left shift; The safe left shift condition signal (I3U3) of the right adjacent unit (U3) is used to confirm that the right unit meets the safety condition, ensuring that U3 can move with U4 when U4 moves to the left; The logic for allowing left shift is: V1Un = V1Un+1∧Q1Un+1∧I3Un-1, that is, the left cell is allowed and has triggered the left shift, while the safety condition of the right cell is met.
[0045] 504. If left shift is allowed, control the unit to be moved to shift left, and synchronously iterate the left shift trigger signal of the unit to be moved to the adjacent unit on the right, so as to realize the left shift control of the adjacent unit on the right. In this embodiment, if it is determined that left shift is allowed (V1Un=1), then the left shift trigger signal (Q1Un=1) of the unit to be moved is output to drive the unit to shift left; at the same time, the Q1Un signal of the unit to be moved is transmitted to the adjacent interlocking unit on the right, for example, Q1U4 of U4 is transmitted to U3 to trigger the left shift of the right unit, thereby realizing that the left unit drives the right unit to shift left synchronously; through the cascading transmission of signals, the synchronous left shift of multiple interlocking units is realized, effectively solving the problem of front and rear misalignment that is easy to occur when multiple units shift left in traditional solutions.
[0046] In this embodiment of the invention, when the movement mode is iterative mode, the movement control of the unit to be moved is implemented based on recursive iteration according to the generated control signal set, including: 601. When the movement mode is iterative mode and the instruction type is a right shift instruction, the right shift button operation signal of the unit to be moved is in a shielded state. In this embodiment, when moving right in iterative mode, the right-moving button operation signal (I2Un) of the unit to be moved is forcibly set to 0, ensuring that the signal source for the unit's movement uniquely depends on the iterative signal of the adjacent interlocking unit, avoiding conflict between the button and the iterative signal, and ensuring the uniqueness of the control logic.
[0047] 602. Determine the interlocking unit based on the interlocking signal of the unit to be moved, wherein the interlocking unit includes the right adjacent unit and / or the left adjacent unit; In this embodiment, symmetrical to the left-shift logic, the two interlocking signals of the unit to be moved are analyzed to determine all interlocking units: If MUn(n-1)=1 (interlocked with the right-hand unit Un-1), then the right-hand unit Un-1 is the interlocking unit; If MUn(n+1)=1 (interlocked with the left unit Un+1), then the left unit Un+1 is the interlocking unit; If both signals are 1, then Un-1 on the right and Un+1 on the left are interlocking units. For example, if MU34=1 and MU45=1 for U4, then the interlocking units are U3 and U5. If the right-side unit Un-1 is also interlocked with Un-2 (MUn-1(n-2)=1), then Un-2 is also an interlocking unit. For example, if U3 is interlocked with U2, then the interlocking units of U4 include U3, U2, and U5. Interlocking units are sorted according to their distance from the unit to be moved. For example, the list of U4 is [U3, U2, U5]. Signals from units that are closer are processed first to improve control response speed.
[0048] 603. When the interlocking unit includes a right adjacent unit and a left adjacent unit, the right shift permission signal and right shift trigger signal of the right adjacent unit, and the safe right shift condition signal of the left adjacent unit are obtained to confirm whether the unit to be moved is allowed to move to the right. In this embodiment, when the interlocking unit includes both right-side (e.g., U3) and left-side (e.g., U5) units, three types of signals need to be acquired to determine whether the unit to be moved (e.g., U4) is allowed to move to the right: The right shift enable signal (V2U3) of the adjacent unit (U3) on the right is used to determine whether the right unit is allowed to shift to the right; The right-shift trigger signal (Q2U3) of the adjacent unit (U3) on the right is used to determine whether the right unit has started to shift to the right; The safe right shift condition signal (I4U5) of the left adjacent unit (U5) is used to determine whether the left unit meets the safety condition, ensuring that U5 can move accordingly when U4 moves to the right; The logic for allowing right shift is: V2Un=V2Un-1∧Q2Un-1∧I4Un+1, which means that the right side is allowed and the right shift has been triggered, while the safety condition on the left side is met.
[0049] 604. If right shift is allowed, control the unit to be moved to shift to the right, and synchronously iterate the right shift trigger signal of the unit to be moved to the adjacent unit on the left, so as to realize the right shift control of the adjacent unit on the left. In this embodiment, if it is determined that right shift is allowed (V2Un=1), then the right shift trigger signal (Q2Un=1) of the unit to be moved is output to drive the unit to shift to the right; at the same time, the signal of Q2Un is iterated to the adjacent interlocking unit on the left, such as Q2U4 of U4 being iterated to U5; the left unit is triggered to shift to the right, thereby realizing that the right unit drives the left unit to shift to the right synchronously; in the right shift logic, the iteration signal is only transmitted to the left interlocking unit to avoid signal reverse loop; the right shift is achieved by the left iteration to realize the coordinated right shift of multiple units, which meets the requirement of synchronous adjustment of multiple units when printing large-size cartons.
[0050] In this embodiment of the invention, when a configuration modification instruction is received, adjusting the signal system of the corresponding mobile unit according to the unit combination information in the configuration modification instruction includes: 701. When a configuration modification instruction is received, an interlocking signal status table is constructed based on the unit combination information in the configuration modification instruction, and the interlocking signal status table is written into a dedicated register. In this embodiment, the unit combination information in the configuration modification instruction is converted into an interlocking signal status table. The resulting interlocking signal status table adopts a structured data format, which is convenient for program parsing and can avoid the problem of misunderstanding caused by text description in traditional solutions. The interlocking signal status table is written into a dedicated register, which can only be written to by the configuration modification program and read by other programs to avoid accidental modification, ensure the security of the interlocking status, and reduce the risk of misoperation.
[0051] 702. Based on the constructed interlocking signal status table, adjust the interlocking signals in the signal system of the corresponding mobile unit, and based on the adjusted interlocking signals, modify the input signals and iteration condition signals of the signal system accordingly; In this embodiment, firstly, based on the interlocking signal status table, the interlocking signal status within the corresponding unit signal system is modified, such as changing MU34 from 0 to 1 and MU23 from 1 to 0; then, based on the adjusted interlocking signals, the input signals and iteration condition signals are modified: Input signal modification: If a new interlock is added between units (e.g., MU34=1), the input signal of the unit to be moved (e.g., U4) needs to synchronously detect the safety signal of the adjacent unit. For example, the safety left shift condition I3U4 of U4 must simultaneously satisfy I3U3=1 of U3. Iteration condition signal modification: If MU34=1, then the left shift enable signal of U4, V1U4=I3U4∧I3U3∧V1U3, instead of the original setting that only depends on its own safety conditions; By automating the modification process, the omissions that easily occur when manually modifying signals are avoided, significantly improving the accuracy of the modification.
[0052] 703. Perform a simulated self-test on the signal system of the adjusted mobile unit, and replace the pre-configured signal system with the signal system that passes the simulated self-test; In this embodiment, a simulated self-test is performed on the adjusted signal system; for example, a simulated movement command is issued, and the test content includes: Is the interlocking signal normal? For example, when MU34=1, can the program correctly identify the interlocking status of U3 and U4? Check if the input signal is normal, such as whether I3U4 of U4 is synchronized with I3U3 of U3; Whether the iterative condition signal is normal, such as whether V1U4 of U4 accurately depends on V1U3 of U3; Check if the output signal is normal. For example, when simulating a left shift operation, check if Q1U3 and Q1U4 of U3 and U4 are set to 1 synchronously. If all tests pass, the original pre-configured signal system will be replaced with the adjusted signal system; if they fail, the specific fault cause will be output (e.g., "U4's V1U4 did not detect U3's V1U3") and the replacement process will be terminated. The effectiveness of the adjusted signal system is ensured by conducting a simulated self-test.
[0053] The unit movement method of the carton printing machine in the embodiments of the present invention has been described above. The unit movement device of the carton printing machine in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 2 One embodiment of the unit moving device of the carton printing machine in this invention includes: The configuration module 801 is used to determine the number of moving units of the carton printing machine and pre-configure a signal system for each moving unit, the signal system including input signals, interlocking signals, iteration condition signals and output signals; The generation module 802 is used to determine the instruction type of the movement instruction and the unit to be moved when a movement instruction is received, and to generate a set of control signals according to the instruction type and the signal system corresponding to the unit to be moved; The control module 803 is used to implement the movement control of the unit to be moved based on the generated control signal set and recursive iteration. The adjustment module 804 is used to adjust the signal system of the corresponding mobile unit according to the unit combination information in the configuration modification instruction when a configuration modification instruction is received.
[0054] Based on the same ideas as the methods in the above embodiments, the apparatus provided in this application can implement the methods in the above embodiments.
[0055] above Figure 2 The unit moving device of the carton printing machine in the embodiments of the present invention will be described in detail from the perspective of modular functional entities. The unit moving device of the carton printing machine in the embodiments of the present invention will be described in detail from the perspective of hardware processing.
[0056] Figure 3This is a schematic diagram of the structure of a unit moving device 900 for a carton printing machine according to an embodiment of the present invention. The unit moving device 900 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 910 (e.g., one or more processors) and a memory 920, and one or more storage media 930 (e.g., one or more mass storage devices) storing application programs 933 or data 932. The memory 920 and storage media 930 can be temporary or persistent storage. The program stored in the storage media 930 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the unit moving device 900 of the carton printing machine. Furthermore, the processor 910 may be configured to communicate with the storage media 930 and execute the series of instruction operations in the storage media 930 on the unit moving device 900 of the carton printing machine to implement the steps of the unit moving method for the carton printing machine provided in the above-described method embodiments.
[0057] The unit moving part 900 of the carton printing machine may also include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input / output interfaces 960, and / or one or more operating systems 931, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The illustrated unit moving device structure of the carton printing press does not constitute a limitation on the unit moving device of the carton printing press, and may include more or fewer parts than illustrated, or combine certain parts, or have different part arrangements.
[0058] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a cell movement method for a carton printing press.
[0059] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0060] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium 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.
[0061] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for unit movement in a carton printing machine, characterized in that, include: The number of moving units of the carton printing machine is determined, and a signal system is pre-configured for each moving unit, the signal system including input signals, interlock signals, iteration condition signals and output signals; When a movement command is received, the command type of the movement command and the unit to be moved are determined, and a set of control signals is generated according to the command type and the signal system corresponding to the unit to be moved. Based on the generated set of control signals, the movement control of the unit to be moved is realized through recursive iteration. When a configuration modification instruction is received, the signal system of the corresponding mobile unit is adjusted according to the unit combination information in the configuration modification instruction.
2. The unit movement method of the carton printing machine according to claim 1, characterized in that, The determination of the number of moving units of the carton printing machine and the pre-configuration of a signal system for each moving unit, the signal system including input signals, interlock signals, iteration condition signals, and output signals, including: Determine the number of moving units of the carton printing machine and configure a unique identifier for each moving unit; Each mobile unit is pre-configured with a signal system, and the signal system is associated with a corresponding unique identifier; The signal system includes input signals, interlocking signals, iteration condition signals, and output signals; the input signals include left shift button operation signals, right shift button operation signals, safe left shift condition signals, and safe right shift condition signals; the interlocking signals include left adjacent unit interlocking signals and right adjacent unit interlocking signals; the iteration condition signals include left shift enable signals and right shift enable signals; and the output signals include left shift trigger signals and right shift trigger signals.
3. The unit movement method of the carton printing machine according to claim 2, characterized in that, When a movement command is received, the command type and the unit to be moved are determined. Based on the command type and the signal system corresponding to the unit to be moved, a control signal set is generated, including: When a move instruction is received, the instruction type of the move instruction and the unit to be moved are determined. The instruction type includes a left move instruction and a right move instruction. When the instruction type is a left shift instruction, the left shift button operation signal, safe left shift condition signal, interlock signal, left shift allow signal and left shift trigger signal are obtained from the signal system corresponding to the unit to be moved, so as to construct the control signal set; When the instruction type is a right shift instruction, the right shift button operation signal, safe right shift condition signal, interlock signal, right shift allow signal and right shift trigger signal are obtained from the signal system corresponding to the unit to be moved, so as to construct the control signal set.
4. The unit movement method of the carton printing machine according to claim 3, characterized in that, The process of implementing movement control of the unit to be moved based on the generated control signal set and recursive iteration includes: The movement mode is determined based on the interlocking signal, and the movement mode includes a self-triggered mode and an iterative mode; When the movement mode is self-triggered mode and the instruction type is left-shift instruction, the movement control of the unit to be moved is realized according to the left-shift button operation signal, the left-shift enable signal and the left-shift trigger signal; When the movement mode is self-triggered mode and the instruction type is right-shift instruction, the movement control of the unit to be moved is realized according to the right-shift button operation signal, the right-shift allow signal and the right-shift trigger signal; When the movement mode is iterative mode, the movement control of the unit to be moved is realized based on the generated control signal set and recursive iteration.
5. The unit movement method of the carton printing machine according to claim 4, characterized in that, When the movement mode is iterative mode, the movement control of the unit to be moved is implemented based on recursive iteration according to the generated control signal set, including: When the movement mode is iterative mode and the instruction type is left shift instruction, the left shift button operation signal of the unit to be moved is in a shielded state. The interlocking unit is determined based on the interlocking signal of the unit to be moved, and the interlocking unit includes the left adjacent unit and / or the right adjacent unit; When the interlocking unit includes a left adjacent unit and a right adjacent unit, the left shift permission signal and left shift trigger signal of the left adjacent unit, as well as the safe left shift condition signal of the right adjacent unit, are obtained to confirm whether the unit to be moved is allowed to shift left. If left shift is allowed, the unit to be moved is controlled to shift left, and the left shift trigger signal of the unit to be moved is synchronously iterated to the adjacent unit on the right to achieve left shift control of the adjacent unit on the right.
6. The unit movement method of the carton printing machine according to claim 4, characterized in that, When the movement mode is iterative mode, the movement control of the unit to be moved is implemented based on recursive iteration according to the generated control signal set, including: When the movement mode is iterative mode and the instruction type is a right shift instruction, the right shift button operation signal of the unit to be moved is in a shielded state. The interlocking unit is determined based on the interlocking signal of the unit to be moved, and the interlocking unit includes the right adjacent unit and / or the left adjacent unit; When the interlocking unit includes a right adjacent unit and a left adjacent unit, the right shift permission signal and right shift trigger signal of the right adjacent unit, as well as the safe right shift condition signal of the left adjacent unit, are obtained to confirm whether the unit to be moved is allowed to move to the right. If rightward movement is allowed, the unit to be moved is controlled to move to the right, and the rightward movement trigger signal of the unit to be moved is synchronously iterated to the adjacent unit on the left to realize the rightward movement control of the adjacent unit on the left.
7. The unit movement method of the carton printing machine according to claim 1, characterized in that, When a configuration modification instruction is received, adjusting the signal system of the corresponding mobile unit according to the unit combination information in the configuration modification instruction includes: When a configuration modification instruction is received, an interlocking signal status table is constructed based on the unit combination information in the configuration modification instruction, and the interlocking signal status table is written into a dedicated register. Based on the constructed interlocking signal state table, the interlocking signals in the signal system of the corresponding mobile unit are adjusted, and based on the adjusted interlocking signals, the input signals and iteration condition signals of the signal system are modified accordingly. The signal system of the adjusted mobile unit is simulated and self-tested, and the pre-configured signal system is replaced by the signal system that passes the simulated self-test.
8. A unit moving device for a carton printing machine, characterized in that, include: A configuration module is used to determine the number of moving units of the carton printing machine and pre-configure a signal system for each moving unit, the signal system including input signals, interlock signals, iteration condition signals and output signals; The generation module is used to determine the instruction type of the movement instruction and the unit to be moved when a movement instruction is received, and to generate a set of control signals according to the instruction type and the signal system corresponding to the unit to be moved; The control module is used to control the movement of the unit to be moved based on the generated set of control signals and recursive iteration. The adjustment module is used to adjust the signal system of the corresponding mobile unit according to the unit combination information in the configuration modification instruction when a configuration modification instruction is received.
9. A unit moving device for a carton printing machine, characterized in that, The unit moving part of the carton printing machine includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the unit moving device of the carton printing press to perform the various steps of the unit moving method of the carton printing press as claimed in any one of claims 1-7.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the unit movement method of the carton printing machine as described in any one of claims 1-7.