A color probe positioning precision compensation method and device based on servo speed response time difference calibration
Patent Information
- Application Number
- CN202611228851.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-09
AI Technical Summary
[0005]本申请提供一种基于伺服速度响应时差标定的色标探针定位精度补偿方法及装置,旨在解决现有技术在基于色标检测的周期运动定位过程中,检测与位置采集环节存在响应误差、定位偏差容易受运行速度变化影响以及不同运行工况下定位基准一致性较差的问题
[0060]本申请基于对现有技术问题的进一步分析和研究,认识到现有技术在基于色标检测的周期运动定位过程中,检测与位置采集环节存在响应误差、定位偏差容易受运行速度变化影响以及不同运行工况下定位基准一致性较差的问题,通过伺服驱动器的探针高速硬件接口直接接收色标光电传感器输出的色标检测信号,并基于该色标检测信号触发硬件中断以锁存伺服编码器位置,减少软件扫描及控制程序调度对位置采集时刻的影响,使色标检测至编码器位置锁存过程中的响应特性更加稳定;在此基础上,控制承载同一色标的运动对象分别以不同的第一稳态速度和第二稳态速度运行,利用两个稳态速度下对应锁存位置的位置差值以及两个稳态速度的速度差值,确定自色标被检测至伺服编码器位置完成锁存的硬件响应时差,由此将难以直接获取的响应误差转化为可用于位置补偿的时差参数;在设备运行过程中,再根据该硬件响应时差与当前色标检测信号对应的实时运行速度确定位置补偿量,并利用位置补偿量修正原始锁存位置,使补偿量能够随运动对象运行速度的变化而相应变化,从而减小同一色标在不同运行速度下因检测及位置锁存响应时间所产生的位置偏差,使补偿后的色标定位位置能够作为稳定的定位控制基准,进而解决现有色标定位过程中响应误差难以量化、定位偏差容易受运行速度变化影响以及固定校正参数难以保证不同运行工况下定位基准一致性的问题,提高色标定位的准确性、重复性及不同速度工况下的定位控制稳定性。
Smart Images

Figure CN122883757A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of servo motion control and color mark positioning technology, and in particular to a method and device for compensating the positioning accuracy of a color mark probe based on servo speed response time difference calibration. Background Technology
[0002] In industrial production processes such as printing and packaging, label processing, film conveying, and automatic cutting, it is often necessary to periodically position continuously moving materials or rotating parts to ensure a stable correspondence between printed patterns, cutting positions, or processing areas. Color mark positioning technology identifies color marks set on materials or rotating parts through photoelectric detection devices, and the motion control system determines the corresponding position reference based on the color mark detection signal. It features non-contact detection, fast response speed, and easy integration with automated equipment, and is therefore widely used in continuous conveying and periodic motion equipment.
[0003] In existing color mark positioning processes, the color mark detection signal, from its generation and transmission to its reception by the control system and the formation of valid position data, requires multiple hardware or software processing stages. The response performance, signal transmission status, and equipment operating conditions of each stage can all affect the accuracy of the position data. When the running speed of the object being detected changes, the position error caused by the detection and position acquisition process may also change accordingly, resulting in differences in the position data obtained for the same color mark under different operating conditions. Existing equipment typically reduces positioning errors through manual adjustment or pre-setting calibration parameters. However, such calibration methods are highly dependent on specific operating conditions. When the equipment's operating speed varies significantly or production conditions are frequently adjusted, it is difficult to continuously maintain the consistency of the positioning reference, easily leading to problems such as alignment deviation, cutting position fluctuations, and reduced repeatability accuracy.
[0004] Therefore, in the periodic motion positioning process based on color mark detection, the detection and position acquisition links have response errors, positioning deviations are easily affected by changes in running speed, and the consistency of positioning references under different operating conditions is poor, which have become problems that urgently need to be solved. Summary of the Invention
[0005] This application provides a method and apparatus for compensating the positioning accuracy of a color mark probe based on servo speed response time difference calibration, aiming to solve the problems in the existing technology of periodic motion positioning based on color mark detection, such as response error in the detection and position acquisition links, positioning deviation being easily affected by changes in running speed, and poor consistency of positioning reference under different operating conditions.
[0006] In a first aspect, a method for compensating the positioning accuracy of a color mark probe based on servo speed response time difference calibration is provided, the method comprising:
[0007] The color mark detection signal output by the color mark photoelectric sensor is directly received through the high-speed hardware interface of the servo driver probe, and a hardware interrupt is triggered based on the color mark detection signal to latch the position of the servo encoder.
[0008] In the calibration state, the moving object carrying the same color mark is controlled to run at different first steady-state speeds and second steady-state speeds, and the first latch position corresponding to the color mark at the first steady-state speed and the second latch position corresponding to the second steady-state speed are obtained.
[0009] Based on the position difference between the first latch position and the second latch position, and the speed difference between the first steady-state speed and the second steady-state speed, the hardware response time difference from the detection of the color mark to the completion of latching at the position of the servo encoder is determined;
[0010] In operation, when the current color mark detection signal is triggered, the real-time running speed of the moving object and the corresponding original latch position are obtained;
[0011] The position compensation amount is determined based on the hardware response time difference and the real-time running speed, and the original latch position is corrected based on the position compensation amount to obtain the compensated color mark positioning position. The compensated color mark positioning position is used as the positioning control reference.
[0012] Optionally, in the above scheme, the step of directly receiving the color mark detection signal output by the color mark photoelectric sensor through the high-speed hardware interface of the servo driver's probe, and triggering a hardware interrupt based on the color mark detection signal to latch the servo encoder position, includes:
[0013] By directly connecting the output of the color mark photoelectric sensor to the high-speed hardware interface of the probe, a color mark signal acquisition link is obtained without going through the controller's general input interface and software periodic scanning.
[0014] The color mark detection signal output by the color mark photoelectric sensor is received through the color mark signal acquisition link, and the signal edge of the color mark detection signal is extracted to obtain the hardware interrupt trigger signal.
[0015] The position latching function of the servo driver is triggered by the hardware interrupt trigger signal to obtain the servo encoder position corresponding to the color mark detection signal.
[0016] Optionally, in the above scheme, obtaining the first latch position corresponding to the color mark at the first steady-state speed and the second latch position corresponding to the color mark at the second steady-state speed includes:
[0017] When the moving object is running at the first steady-state speed, the same color mark is controlled to pass through the color mark photoelectric sensor multiple times, and the position of the servo encoder is latched for each color mark detection signal to obtain a first latched position set.
[0018] The first latch position is obtained by averaging the latch positions in the first latch position set.
[0019] When the moving object is running at the second steady-state speed, the same color mark is controlled to pass through the color mark photoelectric sensor multiple times, and the position of the servo encoder is latched for each color mark detection signal to obtain a second latched position set.
[0020] The latch positions in the second latch position set are averaged to obtain the second latch position, and the first latch position and the second latch position are used to determine the hardware response time difference.
[0021] Optionally, in the above scheme, determining the hardware response time difference based on the position difference between the first latch position and the second latch position, and the speed difference between the first steady-state speed and the second steady-state speed, includes:
[0022] Calculate the difference between the second latch position and the first latch position to obtain the position difference;
[0023] Calculate the difference between the second steady-state velocity and the first steady-state velocity to obtain the velocity difference value, wherein the second steady-state velocity is different from the first steady-state velocity;
[0024] The ratio of the position difference to the velocity difference is calculated to obtain the hardware response time difference, which is expressed as:
[0025] t=(P2-P1) / (V2-V1);
[0026] Where t represents the hardware response time difference, P1 represents the first latch position, P2 represents the second latch position, V1 represents the first steady-state speed, and V2 represents the second steady-state speed.
[0027] Optionally, after determining the hardware response time difference, the above scheme further includes:
[0028] Write the hardware response time difference into a preset system register to obtain the response time difference calibration parameters;
[0029] After entering the running state, the response time difference calibration parameter is read from the system register to obtain the position compensation parameter for the current running process;
[0030] The position compensation parameter is correlated with the real-time running speed corresponding to the current color mark detection signal to obtain the position compensation basis corresponding to the current color mark detection signal.
[0031] Optionally, in the above scheme, determining the position compensation amount based on the hardware response time difference and the real-time operating speed, and correcting the original latch position based on the position compensation amount, includes:
[0032] The position compensation amount is obtained by multiplying the hardware response time difference by the real-time operating speed, and the position compensation amount is expressed as:
[0033] ΔP = t × V;
[0034] The original latch position is reverse-corrected based on the position compensation amount to obtain the compensated color mark positioning position, which is expressed as follows:
[0035] P 最终 =Pt×V;
[0036] Where ΔP represents the position compensation amount, t represents the hardware response time difference, V represents the real-time operating speed, and P represents the original latch position. 最终 This indicates the position of the compensated color mark.
[0037] In the above scheme, optionally, the moving object is a rotating roller, the single-turn movement length of the rotating roller is the periodic position length, the position of the servo encoder is cyclically updated within each movement cycle of the rotating roller, and the method further includes:
[0038] Obtain the periodic position length of the rotating roller to obtain a single-cycle position range consisting of the zero position and the periodic position length;
[0039] The position of the servo encoder is periodically characterized according to the single-cycle position range to obtain the periodic position of the color mark in each motion cycle.
[0040] The periodic position is used to obtain the first latch position, the second latch position, and the original latch position, and the single periodic position range is used to perform periodic processing on the compensated color mark positioning position.
[0041] Optionally, in the above scheme, the periodic processing of the compensated color mark positioning position includes:
[0042] The compensated color mark positioning position is compared with the single-cycle position range to obtain the boundary relationship between the compensated color mark positioning position and the single-cycle position range;
[0043] When the boundary relationship characterizes that the compensated color mark positioning position is less than the lower boundary of the single-cycle position range, the compensated color mark positioning position is positively cycle-converted according to the cycle position length to obtain the first cycle-converted position.
[0044] When the boundary relationship characterizes the compensated color mark positioning position to reach or exceed the upper boundary of the single-cycle position range, the compensated color mark positioning position is reversed and converted according to the cycle position length to obtain the second cycle conversion position.
[0045] The compensated color mark positioning position, the first cycle conversion position, or the second cycle conversion position located within the single cycle position range is determined as the cycle color mark positioning position, and the cycle color mark positioning position is used as the positioning control reference.
[0046] Optionally, in the above scheme, using the compensated color mark positioning position as the positioning control reference includes:
[0047] Based on the compensated color mark positioning position, the periodic positioning reference corresponding to the current color mark is determined, and the color mark reference position is obtained;
[0048] The probe trigger position, cutting alignment position, or processing alignment position are determined based on the color mark reference position to obtain the target control position;
[0049] Based on the target control position, a positioning control command is generated, and the positioning control command is used to control the corresponding probe triggering mechanism, cutting mechanism or alignment mechanism to perform positioning actions.
[0050] Secondly, a color mark probe positioning accuracy compensation device based on servo speed response time difference calibration, the device including a rotating roller, a color mark, a color mark photoelectric sensor, a servo motor, a servo driver and a control unit;
[0051] The color mark is set on the rotating roller, and the servo motor is connected to the rotating roller for driving the rotating roller to perform periodic rotational motion. The servo motor is equipped with a servo encoder for detecting the movement position of the rotating roller.
[0052] The servo driver is electrically connected to the servo motor and is provided with a high-speed probe hardware interface. The color mark photoelectric sensor is located in the detection area through which the color mark passes as the rotating roller passes, and the output end of the color mark photoelectric sensor is directly connected to the high-speed probe hardware interface.
[0053] The high-speed hardware interface of the probe is used to receive the color mark detection signal output by the color mark photoelectric sensor, and trigger a hardware interrupt based on the color mark detection signal to latch the position of the servo encoder.
[0054] The control unit is disposed within the servo driver or communicatively connected to the servo driver, and the control unit is used for:
[0055] In the calibration state, the rotating rollers carrying the same color mark are controlled to run at different first steady-state speeds and second steady-state speeds respectively, and the first latching position of the color mark at the first steady-state speed and the second latching position at the second steady-state speed are obtained.
[0056] Based on the position difference between the first latch position and the second latch position, and the speed difference between the first steady-state speed and the second steady-state speed, the hardware response time difference from the detection of the color mark to the completion of latching at the position of the servo encoder is determined;
[0057] In operation, when the current color mark detection signal is triggered, the real-time running speed of the rotating roller and the corresponding original latching position are obtained;
[0058] The position compensation amount is determined based on the hardware response time difference and the real-time running speed. The original latch position is corrected based on the position compensation amount to obtain the compensated color mark positioning position. The compensated color mark positioning position is then used as the positioning control reference.
[0059] Compared with the prior art, this application has at least the following beneficial effects:
[0060] This application, based on further analysis and research of existing technical problems, recognizes that existing technologies in periodic motion positioning based on color mark detection suffer from issues such as response errors in the detection and position acquisition stages, positioning deviations easily affected by changes in running speed, and poor consistency of positioning references under different operating conditions. This application addresses these issues by directly receiving the color mark detection signal output from the color mark photoelectric sensor via the high-speed hardware interface of the servo driver's probe. Based on this color mark detection signal, a hardware interrupt is triggered to latch the servo encoder position, reducing the impact of software scanning and control program scheduling on the position acquisition timing and making the response characteristics more stable during the process from color mark detection to encoder position latching. Furthermore, the application controls the moving object carrying the same color mark to run at different first and second steady-state speeds. Using the position difference between the corresponding latched positions at the two steady-state speeds and the speed difference between the two steady-state speeds, the position of the object since the color mark was detected is determined. The hardware response time difference from the servo encoder position latching is measured, thus converting the response error, which is difficult to obtain directly, into a time difference parameter that can be used for position compensation. During equipment operation, the position compensation amount is determined based on this hardware response time difference and the real-time running speed corresponding to the current color mark detection signal. The original latching position is then corrected using the position compensation amount, so that the compensation amount can change accordingly with the running speed of the moving object. This reduces the position deviation of the same color mark at different running speeds due to the detection and position latching response time, and enables the compensated color mark positioning position to serve as a stable positioning control reference. This solves the problems of difficulty in quantifying response error, easy influence of running speed on positioning deviation, and difficulty in ensuring the consistency of positioning reference under different operating conditions with fixed correction parameters in the existing color mark positioning process. This improves the accuracy, repeatability, and positioning control stability of color mark positioning under different speed conditions. Attached Figure Description
[0061] Figure 1 A flowchart illustrating a method for compensating the positioning accuracy of a color mark probe based on servo speed response time difference calibration, provided in one embodiment of this application;
[0062] Figure 2 A schematic diagram of the hardware structure of a color mark probe positioning accuracy compensation device based on servo speed response time difference calibration is provided in one embodiment of this application;
[0063] Figure 3 This is a schematic diagram illustrating the calibration principle between speed and latch position according to one embodiment of the present application.
[0064] Explanation of reference numerals in the attached diagram: 1. Servo driver; 2. Servo high-speed hardware interface; 3. Color mark photoelectric sensor; 4. Color mark; 5. Rotating roller; 6. Rotation direction. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0066] In one embodiment, such as Figure 1 and Figure 2 As shown, a method for compensating the positioning accuracy of a color mark probe based on servo speed response time difference calibration is provided. Figure 2 This is a schematic diagram of the hardware structure of a color mark probe positioning accuracy compensation device based on servo speed response time difference calibration. Figure 2 As shown, the device includes a servo driver, a high-speed probe hardware interface mounted on the servo driver, a color mark photoelectric sensor, a rotating roller with color marks, and a servo motor for driving the rotating roller to rotate. The servo motor is equipped with a servo encoder, which is used to detect the movement position of the rotating roller. Figure 2 The arc-shaped arrow in the image indicates the rotation direction of the rotating roller, and the color mark periodically passes through the detection area of the color mark photoelectric sensor as the rotating roller rotates.
[0067] The color mark photoelectric sensor is positioned above the rotating roller or at a detection position corresponding to the color mark's movement path. When the color mark enters the detection area, the photoelectric sensor identifies changes in optical characteristics between the color mark and its surrounding area and outputs a color mark detection signal. The output of the color mark photoelectric sensor is directly connected to the probe's high-speed hardware interface, allowing the color mark detection signal to directly trigger the servo driver's hardware interrupt position latch function without passing through the controller's general-purpose input interface and software cycle scanning process.
[0068] The physical length corresponding to a single revolution of the rotating roller is L. The position of the servo encoder is updated cyclically from 0 to L within a single motion cycle. After the rotating roller completes one revolution, the servo encoder position returns from a position close to L to a position close to zero, thus forming a periodic position mode. The same color mark set on the rotating roller passes through the color mark photoelectric sensor once in each motion cycle, thereby forming a periodic color mark detection signal.
[0069] Figure 3 This is a schematic diagram of the velocity-position calibration principle. Figure 3 The horizontal axis represents the servo operating speed V of the moving object, and the vertical axis represents the servo encoder position P latched after the color mark is triggered. Point A represents the first latched position P1 corresponding to the same color mark when the rotating roller is running at the first steady-state speed V1; point B represents the second latched position P2 corresponding to the same color mark when the rotating roller is running at the second steady-state speed V2. The line connecting points A and B is used to characterize the correspondence between the operating speed and the latched position, and the slope of this line corresponds to the hardware response time t from the detection of the color mark to the completion of latching by the servo encoder position.
[0070] In one implementation, a high-speed hardware acquisition link for the color mark detection signal is first established. The output of the color mark photoelectric sensor is directly connected to the high-speed hardware interface of the servo driver's probe, and a hardware interrupt position latch function is enabled in the servo driver. When the color mark enters the detection area of the color mark photoelectric sensor along with the moving object, the color mark photoelectric sensor generates a color mark detection signal. The high-speed hardware interface of the probe responds to the color mark detection signal by triggering a hardware interrupt, and latches the current servo encoder position during the hardware interrupt triggering process.
[0071] Since the color mark detection signal does not go through the controller's software cycle scanning process, the additional delay caused by the software scanning cycle, control task scheduling, and the controller's general input interface can be reduced. The process from the color mark entering the detection area to the servo encoder completing latching mainly retains the inherent hardware response time difference generated by the color mark photoelectric sensor, signal transmission path, and probe high-speed hardware interface, providing a stable signal acquisition basis for subsequent calibration of this hardware response time difference.
[0072] After entering the calibration state, the moving objects carrying the same color mark are controlled to run at different first steady-state speeds V1 and second steady-state speeds V2. Both the first steady-state speed V1 and the second steady-state speed V2 are the running speeds after the moving objects reach a stable running state, and the first steady-state speed V1 and the second steady-state speed V2 are different. When the moving object runs at the first steady-state speed V1, the first latch position P1 corresponding to the same color mark is acquired; when the moving object runs at the second steady-state speed V2, the second latch position P2 corresponding to the same color mark is acquired.
[0073] The hardware response time difference t is determined based on the position difference between the second latch position P2 and the first latch position P1, and the speed difference between the second steady-state speed V2 and the first steady-state speed V1. The hardware response time difference t represents the inherent hardware response time from the moment the color mark is detected by the color mark photoelectric sensor until the probe high-speed hardware interface completes the servo encoder position latching.
[0074] After calibration, the device enters the operating state. When the current color mark detection signal is triggered, the high-speed hardware interface of the probe latches the current servo encoder position to obtain the original latched position P. At the same time, it acquires the real-time running speed V of the moving object at the time the current color mark detection signal is triggered. Based on the hardware response time difference t and the real-time running speed V, the delayed displacement at the current speed is determined, and this delayed displacement is used to correct the original latched position P to obtain the compensated color mark positioning position.
[0075] The compensated color mark positioning position serves as the positioning control reference for probe triggering, cutting alignment, processing alignment, or other periodic positioning actions. When the equipment operating speed changes, the position compensation amount changes synchronously with the real-time operating speed, thereby ensuring that the compensated position of the same color mark remains consistent or tends to be consistent at different operating speeds.
[0076] Through the above implementation method, while preserving the inherent response process of the hardware, the hardware response time difference can be calibrated by utilizing the difference in latching position of the same color mark under different steady-state speeds, and dynamic position compensation can be implemented according to the real-time operating speed. This reduces the speed-related positioning deviation caused by the detection and position latching process, and improves the consistency and repeatability of the color mark positioning reference under different operating conditions.
[0077] The application scenarios of this calibration method are not limited to rotating drum motion. Other reciprocating motions, as long as they can enable the color mark on the moving object to trigger the detection lock position of the color mark photoelectric eye at different uniform speeds, can all be calibrated using this method to calibrate the time difference.
[0078] In one implementation, the signal output type of the color mark photoelectric sensor matches the signal input type of the probe high-speed hardware interface. The color mark photoelectric sensor can generate a level transition signal based on the detected color mark edge, and the probe high-speed hardware interface is configured to identify the rising or falling edge corresponding to the level transition signal. In practical use, rising edge triggering or falling edge triggering can be selected according to the output logic of the color mark photoelectric sensor, and the same trigger edge is maintained during calibration and operation.
[0079] A direct connection is formed between the output of the color mark photoelectric sensor and the high-speed hardware interface of the probe, creating a color mark signal acquisition link. This direct connection means that the color mark detection signal is not first input to the PLC's general-purpose input port, nor does it rely on the PLC software to read the color mark detection status according to a preset scanning cycle. Instead, the high-speed hardware interface of the probe directly detects the signal edge of the color mark detection signal.
[0080] When the high-speed hardware interface of the probe detects a pre-configured signal edge, a hardware interrupt trigger signal is generated. In response to the hardware interrupt trigger signal, the servo driver performs servo encoder position latching, writing the servo encoder position corresponding to the moment of the hardware interrupt trigger into the position latch register. The control unit can read the servo encoder position from the position latch register and use it as the latch position corresponding to the current color mark detection event.
[0081] The hardware interrupt position latching process of the probe's high-speed hardware interface is independent of the controller's main software loop. Even if the controller is performing other control tasks, the position latching is still completed by dedicated hardware logic after the color mark detection signal arrives, thereby reducing the impact of changes in software task load on the timing of color mark position acquisition.
[0082] The above implementation method can reduce the uncertain delays caused by the general input interface, software cycle scanning and control program scheduling, so that the response process between color mark detection and position latching is mainly determined by the relatively stable hardware link, thereby improving the repeatability of latching position and providing a basis for accurate calibration of hardware response time difference.
[0083] In one implementation, before calibrating the hardware response time difference, a fixed color mark set on the moving object is selected as the calibration color mark. During the calibration process, the setting position of the color mark on the moving object is not changed, nor is the detection position of the color mark photoelectric sensor relative to the moving object, to ensure that the first latch position and the second latch position correspond to the same actual detection position.
[0084] The moving object is gradually accelerated to a first steady-state speed V1, and then maintains a constant speed after reaching V1. Each time the moving object completes a motion cycle, the same color mark passes through the detection area of the color mark photoelectric sensor once. For each color mark detection signal, the corresponding servo encoder position is latched through a high-speed hardware interface of the probe, resulting in multiple first speed latched positions, which constitute a first latched position set.
[0085] The average value of each latch position in the first latch position set is used to determine the first latch position P1. By acquiring data multiple times and performing averaging, the impact of color mark edge conditions, photoelectric detection jitter, encoder quantization errors, mechanical vibration, and minor speed fluctuations on the single latch position can be reduced.
[0086] After acquiring the latched position at the first steady-state speed V1, the moving object is controlled to run to the second steady-state speed V2, and then maintains a constant speed after reaching the second steady-state speed V2. For multiple passes of the same color mark at the second steady-state speed V2, the corresponding servo encoder position is latched to obtain the second latched position set.
[0087] The latch positions in the second latch position set are averaged, and the averaged result is determined as the second latch position P2. The first latch position P1 and the second latch position P2 represent the representative latch positions of the same color mark at two different steady-state operating speeds, and are used to determine the hardware response time difference in the subsequent process.
[0088] The first steady-state speed V1 and the second steady-state speed V2 should use different speed values so that the same hardware response time difference produces different delay displacements at the two speeds. The first steady-state speed V1 and the second steady-state speed V2 can be selected according to the allowable operating speed range of the equipment, as long as it can ensure the stable operation of the moving object under the two calibration conditions and reliably obtain the latch position of the same color mark.
[0089] By using the above implementation method, the results of multiple latches of the same color mark at two steady-state speeds are used as calibration data, and the average processing is used to reduce the error of a single detection. This can improve the representativeness of the first latch position and the second latch position, thereby improving the calibration stability of the hardware response time difference and the reliability of the position compensation result.
[0090] In one implementation, according to Figure 3 The velocity-position calibration relationship is shown, and the first steady-state velocity V1, the second steady-state velocity V2, the first latch position P1, and the second latch position P2 are obtained. The first latch position P1 corresponds to... Figure 2 Point A in the middle corresponds to the second latch position P2. Figure 2 Point B in the middle.
[0091] Since both the first latch position P1 and the second latch position P2 correspond to the same color mark, the actual detection position of the color mark remains unchanged. The difference between the two latch positions is mainly formed by the displacement difference caused by the moving object traveling at different speeds within the hardware response time difference. The difference between the second latch position P2 and the first latch position P1 represents the latch position difference under two speed conditions, and the difference between the second steady-state speed V2 and the first steady-state speed V1 represents the running speed difference between two calibration conditions.
[0092] The hardware response time t is calculated using the following formula:
[0093] t = (P2 - P1) / (V2 - V1);
[0094] Where t represents the hardware response time difference from the detection of the color mark to the completion of latching at the position of the servo encoder; P1 represents the first latching position corresponding to the same color mark at the first steady-state speed V1; P2 represents the second latching position corresponding to the same color mark at the second steady-state speed V2; V1 represents the first steady-state speed; and V2 represents the second steady-state speed.
[0095] The first latch position P1, the second latch position P2, the first steady-state speed V1, and the second steady-state speed V2 use corresponding position and speed units. For example, when the servo encoder position is represented by the encoder count value, the running speed is represented by the change in encoder count per unit time; when the servo encoder position is represented by the length value corresponding to the circumferential direction of the rotating roller, the running speed is represented by the corresponding length speed. This ensures that the calculated t has a time dimension.
[0096] Figure 3The line connecting midpoint A and point B reflects the relationship between the latched position and the operating speed, and its slope corresponds to the hardware response time difference t. When the hardware connection relationship, the color mark photoelectric sensor response configuration, and the probe high-speed hardware interface configuration remain unchanged, the hardware response time difference t, as an inherent parameter of the device position latching link, can be used for position compensation at different operating speeds.
[0097] Through the above implementation method, the hardware response time difference, which is difficult to measure directly, is determined by using the position difference and speed difference under two speed conditions. Without setting up an additional high-precision time measurement device, the hardware response process can be quantified into parameters that can participate in position compensation calculation.
[0098] In one implementation, after calculating the hardware response time difference t, the control unit writes the hardware response time difference t into a preset system register. The system register can be located inside the servo driver or in the control unit that is communicatively connected to the servo driver, and is used to store the response time difference calibration parameters corresponding to the current color mark detection link.
[0099] After the hardware response time difference t is written to the system register, the control unit generates a response time difference calibration completion status. When the device switches from the calibration state to the running state, the control unit reads the hardware response time difference t from the system register and uses the read hardware response time difference t as the position compensation parameter for the current running process.
[0100] During continuous production, each time a color mark detection signal is generated, the same hardware response time difference t is invoked. This hardware response time difference t is then correlated with the real-time operating speed corresponding to the current color mark detection signal to determine the delayed displacement under the current speed condition. Since the position compensation amount changes according to the real-time operating speed, it is not necessary to set fixed compensation parameters for each operating speed.
[0101] With the color mark photoelectric sensor, probe high-speed hardware interface, servo driver and corresponding signal connection relationship remaining unchanged, the hardware response time difference t stored in the system register can be called within the full speed range of the device, thereby avoiding manual position compensation debugging after each adjustment of the device's operating speed.
[0102] By implementing the above methods, the hardware response time difference obtained from calibration can be saved as a device parameter and repeatedly called during operation. This enables one-time calibration for use at multiple speeds, reducing the workload of setting and debugging fixed compensation parameters separately under different speed conditions, and lowering equipment debugging and maintenance costs.
[0103] In one implementation, after the device enters normal operation, the control unit continuously acquires the motion status information output by the servo driver. When the color mark photoelectric sensor detects the current color mark, the probe high-speed hardware interface triggers a hardware interrupt based on the color mark detection signal and latches the current servo encoder position to obtain the original latched position P.
[0104] When the current color mark detection signal is triggered, the control unit acquires the real-time running speed V corresponding to the moving object. The real-time running speed V and the original latch position P correspond to the same color mark detection event, so as to determine the position compensation amount based on the actual running speed corresponding to the current color mark detection event.
[0105] After the color mark enters the detection area of the color mark photoelectric sensor, the high-speed hardware interface of the probe completes the servo encoder position latching only after a fixed hardware response time difference t. Within this hardware response time difference t, the moving object continues to run, so the original latched position P lags behind the actual position of the color mark when it is detected. The higher the running speed V, the greater the lag displacement generated within the hardware response time difference t; the lower the running speed V, the smaller the lag displacement.
[0106] The compensated color mark positioning position is calculated according to the following formula:
[0107] P 最终 =Pt×V; where P 最终 The position of the color mark is indicated by the compensated position; P represents the original latch position; t represents the hardware response time difference; V represents the real-time running speed of the moving object when the current color mark detection signal is triggered; t×V represents the displacement caused by the hardware response time difference at the current running speed.
[0108] The control unit subtracts the delay displacement t×V corresponding to the current speed from the original latch position P to obtain the compensated color mark positioning position P. 最终 Therefore, even though the original latch position P may be different when the same color mark is running at low, medium and high speeds, the color mark positioning position obtained after real-time speed dynamic compensation can remain consistent or tend to be consistent.
[0109] By combining the fixed hardware response time difference with the real-time changing operating speed through the above implementation method, the position compensation amount is dynamically adjusted with the operating speed of the equipment, thereby overcoming the problem that fixed position compensation can only be applied to specific operating speeds and reducing the drift of the color mark positioning reference under variable speed conditions.
[0110] In one embodiment, the moving object is a rotating roller, which is driven by a servo motor to perform continuous circumferential rotation. The physical length corresponding to a single revolution of the rotating roller is the periodic position length L, and the position of the servo encoder is updated cyclically from 0 to L in each motion cycle.
[0111] As the rotating roller starts rotating from the zero position, the servo encoder position gradually increases with the movement of the roller. When the rotating roller completes one revolution and reaches the position corresponding to the cycle position length L, the servo encoder position for the next motion cycle is updated again from the zero position. Therefore, the color mark can correspond to the same cycle position value in different motion cycles.
[0112] The control unit acquires the periodic position length L of the rotating roller and establishes a single-cycle position range from the zero position to the periodic position length L based on the periodic position length L. After each latching of the servo encoder position by the high-speed probe hardware interface, the control unit represents the latched position as a periodic position within the single-cycle position range.
[0113] In calibration mode, both the first latch position P1 and the second latch position P2 are characterized using the aforementioned periodic position; in operation mode, the original latch position P is also characterized using the aforementioned periodic position. After dynamic position compensation is completed, the control unit further performs periodic processing on the compensated color mark positioning position according to the single-cycle position range.
[0114] Figure 2 The rotating roller, the color mark mounted on the rotating roller, and the arc-shaped arrow indicating the direction of rotation together illustrate the movement relationship of the color mark as it periodically passes through the detection area of the color mark photoelectric sensor. Each time the color mark passes through the detection area, a color mark detection event is generated, and the corresponding color mark positioning position within that movement cycle is obtained.
[0115] By mapping the color mark latch position and the compensation position to the single-cycle position range of the rotating roller through the above implementation method, the positioning accuracy compensation method can be adapted to the motion characteristics of continuous circular rotation and periodic position cycle, providing a basis for preventing the compensation position from going out of bounds or jumping.
[0116] In one embodiment, after obtaining the compensated color mark positioning position, the control unit compares the compensated color mark positioning position with a single-cycle position range consisting of a length L from the zero position to the cycle position, and determines the boundary relationship between the compensated color mark positioning position and the single-cycle position range based on the comparison result.
[0117] When the compensated color mark positioning position is within the range of a single cycle position, the compensated color mark positioning position is directly determined as the cycle color mark positioning position. For example, if the compensated color mark positioning position is greater than or equal to the zero position and less than the cycle position length L, no cycle conversion is required.
[0118] When the compensated color mark positioning position is less than the lower boundary of the single-cycle position range, it indicates that the original latch position is near the start of the cycle and crosses the zero position after deducting the position compensation amount from the original latch position. At this time, a positive cycle conversion is performed on the compensated color mark positioning position based on the cycle position length L, that is, the cycle position length L is added to the compensated color mark positioning position until the converted position is within the single-cycle position range, thus obtaining the first cycle conversion position.
[0119] When the compensated color mark positioning position reaches or exceeds the upper boundary of the single-cycle position range, the compensated color mark positioning position is reversed according to the cycle position length L. That is, the cycle position length L is subtracted from the compensated color mark positioning position until the converted position is within the single-cycle position range, thus obtaining the second cycle converted position.
[0120] The control unit determines the compensated color mark positioning position, the first cycle conversion position, or the second cycle conversion position within the single-cycle position range as the cycle color mark positioning position, and uses the cycle color mark positioning position as the positioning control reference. Therefore, even if the compensation process causes the position value to cross the zero position or the cycle position length L, the position result can be reconverted to the legal position range of the current cycle.
[0121] The above implementation method can avoid the position cycle characteristics of the rotating roller causing the compensation result to be negative, exceed the cycle range, or cause abnormal jumps at the cycle boundary, thus ensuring the continuity and stability of the color mark positioning position during continuous operation.
[0122] In one implementation, the control unit determines the compensated color mark positioning position or the periodic color mark positioning position obtained through periodic processing as the periodic positioning reference corresponding to the current color mark, and obtains the color mark reference position.
[0123] The color mark reference position is used to indicate the corrected position corresponding to the actual passage of the color mark photoelectric sensor detection area. Since the color mark reference position has eliminated the displacement effect caused by the hardware response time difference at the current operating speed, it can serve as a unified position reference for subsequent probe triggering, cutting alignment, or processing alignment.
[0124] In probe-triggered applications, the control unit determines the probe trigger position based on the color mark reference position. When the servo encoder moves to the position corresponding to the probe trigger position, it controls the probe triggering mechanism to perform detection, marking, or corresponding operations.
[0125] In color mark alignment cutting applications, the control unit determines the cutting alignment position based on the color mark reference position and generates positioning control commands corresponding to the cutting alignment position. When the moving material or rotating roller moves to the cutting alignment position, the control unit controls the cutting mechanism to perform the cutting action so that the cutting position and the color mark maintain a preset process positional relationship.
[0126] In machining alignment applications, the control unit determines the machining alignment position based on the color mark reference position, and uses this position to control the corresponding alignment mechanism to perform printing, labeling, punching, or other periodic machining actions. The color mark reference position can also be applied to equipment scenarios such as continuous motion of rotary rollers, reciprocating periodic positioning, and high-speed color mark detection.
[0127] By implementing the above methods, the color mark positioning position after speed dynamic compensation can be directly used for specific positioning actions, which can reduce the drift of the probe trigger position, cutting position or processing position relative to the same color mark under different running speeds, and improve the consistency of processing position and the repeatability of products.
[0128] In one implementation, Figure 2 The device shown includes a rotating roller, a color mark mounted on the rotating roller, a color mark photoelectric sensor, a servo motor, a servo driver, and a control unit.
[0129] The servo motor is connected to the rotating roller drive and drives the rotating roller to rotate periodically at a set operating speed. The servo motor is equipped with a servo encoder, which is used to detect the movement position of the servo motor and characterize the movement position of the rotating roller through the transmission relationship between the servo motor and the rotating roller.
[0130] The servo driver is electrically connected to the servo motor, used to output drive control signals to the servo motor and acquire position and speed information fed back by the servo encoder. The servo driver is equipped with a high-speed probe hardware interface, which has edge recognition of color mark detection signals and hardware latching function for servo encoder position.
[0131] The color mark is mounted on a rotating roller and moves periodically with it. A color mark photoelectric sensor is positioned within the detection area through which the color mark passes by the rotating roller, outputting a color mark detection signal when the color mark passes through the detection area. The output of the color mark photoelectric sensor is directly connected to the high-speed hardware interface of the probe, allowing the color mark detection signal to directly enter the dedicated high-speed position capture link of the servo driver.
[0132] The control unit can be located inside the servo driver or it can be an external control unit that communicates with the servo driver. The control unit is used to control the rotating roller to run at a first steady-state speed and a second steady-state speed, read the first latch position and the second latch position latched by the high-speed hardware interface of the probe, and determine the hardware response time difference based on the first latch position, the second latch position, the first steady-state speed and the second steady-state speed.
[0133] During operation, the control unit also reads the real-time running speed and original latch position corresponding to the current color mark detection signal, determines the position compensation amount at the current speed based on the hardware response time difference and the real-time running speed, and corrects the original latch position. For the periodic position mode of the rotating roller, the control unit can also perform periodic processing on the compensated color mark positioning position according to the periodic position length L, and output the positioning control reference.
[0134] The hardware response time difference calculation process can be referred to Figure 2 The speed-position calibration relationship is implemented as shown. Point A corresponds to the first steady-state speed V1 and the first latch position P1, and point B corresponds to the second steady-state speed V2 and the second latch position P2. The hardware response time difference t is determined based on points A and B. During operation, the original latch position P is dynamically corrected based on the hardware response time difference t and the current real-time operating speed V.
[0135] With the aforementioned device structure, the color mark detection signal can be directly input from the color mark photoelectric sensor to the high-speed hardware interface of the servo driver's probe, and position latching is completed through hardware interrupts. The control unit can perform hardware response time difference calibration based on the dual-speed latched position and perform real-time dynamic position compensation throughout the entire speed operating range. This device adopts a hardware-software combined implementation, which reduces software scanning delay and, in principle, offsets speed-related positioning deviations caused by inherent hardware response time differences. It has the technical advantages of high positioning accuracy, stable operation, low debugging workload, and wide applicability.
[0136] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A method for compensating the positioning accuracy of a color mark probe based on servo speed response time difference calibration, characterized in that, The method includes: The color mark detection signal output by the color mark photoelectric sensor is directly received through the high-speed hardware interface of the servo driver probe, and a hardware interrupt is triggered based on the color mark detection signal to latch the position of the servo encoder. In the calibration state, the moving object carrying the same color mark is controlled to run at different first steady-state speeds and second steady-state speeds, and the first latch position corresponding to the color mark at the first steady-state speed and the second latch position corresponding to the second steady-state speed are obtained. Based on the position difference between the first latch position and the second latch position, and the speed difference between the first steady-state speed and the second steady-state speed, the hardware response time difference from the detection of the color mark to the completion of latching at the position of the servo encoder is determined; In operation, when the current color mark detection signal is triggered, the real-time running speed of the moving object and the corresponding original latch position are obtained; The position compensation amount is determined based on the hardware response time difference and the real-time running speed, and the original latch position is corrected based on the position compensation amount to obtain the compensated color mark positioning position. The compensated color mark positioning position is used as the positioning control reference.
2. The method according to claim 1, characterized in that, The method of directly receiving the color mark detection signal output by the color mark photoelectric sensor through the high-speed hardware interface of the servo driver probe, and triggering a hardware interrupt based on the color mark detection signal to latch the servo encoder position, includes: By directly connecting the output of the color mark photoelectric sensor to the high-speed hardware interface of the probe, a color mark signal acquisition link is obtained without going through the controller's general input interface and software periodic scanning. The color mark detection signal output by the color mark photoelectric sensor is received through the color mark signal acquisition link, and the signal edge of the color mark detection signal is extracted to obtain the hardware interrupt trigger signal. The position latching function of the servo driver is triggered by the hardware interrupt trigger signal to obtain the servo encoder position corresponding to the color mark detection signal.
3. The method according to claim 1, characterized in that, The step of obtaining the first latch position of the color mark at the first steady-state speed and the second latch position at the second steady-state speed includes: When the moving object is running at the first steady-state speed, the same color mark is controlled to pass through the color mark photoelectric sensor multiple times, and the position of the servo encoder is latched for each color mark detection signal to obtain a first latched position set. The first latch position is obtained by averaging the latch positions in the first latch position set. When the moving object is running at the second steady-state speed, the same color mark is controlled to pass through the color mark photoelectric sensor multiple times, and the position of the servo encoder is latched for each color mark detection signal to obtain a second latched position set. The latch positions in the second latch position set are averaged to obtain the second latch position, and the first latch position and the second latch position are used to determine the hardware response time difference.
4. The method according to claim 1, characterized in that, The step of determining the hardware response time difference based on the position difference between the first latch position and the second latch position, and the speed difference between the first steady-state speed and the second steady-state speed, includes: Calculate the difference between the second latch position and the first latch position to obtain the position difference; Calculate the difference between the second steady-state velocity and the first steady-state velocity to obtain the velocity difference value, wherein the second steady-state velocity is different from the first steady-state velocity; The ratio of the position difference to the velocity difference is calculated to obtain the hardware response time difference, which is expressed as: t=(P2-P1) / (V2-V1); Where t represents the hardware response time difference, P1 represents the first latch position, P2 represents the second latch position, V1 represents the first steady-state speed, and V2 represents the second steady-state speed.
5. The method according to claim 4, characterized in that, After determining the hardware response time difference, the method further includes: Write the hardware response time difference into a preset system register to obtain the response time difference calibration parameters; After entering the running state, the response time difference calibration parameter is read from the system register to obtain the position compensation parameter for the current running process; The position compensation parameter is correlated with the real-time running speed corresponding to the current color mark detection signal to obtain the position compensation basis corresponding to the current color mark detection signal.
6. The method according to claim 1, characterized in that, The step of determining the position compensation amount based on the hardware response time difference and the real-time operating speed, and correcting the original latch position based on the position compensation amount, includes: The position compensation amount is obtained by multiplying the hardware response time difference by the real-time operating speed, and the position compensation amount is expressed as: ΔP = t × V; The original latch position is reverse-corrected based on the position compensation amount to obtain the compensated color mark positioning position, which is expressed as follows: P 最终 =P-t×V; Where ΔP represents the position compensation amount, t represents the hardware response time difference, V represents the real-time operating speed, and P represents the original latch position. 最终 This indicates the position of the compensated color mark.
7. The method according to claim 1, characterized in that, The moving object is a rotating roller, the single-turn movement length of the rotating roller is the periodic position length, and the position of the servo encoder is cyclically updated within each movement cycle of the rotating roller. The method further includes: Obtain the periodic position length of the rotating roller to obtain a single-cycle position range consisting of the zero position and the periodic position length; The position of the servo encoder is periodically characterized according to the single-cycle position range to obtain the periodic position of the color mark in each motion cycle. The periodic position is used to obtain the first latch position, the second latch position, and the original latch position, and the single periodic position range is used to perform periodic processing on the compensated color mark positioning position.
8. The method according to claim 7, characterized in that, The periodic processing of the compensated color mark positioning position includes: The compensated color mark positioning position is compared with the single-cycle position range to obtain the boundary relationship between the compensated color mark positioning position and the single-cycle position range; When the boundary relationship characterizes that the compensated color mark positioning position is less than the lower boundary of the single-cycle position range, the compensated color mark positioning position is positively cycle-converted according to the cycle position length to obtain the first cycle-converted position. When the boundary relationship characterizes the compensated color mark positioning position to reach or exceed the upper boundary of the single-cycle position range, the compensated color mark positioning position is reversed and converted according to the cycle position length to obtain the second cycle conversion position. The compensated color mark positioning position, the first cycle conversion position, or the second cycle conversion position located within the single cycle position range is determined as the cycle color mark positioning position, and the cycle color mark positioning position is used as the positioning control reference.
9. The method according to claim 1, characterized in that, The step of using the compensated color mark positioning position as the positioning control reference includes: Based on the compensated color mark positioning position, the periodic positioning reference corresponding to the current color mark is determined, and the color mark reference position is obtained; The probe trigger position, cutting alignment position, or processing alignment position are determined based on the color mark reference position to obtain the target control position; Based on the target control position, a positioning control command is generated, and the positioning control command is used to control the corresponding probe triggering mechanism, cutting mechanism or alignment mechanism to perform positioning actions.
10. A color mark probe positioning accuracy compensation device based on servo speed response time difference calibration, characterized in that, It includes a rotating roller, color mark, color mark photoelectric sensor, servo motor, servo driver and control unit; The color mark is set on the rotating roller, and the servo motor is connected to the rotating roller for driving the rotating roller to perform periodic rotational motion. The servo motor is equipped with a servo encoder for detecting the movement position of the rotating roller. The servo driver is electrically connected to the servo motor and is provided with a high-speed probe hardware interface. The color mark photoelectric sensor is located in the detection area through which the color mark passes as the rotating roller passes, and the output end of the color mark photoelectric sensor is directly connected to the high-speed probe hardware interface. The high-speed hardware interface of the probe is used to receive the color mark detection signal output by the color mark photoelectric sensor, and trigger a hardware interrupt based on the color mark detection signal to latch the position of the servo encoder. The control unit is disposed within the servo driver or communicatively connected to the servo driver, and the control unit is used for: In the calibration state, the rotating rollers carrying the same color mark are controlled to run at different first steady-state speeds and second steady-state speeds respectively, and the first latching position of the color mark at the first steady-state speed and the second latching position at the second steady-state speed are obtained. Based on the position difference between the first latch position and the second latch position, and the speed difference between the first steady-state speed and the second steady-state speed, the hardware response time difference from the detection of the color mark to the completion of latching at the position of the servo encoder is determined; In operation, when the current color mark detection signal is triggered, the real-time running speed of the rotating roller and the corresponding original latch position are obtained; The position compensation amount is determined based on the hardware response time difference and the real-time running speed. The original latch position is corrected based on the position compensation amount to obtain the compensated color mark positioning position. The compensated color mark positioning position is then used as the positioning control reference.