Labeling equipment, control methods for labeling equipment, and storage media

By introducing product detection and speed detection devices into the labeling equipment, the compensation coefficient and distance are calculated in real time, solving the problem of labeling position deviation when switching between high and low speeds, and achieving high-precision labeling effect.

CN116443382BActive Publication Date: 2026-07-17DONGGUAN GOSUNM MACHINERY EQUIP CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DONGGUAN GOSUNM MACHINERY EQUIP CO LTD
Filing Date
2023-04-26
Publication Date
2026-07-17

Smart Images

  • Figure CN116443382B_ABST
    Figure CN116443382B_ABST
Patent Text Reader

Abstract

This application discloses a labeling device, a control method for the labeling device, and a storage medium, applicable to the field of labeling technology. It includes: a labeling device for outputting labels to a product to be labeled; a product detection device positioned on the movement path of the product to be labeled; a detection drive device for driving the product detection device to approach or move away from the labeling device; a speed detection device for detecting the moving speed of the product to be labeled; and a control device for calculating a compensation coefficient based on a first moving speed of the product in the current detection cycle, a second moving speed in the previous detection cycle, and a preset adjustment distance, and calculating a compensation distance based on the compensation coefficient and the first moving speed. When the moving speed of the product to be labeled changes, this application calculates the compensation distance based on the moving speed before and after the speed change and controls the movement of the product detection device, which can reduce the time lag of various devices caused by speed changes and ensure the consistency of the labeling position when switching between high and low speeds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of labeling technology, specifically to a labeling device, a control method for the labeling device, and a storage medium. Background Technology

[0002] In conventional labeling technology, the product to be labeled moves at a uniform speed. When the product is detected to have reached the labeling position, the label drive pulls the label so that it moves at the same uniform speed as the product, causing the label to peel off and adhere to the product at the same speed. The label drive stops running when the label sensor detects the next label on the label backing paper, completing one labeling cycle. This control method is applicable to most labeling applications, especially when the product moves at a uniform speed.

[0003] Existing technology can enable the label drive device to automatically follow the speed of the user's product conveyor line. However, since it takes a certain amount of time from when the product is detected by the product detection device to when the labeling device starts operating, the label is placed in different positions on the product to be labeled at different speeds. When switching between high and low speeds, the labeling position will deviate, resulting in poor accuracy. Summary of the Invention

[0004] The main objective of this application is to provide a labeling device, a control method for the labeling device, and a storage medium, which aims to improve the labeling accuracy under variable speed conditions.

[0005] In a first aspect, this application provides a labeling device, comprising:

[0006] A labeling device, wherein the labeling device is used to output labels to products to be labeled;

[0007] A product testing device is disposed on the movement path of the product to be labeled;

[0008] A detection driving device, wherein the detection driving device is used to drive the product detection device to approach or move away from the labeling device;

[0009] A speed detection device, used to detect the moving speed of the product to be labeled;

[0010] A control device is configured to calculate a compensation coefficient based on the first moving speed of the product to be labeled in the current detection cycle and the second moving speed in the previous detection cycle, as well as a preset adjustment distance, and to calculate a compensation distance based on the compensation coefficient and the first moving speed of the product to be labeled, and to control the detection drive device to drive the product detection device to approach or move away from the labeling device by the compensation distance.

[0011] The labeling equipment provided according to the first aspect of this application has at least the following beneficial effects: During the operation of the labeling equipment, the moving speed of the product to be labeled is acquired in real time. When the moving speed of the product to be labeled changes, a compensation coefficient is calculated based on the first moving speed and the second moving speed of the product to be labeled, i.e. the moving speed before and after the speed change, and the preset adjustment distance. The compensation distance is further calculated, and the product detection device is controlled to move according to the compensation distance. This can reduce the impact of time lag of various devices caused by speed changes, ensure the consistency of labeling position when switching between high and low speeds, and improve the labeling accuracy of the labeling equipment.

[0012] According to some embodiments of the first aspect of this application, the labeling device includes a label driving device, the speed detection device is an encoder, the encoder is connected to the label driving device via an electronic cam, and the control device is further configured to:

[0013] The encoder is set as the main shaft of the electronic cam, and the tag drive is set as the slave shaft of the electronic cam;

[0014] Obtain the real-time moving speed of the product to be labeled;

[0015] When the product detection device detects the product to be labeled, it controls the label driving device to follow the encoder so that the label moves at the real-time moving speed of the product to be labeled.

[0016] According to some embodiments of the first aspect of this application, the encoder is used to detect the position of the product to be labeled, the labeling device further includes a counter, and the control device is further used for:

[0017] The counter is controlled to increment by 1 every preset time interval;

[0018] When the value of the counter is the first value, the first position of the product to be labeled is obtained;

[0019] When the value of the counter is the second value, the second position of the product to be labeled is obtained;

[0020] When the value of the counter is the third value, the difference between the second position and the first position is calculated;

[0021] When the value of the counter is the fourth value, the third moving speed of the product to be labeled is obtained based on the difference and the preset time.

[0022] When the value of the counter is the fifth value, the compensation distance is calculated based on the third moving speed, the fourth moving speed and the preset debugging distance. The fourth moving speed is the moving speed of the product to be labeled when the counter is counting in the previous round.

[0023] The counter is reset to zero to begin a new round of counting.

[0024] According to some embodiments of the first aspect of this application, the labeling device further includes a label detection device, and the control device is further configured to:

[0025] After the label driving device drives the label to move

[0026] Acquire a tag signal, which is generated by the tag detection device detecting a specific location of the tag;

[0027] Based on the tag signal, the tag driving device is controlled to latch the first latch position of the tag using the highest interrupt level;

[0028] The second latch position is obtained based on the first latch position and the preset stop distance;

[0029] The tag driving device is controlled by an absolute position motion command to drive the tag to stop at the second latching position.

[0030] According to some embodiments of the first aspect of this application, the control device is further configured to:

[0031] After obtaining the tag signal,

[0032] The moving speed of the product to be labeled is obtained, and the moving speed of the product to be labeled is used as the initial running speed of the absolute position movement command.

[0033] According to some embodiments of the first aspect of this application, the specific position is set as the end of the label, and the preset stop distance is less than the distance between two adjacent labels.

[0034] According to some embodiments of the first aspect of this application, the control device is further configured to:

[0035] Before calculating the compensation coefficient...

[0036] The product to be labeled is controlled to move at the first moving speed to obtain the first labeling position on the product to be labeled;

[0037] The product to be labeled is controlled to move at the second moving speed to obtain the second labeling position on the product to be labeled;

[0038] Calculate the difference between the first label position and the second label position to obtain the preset debugging distance.

[0039] Secondly, this application discloses a control method for a labeling device, the labeling device comprising a labeling unit, a product detection unit, a detection drive unit, a speed detection unit, and a control unit, wherein the product detection unit is disposed on the movement path of the product to be labeled, and the control method comprises:

[0040] The first moving speed of the product to be labeled, detected by the speed detection device in the current detection cycle, and the second moving speed of the product to be labeled in the previous detection cycle are obtained.

[0041] The compensation coefficient is calculated based on the first moving speed, the second moving speed, and the preset debugging distance;

[0042] The compensation distance is obtained by multiplying the compensation coefficient and the first moving speed.

[0043] The product testing device is controlled to move closer to or further away from the labeling device at the compensation distance.

[0044] Since the control method of the labeling equipment of the second aspect is applied to the labeling equipment described in any one of the first aspects, it has all the beneficial effects of the first aspect of the present invention.

[0045] According to some embodiments of the second aspect of this application, controlling the product detection device to move closer to or further away from the labeling device at the compensation distance includes:

[0046] When the first moving speed is greater than the second moving speed, the product detection device is controlled to move away from the labeling device away from the compensation distance.

[0047] When the first moving speed is less than the second moving speed, the product detection device is controlled to move closer to the labeling device at the compensation distance.

[0048] Thirdly, the present invention provides a computer storage medium including computer-executable instructions stored thereon, the computer-executable instructions being used to execute a control method for a labeling device as described in the second aspect of the present invention.

[0049] Since the computer storage medium of the third aspect can execute the control method of the labeling device of the second aspect, it has all the beneficial effects of the first aspect of the present invention.

[0050] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is a schematic diagram of the labeling device provided in the embodiments of this application;

[0053] Figure 2 This is a diagram showing the main steps of the control method for the labeling equipment provided in the embodiments of this application;

[0054] Figure 3 This is a step diagram illustrating the compensation distance of the control method for the labeling equipment provided in this application embodiment;

[0055] Figure 4 This is a schematic diagram of the control method for the labeling equipment provided in the embodiments of this application.

[0056] Reference numerals: Labeling device 100; Label driving device 110; Label detection device 120; Product detection device 200; Detection driving device 300; Speed ​​detection device 400. Detailed Implementation

[0057] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that the embodiments of this application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the embodiments of this application with unnecessary detail.

[0058] It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0059] It should also be understood that references to "one embodiment" or "some embodiments" in the specification of embodiments of this application mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0060] In the description of this application, terms such as greater than, less than, and exceeding are understood to exclude the stated number, while terms such as above, below, and within are understood to include the stated number. The use of terms like "first" and "second" is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, the quantity of indicated technical features, or the sequential relationship between indicated technical features. It should be understood that directional descriptions, such as "up," "down," "front," "back," "left," and "right," indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These are solely for the convenience of describing this application and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation; therefore, they should not be construed as limitations on this application.

[0061] In conventional labeling technology, the product to be labeled moves at a uniform speed. When the product is detected to have reached the labeling position, the label drive pulls the label so that it moves at the same uniform speed as the product, causing the label to peel off and adhere to the product at the same speed. The label drive stops running when the label sensor detects the next label on the label backing paper, completing one labeling cycle. This control method is applicable to most labeling applications, especially when the product moves at a uniform speed.

[0062] Existing technology can enable the label drive device to automatically follow the speed of the user's product conveyor line. However, due to the time difference between the detection of the product by the product detection device and the operation of the labeling device, the labeling position will deviate when switching between high and low speeds, resulting in poor accuracy.

[0063] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0064] Reference Figure 1 The labeling equipment provided in this application includes a labeling device 100, a product testing device 200, a testing drive device 300, a speed testing device 400, and a control device.

[0065] The labeling device 100 is used to output labels to the products to be labeled.

[0066] The product testing device 200 is positioned on the movement path of the product to be labeled.

[0067] The detection drive device 300 is used to drive the product detection device 200 to approach or move away from the labeling device 100.

[0068] The speed detection device 400 is used to detect the moving speed of the product to be labeled.

[0069] The control device is used to calculate the compensation coefficient based on the first moving speed of the product to be labeled in the current detection cycle and the second moving speed in the previous detection cycle, as well as the preset adjustment distance, and to calculate the compensation distance based on the compensation coefficient and the first moving speed of the product to be labeled, and to control the detection drive device 300 to drive the product detection device 200 to approach or move away from the labeling device 100 by the compensation distance.

[0070] It should be noted that during the operation of the labeling equipment, the moving speed of the product to be labeled is acquired in real time. When the moving speed of the product to be labeled changes, a compensation coefficient is calculated based on the first and second moving speeds of the product to be labeled, i.e. the moving speeds before and after the speed change, as well as the preset adjustment distance. The compensation distance is then calculated, and the product detection device 200 is controlled to move according to the compensation distance. This can reduce the impact of time lag of various components caused by speed changes, ensure the consistency of the labeling position when switching between high and low speeds, and improve the labeling accuracy of the labeling equipment.

[0071] It should be noted that during the debugging of the labeling equipment, high and low speed position compensation should not be enabled initially. That is, the detection drive device 300 should be stopped, and the product to be labeled should be controlled to run at various speeds. Since there is a certain time between the product detection device 200 detecting the product, the control device sending a command to the labeling device 100, and the labeling device 100 starting, the label's placement on the product will differ at different speeds. This allows us to obtain the label's placement at various speeds and establish a one-to-one correspondence between the product's running speed and the label's placement. The control device finds the two label placement positions based on the product's speed at two adjacent moments and calculates the difference between the two placement positions to obtain the preset debugging distance. The preset debugging distance is the difference between the label's placement position on the product at the first and second running speeds.

[0072] Understandably, referring to Figure 1 The labeling device 100 includes a label driving device 110, and a speed detection device 400, which is an encoder. The encoder is connected to the label driving device 110 via an electronic cam. The control device is also used for:

[0073] Set the encoder as the main shaft of the electronic cam and set the tag drive 110 as the slave shaft of the electronic cam;

[0074] Obtain the real-time moving speed of the product to be labeled.

[0075] When the product detection device 200 detects the product to be labeled, it controls the label drive device 110 to follow the encoder so that the label moves at the real-time moving speed of the product to be labeled.

[0076] It should be noted that, in order to ensure the accuracy of labeling, after the product detection device 200 detects the product to be labeled, it controls the label driving device to drive the label to move at the real-time moving speed of the product to be labeled, so that the product to be labeled and the label remain relatively stationary, thereby improving the accuracy of the labeling position.

[0077] It should be noted that the control device in this application is a programmable logic controller (PLC), a type of digital arithmetic controller with a microprocessor for automated control, which can load control instructions into memory for storage and execution at any time. It employs a programmable memory to store instructions for performing logical operations, sequential control, timing, counting, and arithmetic operations, controlling various types of mechanical equipment or production processes through digital or analog input / output. The PLC control used in this application has an electronic cam function. The electronic cam uses a constructed cam curve to simulate a mechanical cam, achieving the same relative movement between the camshaft and main shaft as in a mechanical cam system. This application sets the encoder as the main shaft of the electronic cam and the label drive device 110 as the slave shaft, enabling the label drive device 110 to follow the encoder. The electronic cam configuration saves instruction receiving and sending time, allowing the label drive device 110 to follow the encoder's movement in a short time, thus improving labeling accuracy.

[0078] Understandably, the encoder is used to detect the position of the product to be labeled, the labeling equipment also includes a counter, and the control device is also used for:

[0079] The control counter increments by 1 every preset time interval.

[0080] When the counter value is the first value, obtain the first position of the product to be labeled.

[0081] When the counter value reaches the second value, obtain the second position of the product to be labeled.

[0082] When the counter value is the third value, calculate the difference between the second position and the first position.

[0083] When the counter value reaches the fourth value, the third moving speed of the product to be labeled is obtained based on the difference and the preset time.

[0084] When the counter value is the fifth value, the compensation distance is calculated based on the third moving speed, the fourth moving speed and the preset debugging distance. The fourth moving speed is the moving speed of the product to be labeled when the counter was counting in the previous round.

[0085] The control counter is reset to zero to start a new round of counting.

[0086] It should be noted that the values ​​of the first, second, third, fourth, and fifth values ​​can be set as needed. The difference between any two adjacent values ​​must be greater than or equal to 1, and the difference between any two adjacent values ​​can be set to be the same or different as needed. For example, the first value can be 1, the second value 2, the third value 3, the fourth value 4, and the fifth value 5, or the first value can be 1, the second value 3, the third value 5, the fourth value 6, and the fifth value 7. Typically, the values ​​are set as follows: the first value is 1, the second value is 2, the third value is 3, the fourth value is 4, and the fifth value is 5.

[0087] It should be noted that, referring to Figure 4 After the labeling equipment starts, the timer interrupt of the programmable logic controller is activated. The timer interrupts once every preset time interval and records the interruption through a counter. Each time the timer interrupts, the counter increments by one. This application sets the preset time to 0.05 seconds. First, the data needs to be initialized by clearing the counter to zero, i.e., D=0. When the counter value is 1, i.e., D=1, the encoder obtains and stores the first position of the product to be labeled, i.e., C2=C3, where C2 is the current position of the product to be labeled and C3 is the storage area for the first position. When the counter value is 2, i.e., D=2, the second position of the product to be labeled is obtained and stored, i.e., C2=C4, where C2 is the current position of the product to be labeled and C4 is the storage area for the second position. When the counter value is 3, i.e., D=3, the difference between the second position and the first position is calculated, which can be expressed as C5=C4-C3. When the counter value is 4, i.e., D=4, the third moving speed of the product to be labeled is obtained based on the difference and the preset time, which can be expressed as C6=C5 / 0.05s. The third moving speed is the speed of the product to be labeled between the counter values ​​of 1 and 2, and can be considered as the moving speed of the product to be labeled at the current moment. When the counter value is 5, i.e., D = 5, the compensation distance is calculated based on the third moving speed, the fourth moving speed, and the preset debugging distance. The compensation distance can be expressed as C11 = C6 * C10, where C10 is the compensation coefficient. Then, the control detection drive device 300 drives the product detection device 200 to move the compensation distance in a direction closer to or further away from the labeling device 100.

[0088] It should be noted that the fourth moving speed refers to the speed at which the product to be labeled moved during the previous round of counting by the counter. There are two possibilities for the fourth moving speed: First, if the counter starts a new round only after completing one round of counting, the fourth moving speed is the speed of the previous round. Second, if the counter performs multiple rounds of counting simultaneously, starting a new round each time it counts, then when the counter value is 1, a new round begins, and the fourth moving speed is the speed of the product to be labeled when the counter value is between 0 and 1 in this round. The second method of speed calculation is more accurate than the first, therefore it is usually used for counting.

[0089] It should be noted that, assuming the third moving speed is 100m / min and the fourth moving speed is 10m / min, during the debugging phase of the labeling equipment, the label pasting position of the product corresponding to the third moving speed is C7 and the label pasting position of the product corresponding to the fourth moving speed is C8. The difference between the label pasting positions corresponding to the third moving speed and the fourth moving speed is calculated to obtain the preset debugging distance C9. Then, based on the preset debugging distance and the third and fourth moving speeds, the compensation coefficient is obtained. The compensation coefficient C10 should satisfy 100*C10-10*C10=C9, so the compensation coefficient C10=C9 / 90.

[0090] Understandably, referring to Figure 1 The labeling device 100 also includes a label detection device 120, and the controlled device is further used for:

[0091] After the tag driving device 110 drives the tag to move, the tag signal is acquired. The tag signal is generated by the tag detection device 120 detecting the specific position of the tag.

[0092] Based on the tag signal, the tag drive device 110 is controlled to latch the first latch position of the tag using the highest interrupt level.

[0093] The second latch position is obtained based on the first latch position and the preset stop distance.

[0094] The tag drive device 110 is controlled by an absolute position motion command to drive the tag to stop at the second latching position.

[0095] It should be noted that after the label driving device 110 drives the label to move, it acquires a label signal. This label signal is generated by the label device detecting a specific position on the label, such as the head, middle, or end of the label. Based on the label signal, the label driving device 110 is controlled to latch the label at the highest interrupt level, establishing a first latch position. A second latch position is obtained based on the first latch position and a preset stop distance. An absolute position motion command is used to control the label driving device 110 to stop at the second latch position. This ensures that the label stops at the same position each time, facilitating the subsequent restart of the label driving device 110 for a new round of labeling.

[0096] It should be noted that this application uses a probe, i.e., a position latching function and an absolute position motion command to stop the tag. The signal line of the tag detection device 120 is connected to the probe trigger interface of the tag driving device 110. When the tag detection device 120 detects a specific position of the tag, it latches the current position of the tag driving device 110, i.e., the current position of the tag, and records it as the first latching position. Based on the first latching position and a preset stopping distance, the second latching position is obtained. Then, the absolute position motion command is used to control the tag driving device 110 to drive the tag to stop at the second latching position, ensuring that the relative position of the tag stopping position with respect to the tag detection device 120 is accurate each time.

[0097] Understandably, the control device is also used for:

[0098] After obtaining the label signal, the moving speed of the product to be labeled is obtained, and the moving speed of the product to be labeled is used as the initial running speed of the absolute position motion command.

[0099] It should be noted that after receiving the label signal, the encoder and the cam movement of the label drive device 110 are discontinued. The label drive device 110 no longer follows the encoder and obtains the current moving speed of the product to be labeled. The moving speed of the product to be labeled is used as the initial running speed of the absolute position movement command to ensure that the label speed does not jump and reduce the impact on the stopping position.

[0100] Understandably, a specific position is set as the end of the label, and the preset stop distance is less than the distance between two adjacent labels.

[0101] It should be noted that when a specific position is set as the end of the label, the preset stop distance is less than the distance between two adjacent labels, so that the utilization of the label can be maximized and label waste can be reduced.

[0102] Understandably, the control device is also used for:

[0103] Before calculating the compensation coefficient,

[0104] Control the product to be labeled to move at a first moving speed to obtain the first labeling position on the product.

[0105] Control the product to be labeled to move at a second moving speed to obtain the second labeling position on the product.

[0106] Calculate the difference between the first and second markers to obtain the preset adjustment distance.

[0107] It should be noted that before calculating the compensation coefficient, during the debugging process of the labeling equipment, high and low speed position compensation is not initially enabled. That is, the detection drive device 300 is stopped, and the product to be labeled is controlled to run at multiple speeds, including a first moving speed and a second moving speed. Since there is a certain time between the product detection device 200 detecting the product to be labeled and the control device sending a command to the labeling device 100, and the labeling device 100 starting, the label's placement on the product differs at different speeds. This allows us to obtain the labeling positions of the product at various speeds. Specifically, when the product moves at the first moving speed, the label is placed at the first labeling position, and when the product moves at the second moving speed, the label is placed at the second labeling position. By mapping the product's running speed to the label's placement position, the control device finds the two label placement positions based on the product's moving speed at two adjacent moments and calculates the difference between the two placement positions to obtain the preset debugging distance.

[0108] It should be noted that, referring to Figure 4After the labeling equipment starts, the timer interrupt of the programmable logic controller is activated. The timer interrupts once every preset time interval and records the interruption through a counter. Each time the timer interrupts, the counter increments by one. This application sets the preset time to 0.05 seconds. First, the data needs to be initialized by clearing the counter to zero, i.e., D=0. When the counter value is 1, i.e., D=1, the encoder obtains and stores the first position of the product to be labeled, i.e., C2=C3, where C2 is the current position of the product to be labeled and C3 is the storage area for the first position. When the counter value is 2, i.e., D=2, the second position of the product to be labeled is obtained and stored, i.e., C2=C4, where C2 is the current position of the product to be labeled and C4 is the storage area for the second position. When the counter value is 3, i.e., D=3, the difference between the second position and the first position is calculated, which can be expressed as C5=C4-C3. When the counter value is 4, i.e., D=4, the third moving speed of the product to be labeled is obtained based on the difference and the preset time, which can be expressed as C6=C5 / 0.05s. The third moving speed is the speed of the product to be labeled between the counter values ​​of 1 and 2, and can be considered as the moving speed of the product to be labeled at the current moment. When the counter value is 5, i.e., D=5, the compensation distance is calculated based on the third moving speed, the fourth moving speed, and the preset debugging distance. The compensation distance can be expressed as C11=C6*C10, where C10 is the compensation coefficient. Furthermore, the label drive device 110 and the encoder are bound together via an electronic cam. The encoder is used as the master axis of the electronic cam (i.e., the encoder is axis #1), and the label drive device 110 is used as the slave axis of the electronic cam (i.e., the label drive device 110 is axis #0). When the product detection device 200 detects a rising edge signal from the product to be labeled, a labeling interrupt is generated. This interrupt has the highest priority in the control device. Additionally, this application uses a programmable logic controller (PLC) as the control device, meaning the labeling interrupt has the highest priority in the PLC. After the labeling interrupt is generated, the cam is activated, causing the label drive device 1100 axis to follow the encoder axis #1. When the label detection device 120 detects a rising edge signal at the end of the label, it immediately latches the current position of the label drive device 1100# as B1. After the position latch is completed, the label drive device 1100# immediately performs an absolute position movement, interrupting the cam movement of the label drive device 1100# and the encoder 1# shaft, and only exiting the cam movement. The cam relationship between the two is not in contact. The label drive device 1100# drives the label to stop at B1+S1, where S1 is the preset stop distance. The speed of this absolute position movement command is V1, and V1 = C6, completing one labeling cycle. When the stop button is pressed, the equipment stops.

[0109] It should be noted that during the operation of the labeling equipment, the moving speed of the product to be labeled is acquired in real time. When the moving speed of the product to be labeled changes, a compensation coefficient is calculated based on the first and second moving speeds of the product to be labeled, i.e. the moving speeds before and after the speed change, as well as the preset adjustment distance. The compensation distance is then calculated, and the product detection device 200 is controlled to move according to the compensation distance. This can reduce the impact of time lag of various components caused by speed changes, ensure the consistency of the labeling position when switching between high and low speeds, and improve the labeling accuracy of the labeling equipment.

[0110] Additionally, refer to Figure 2 This application provides a control method for a labeling device, applied to the aforementioned labeling device, the control method including but not limited to the following steps:

[0111] Step S100: Obtain the first moving speed of the product to be labeled detected by the speed detection device in the current detection cycle and the second moving speed of the product to be labeled in the previous detection cycle.

[0112] Step S200: Calculate the compensation coefficient based on the first moving speed, the second moving speed, and the preset debugging distance.

[0113] Step S300: Calculate the product of the compensation coefficient and the first moving speed to obtain the compensation distance.

[0114] Step S400: Control the product detection device to move closer to or further away from the labeling device by a compensation distance.

[0115] It should be noted that during the operation of the labeling equipment, the moving speed of the product to be labeled is acquired in real time. When the moving speed of the product to be labeled changes, the first moving speed and the second moving speed are acquired. The first moving speed and the second moving speed are the moving speed of the product to be labeled at two adjacent moments. The difference between the first moving speed and the second moving speed is calculated, and the quotient of the preset adjustment distance and the difference is calculated to obtain the compensation coefficient. Then, the product of the compensation coefficient and the first moving speed is calculated to obtain the compensation distance. Finally, the product detection device 200 is controlled to move the compensation distance in a direction that approaches or moves away from the labeling device 100. This can reduce the time lag of each device caused by speed changes, ensure the consistency of the labeling position when switching between high and low speeds, and improve the labeling accuracy of the labeling equipment.

[0116] Understandably, referring to Figure 4 Step S400 includes, but is not limited to, the following steps:

[0117] Step S410: When the first moving speed is greater than the second moving speed, control the product detection device to move away from the labeling device by a compensation distance.

[0118] Step S420: When the first moving speed is less than the second moving speed, control the product detection device to approach the labeling device to compensate for the distance.

[0119] It should be noted that when the first moving speed is greater than the second moving speed, the time it takes for the product to be labeled to travel from the product detection device 200 to below the labeling device 100 is shortened, causing the label to shift towards the product detection device 200. Therefore, the product detection device 200 is controlled to move away from the labeling device 100 by a compensation distance. Conversely, when the first moving speed is less than the second moving speed, the time it takes for the product to be labeled to travel from the product detection device 200 to below the labeling device 100 is increased, causing the label to shift away from the product detection device 200. Therefore, the product detection device 200 is controlled to move towards the labeling device 100 by a compensation distance.

[0120] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program as in steps S100 to S400, which describes a method for controlling a labeling device.

[0121] The processor and memory can be connected via a bus or other means.

[0122] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0123] The non-transitory software program and instructions required to implement the control method of the labeling device in the above embodiments are stored in memory. When executed by a processor, the control method of the labeling device in the above embodiments is executed, for example, the method described above is executed. Figure 2 Method steps S100 to S400.

[0124] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0125] Furthermore, one embodiment of this application also provides a computer-readable storage medium storing computer-executable instructions. These instructions are executed by a processor or controller, causing the processor to perform the control method for the labeling device described above, for example, executing the above-described... Figure 2 Method steps S100 to S400 in the text Figure 3 Steps S410 to S420 in the process.

[0126] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage media, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0127] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application. Furthermore, unless otherwise specified, the embodiments and features described in the embodiments of this application can be combined with each other.

Claims

1. A labeling device, characterized in that, include: A labeling device, wherein the labeling device is used to output labels to products to be labeled; A product testing device is disposed on the movement path of the product to be labeled; A detection driving device, wherein the detection driving device is used to drive the product detection device to approach or move away from the labeling device; A speed detection device, used to detect the moving speed of the product to be labeled; A control device is configured to calculate a compensation coefficient based on the first moving speed of the product to be labeled in the current detection cycle and the second moving speed in the previous detection cycle, as well as a preset adjustment distance, and to calculate a compensation distance based on the compensation coefficient and the first moving speed of the product to be labeled, and to control the detection drive device to drive the product detection device to approach or move away from the labeling device at the compensation distance. The control device is also used for: Before calculating the compensation coefficient, the product to be labeled is controlled to move at the first moving speed to obtain the first labeling position of the label on the product to be labeled; the product to be labeled is controlled to move at the second moving speed to obtain the second labeling position of the label on the product to be labeled; the difference between the first labeling position and the second labeling position is calculated to obtain the preset adjustment distance; The compensation coefficient is calculated according to the following formula: Compensation coefficient = preset adjustment distance ÷ (first moving speed - second moving speed); The compensation distance is calculated according to the following formula: Compensation distance = compensation coefficient × first moving speed.

2. The labeling equipment according to claim 1, characterized in that, The labeling device includes a label driving device, the speed detection device is an encoder, the encoder is connected to the label driving device via an electronic cam, and the control device is further used for: The encoder is set as the main shaft of the electronic cam, and the tag drive is set as the slave shaft of the electronic cam; Obtain the real-time moving speed of the product to be labeled; When the product detection device detects the product to be labeled, it controls the label driving device to follow the encoder so that the label moves at the real-time moving speed of the product to be labeled.

3. The labeling equipment according to claim 2, characterized in that, The encoder is used to detect the position of the product to be labeled, the labeling device further includes a counter, and the control device is further used for: The counter is controlled to increment by 1 every preset time interval; When the value of the counter is the first value, the first position of the product to be labeled is obtained; When the value of the counter is the second value, the second position of the product to be labeled is obtained; When the value of the counter is the third value, the difference between the second position and the first position is calculated; When the value of the counter is the fourth value, the third moving speed of the product to be labeled is obtained based on the difference and the preset time. When the value of the counter is the fifth value, the compensation distance is calculated based on the third moving speed, the fourth moving speed and the preset debugging distance. The fourth moving speed is the moving speed of the product to be labeled when the counter is counting in the previous round. The counter is reset to zero to begin a new round of counting.

4. The labeling equipment according to claim 2, characterized in that, The labeling device further includes a label detection device, and the control device is also used for: After the label driving device drives the label to move Acquire a tag signal, which is generated by the tag detection device detecting a specific location of the tag; Based on the tag signal, the tag driving device is controlled to latch the first latch position of the tag using the highest interrupt level; The second latch position is obtained based on the first latch position and the preset stop distance; The tag driving device is controlled by an absolute position motion command to drive the tag to stop at the second latching position.

5. The labeling equipment according to claim 4, characterized in that, The control device is also used for: After obtaining the tag signal, The moving speed of the product to be labeled is obtained, and the moving speed of the product to be labeled is used as the initial running speed of the absolute position movement command.

6. The labeling equipment according to claim 4, characterized in that, The specific position is set as the end of the label, and the preset stop distance is less than the distance between two adjacent labels.

7. A control method for a labeling device, characterized in that, The labeling equipment includes a labeling device, a product detection device, a detection drive device, a speed detection device, and a control device. The product detection device is positioned on the movement path of the product to be labeled. The control method includes: The first moving speed of the product to be labeled, detected by the speed detection device in the current detection cycle, and the second moving speed of the product to be labeled in the previous detection cycle are obtained. The compensation coefficient is calculated based on the first moving speed, the second moving speed, and the preset debugging distance; The compensation distance is obtained by multiplying the compensation coefficient and the first moving speed. The detection drive device is controlled to drive the product detection device to move closer to or further away from the labeling device at the compensation distance; Before calculating the compensation coefficient, the product to be labeled is controlled to move at the first moving speed to obtain the first labeling position on the product to be labeled; the product to be labeled is controlled to move at the second moving speed to obtain the second labeling position on the product to be labeled; the difference between the first labeling position and the second labeling position is calculated to obtain the preset adjustment distance; The compensation coefficient is calculated according to the following formula: Compensation coefficient = preset adjustment distance ÷ (first moving speed - second moving speed); The compensation distance is calculated according to the following formula: Compensation distance = compensation coefficient × first moving speed.

8. The control method according to claim 7, characterized in that, The control of the product detection device to move closer to or further away from the labeling device at the compensation distance includes: When the first moving speed is greater than the second moving speed, the product detection device is controlled to move away from the labeling device away from the compensation distance. When the first moving speed is less than the second moving speed, the product detection device is controlled to move closer to the labeling device at the compensation distance.

9. A computer storage medium, characterized in that, It includes storing computer-executable instructions for performing a control method for the labeling device as described in claim 7 or 8.