Cutting control method and device for wire marking machine, wire marking machine and computer storage medium

By setting light-blocking and light-transmitting areas on the code disk of the online marking machine, combined with sensor detection, precise control of the cutting action is achieved, solving the problem of unsatisfactory cutting results and improving cutting accuracy and operating efficiency.

CN119748539BActive Publication Date: 2025-10-31WUHAN JINGCHEN INTELLIGENT IDENTIFICATION TECH CO LTD

Patent Information

Application Number
CN202411954548.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-10-31
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

The cutting action of the wire marking machine is not ideal due to insufficient precision in the position of the cutting blade, which affects the operating efficiency.

Method used

By setting light-blocking and light-transmitting areas on the code disk of the online marking machine, combined with sensor detection, the position of the cutter is accurately determined, and the cutting action is controlled by a stepper motor to ensure accurate positioning of the cutting point.

Benefits of technology

It improves the cutting accuracy and operating efficiency of the wire marking machine and reduces the impact of cumulative errors during the operation of the stepper motor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119748539B_ABST
    Figure CN119748539B_ABST
Patent Text Reader

Abstract

This application provides a cutting control method, apparatus, wire marking machine, and computer storage medium for a wire marking machine. The method includes: when the origin is located at the sensor's position, if a trigger command for a cutting action is detected, controlling a stepper motor to rotate, causing the stepper motor to drive a code disk to rotate in the target rotation direction via a transmission mechanism, and causing the stepper motor to drive a cutter via the transmission mechanism; when the sensor is detected entering the target code disk area where the cutting point corresponding to the cutting action is located, determining the number of steps to be taken based on the target rotation direction corresponding to the cutting action; controlling the stepper motor to rotate based on the number of steps to be taken, causing the cutting point corresponding to the cutting action to rotate to the sensor's position; and ending the cutting action when the cutting point corresponding to the cutting action has rotated to the sensor's position. The embodiments provided by this solution can improve the cutting accuracy of the wire marking machine, thereby improving the machine's operating efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wire marking machine technology, and in particular to a cutting control method, device, wire marking machine and computer storage medium for a wire marking machine. Background Technology

[0002] The cutting actions of a wire marking machine typically include a half-cut and a full-cut, both usually controlled by the same stepper motor. Therefore, it is necessary to accurately identify the current position of the cutter via the stepper motor and adjust the action accordingly to achieve a smooth switch between half-cut and full-cut actions. However, in related technologies, the cutter position may not achieve the expected precision, which could lead to unsatisfactory cutting results or control logic errors, thus affecting the operating efficiency of the wire marking machine. Summary of the Invention

[0003] This application provides a cutting control method, apparatus, wire marking machine, and computer storage medium for a wire marking machine, which can improve the cutting accuracy of the wire marking machine and thus improve its operating efficiency. The above technical solution is as follows:

[0004] In a first aspect, embodiments of this application provide a cutting control method for a wire marking machine. The wire marking machine includes a stepper motor, a sensor, a transmission mechanism, and a cutter. The transmission mechanism includes a code disk, which includes at least a first light-blocking area, a first light-transmitting area, a second light-blocking area, and a second light-transmitting area arranged sequentially in a preset direction. The first light-blocking area, the first light-transmitting area, the second light-blocking area, and the second light-transmitting area form an annular code disk area. The origin corresponding to the sensor is located in the initial code disk area, and the cutting point corresponding to the cutting action is located in the target code disk area. Both the initial code disk area and the target code disk area are arbitrary code disk areas.

[0005] The method includes:

[0006] When the origin is located at the position of the sensor, if a cutting action trigger command is detected, the stepper motor is controlled to rotate based on the target rotation direction corresponding to the cutting action, so that the stepper motor drives the code disk to rotate in the target rotation direction through the transmission mechanism, and drives the cutter to move through the transmission mechanism.

[0007] When the sensor detects that it has entered the target encoder area where the cutting point corresponding to the cutting action is located, the number of steps to be taken is determined based on the target rotation direction corresponding to the cutting action.

[0008] Based on the number of steps to be taken, the stepper motor is controlled to rotate so that the cutting point corresponding to the cutting action rotates to the position of the sensor.

[0009] If the cutting point corresponding to the above cutting action is detected to have rotated to the position of the above sensor, it is determined that the above cutting action has ended.

[0010] In one possible implementation, the cutting action is either a partial cut or a full cut, and the target rotation direction corresponding to the partial cut is opposite to the target rotation direction corresponding to the full cut.

[0011] In one possible implementation, the above method also includes:

[0012] When the origin is located at the location of the sensor, if the trigger command of the cutting action is detected, the area to be traveled from the cutting point corresponding to the cutting action to the target rotation direction corresponding to the cutting action and to the origin is determined, and the number of the encoder areas contained in the area to be traveled is determined, wherein the area to be traveled includes at least two encoder areas.

[0013] The number of times the aforementioned code disk area needs to be changed in the aforementioned code disk area is determined based on the number of such code disk areas contained in the aforementioned area to be traversed.

[0014] Based on the number of changes to be determined, it is determined whether the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located.

[0015] In one possible implementation, determining the number of times the code disk area to be changed in the region to be traversed is based on the number of code disk areas contained in the region to be traversed includes:

[0016] Determine whether the cutting point corresponding to the above cutting action and the above origin are located in the same encoder area;

[0017] If the cutting point and the origin are not located in the same code disk area, the number of code disk areas contained in the area to be traveled is reduced by 1 to obtain the number of times the code disk area to be changed in the area to be traveled.

[0018] When the aforementioned cutting point and the aforementioned origin are located in the same code disk area, the number of code disk areas contained in the aforementioned area to be traversed is taken as the number of times the aforementioned code disk areas in the aforementioned area to be traversed will change.

[0019] In one possible implementation, the determination of whether the sensor has entered the target encoder area where the cutting point corresponding to the cutting action is located, based on the number of changes to be determined, includes:

[0020] When the stepper motor rotates one step, the sensor data at the current moment is collected by the aforementioned sensor.

[0021] Determine the region type corresponding to the above sensor data. The region type corresponding to the above sensor data is the region type that passes through the encoder area of ​​the above sensor at the time of acquisition of the above sensor data.

[0022] When a change in the region type corresponding to the above sensor data is detected, it is determined that the above code disk region has changed, and the number of times the code disk region has changed in the above region to be traveled is updated.

[0023] If the number of changes has reached the number of changes to be determined, it is determined that the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located.

[0024] In one possible implementation, the number of steps to be taken is determined based on the target rotation direction corresponding to the above-mentioned cutting action, including:

[0025] Obtain the preset number of steps between the cutting point corresponding to the above cutting action and the edge point of the target encoder area where the cutting point is located in the above target rotation direction;

[0026] The above-mentioned preset number of steps is determined as the number of steps to be taken.

[0027] In one possible implementation, determining the region type corresponding to the aforementioned sensor data includes:

[0028] Determine whether the above sensor data is greater than a preset sensor data threshold;

[0029] If so, then the region type corresponding to the above sensor data is determined to be the above light-transmitting region type;

[0030] If not, then the region type corresponding to the above sensor data is determined to be the above-mentioned shading region type.

[0031] In one possible implementation, the arc angle of the first light-shielding area is greater than that of the second light-shielding area, and the arc angle of the first light-transmitting area is less than that of the second light-transmitting area.

[0032] The initial code disk area is the second light-blocking area, the target code disk area corresponding to the half-cut action is the first light-blocking area, the target code disk area corresponding to the full-cut action is the first light-blocking area, the target rotation direction corresponding to the half-cut action is clockwise, and the target rotation direction corresponding to the full-cut action is counterclockwise.

[0033] In one possible implementation, after determining that the cutter has completed the cutting action, the method further includes:

[0034] Control the stepper motor to rotate so that the stepper motor drives the cutter and the encoder to rotate in the opposite direction of the target rotation direction through the transmission mechanism until the origin is detected to return to the position of the sensor.

[0035] Secondly, this application provides a cutting control device for a wire marking machine. The wire marking machine includes a stepper motor, a sensor, a transmission mechanism, and a cutter. The transmission mechanism includes a code disk, which includes at least a first light-blocking area, a first light-transmitting area, a second light-blocking area, and a second light-transmitting area arranged sequentially in a preset direction. The first light-blocking area, the first light-transmitting area, the second light-blocking area, and the second light-transmitting area form an annular code disk area. The origin of the sensor is located in the initial code disk area, and the cutting point corresponding to the cutting action is located in the target code disk area. Both the initial code disk area and the target code disk area are arbitrary code disk areas.

[0036] The above-mentioned device includes:

[0037] The first control module is used to control the stepper motor to rotate based on the target rotation direction corresponding to the cutting action when the origin is located at the position of the sensor, and if a trigger command for the cutting action is detected, so that the stepper motor drives the code disk to rotate in the target rotation direction through the transmission mechanism, and drives the cutter to move through the transmission mechanism.

[0038] The first determining module is used to determine the number of steps to be taken based on the target rotation direction corresponding to the cutting action when the sensor is detected to have entered the target code disk area where the cutting point corresponding to the cutting action is located.

[0039] The second control module is used to control the rotation of the stepper motor based on the number of steps to be taken, so that the cutting point corresponding to the cutting action rotates to the position of the sensor.

[0040] The second determining module is used to determine that the cutting action has ended when the cutting point corresponding to the cutting action is detected to have rotated to the position of the sensor.

[0041] In one possible implementation, the cutting action is either a partial cut or a full cut, and the target rotation direction corresponding to the partial cut is opposite to the target rotation direction corresponding to the full cut.

[0042] In one possible implementation, the above-mentioned device further includes:

[0043] The third determining module is used to determine the area to be traveled from the cutting point corresponding to the cutting action to the origin in the direction of rotation of the target corresponding to the cutting action when the origin is located at the position of the sensor, and to determine the number of the code disk areas included in the area to be traveled, wherein the area to be traveled includes at least two code disk areas.

[0044] The fourth determining module is used to determine the number of times the code disk area in the area to be traveled will be changed based on the number of the code disk areas contained in the area to be traveled.

[0045] The fifth determining module is used to determine, based on the number of changes to be determined, whether the sensor has been detected entering the target code disk area where the cutting point corresponding to the cutting action is located.

[0046] In one possible implementation, the fourth determining module mentioned above includes:

[0047] The first determining unit is used to determine whether the cutting point corresponding to the above cutting action and the above origin are located in the same code disk area.

[0048] The second determining unit is used to subtract 1 from the number of the code disk areas contained in the area to be traveled when the cutting point and the origin are not located in the same code disk area, so as to obtain the number of times the code disk area to be changed in the area to be traveled.

[0049] The third determining unit is used to determine the number of code disk areas contained in the area to be traveled as the number of times the code disk areas in the area to be traveled will change when the cutting point and the origin are located in the same code disk area.

[0050] In one possible implementation, the fifth determining module mentioned above includes:

[0051] The acquisition unit is used to acquire sensor data at the current moment through the aforementioned sensors when the stepper motor is detected to rotate one step.

[0052] The fourth determining unit is used to determine the region type corresponding to the above sensor data, wherein the region type corresponding to the above sensor data is the region type that passes through the code disk area of ​​the above sensor at the time of acquisition of the above sensor data.

[0053] The fifth determining unit is used to determine that the code disk area has changed when a change in the area type corresponding to the above sensor data is detected, and to update the number of times the code disk area has changed in the above area to be traveled.

[0054] The sixth determining unit is used to determine, when the number of changes reaches the number of changes to be changed, the target code disk area where the sensor is detected entering the cutting point corresponding to the cutting action.

[0055] In one possible implementation, the first determining module mentioned above includes:

[0056] The acquisition unit is used to acquire a preset number of steps between the cutting point corresponding to the above cutting action and the edge point of the target code disk area where the cutting point is located in the target rotation direction.

[0057] The seventh determining unit is used to determine the preset number of steps as the number of steps to be taken.

[0058] In one possible implementation, the fourth determining unit mentioned above includes:

[0059] The judgment subunit is used to determine whether the above sensor data is greater than a preset sensor data threshold.

[0060] The first determining subunit is used to determine the region type corresponding to the sensor data as the light-transmitting region type when the sensor data is greater than a preset sensor data threshold.

[0061] The second determining subunit is used to determine the region type corresponding to the sensor data as the light-shielding region type when the sensor data is not greater than a preset sensor data threshold.

[0062] In one possible implementation, the arc angle of the first light-shielding area is greater than that of the second light-shielding area, and the arc angle of the first light-transmitting area is less than that of the second light-transmitting area.

[0063] The initial code disk area is the second light-blocking area, the target code disk area corresponding to the half-cut action is the first light-blocking area, the target code disk area corresponding to the full-cut action is the first light-blocking area, the target rotation direction corresponding to the half-cut action is clockwise, and the target rotation direction corresponding to the full-cut action is counterclockwise.

[0064] In one possible implementation, the above-mentioned device further includes:

[0065] The third control module is used to control the rotation of the stepper motor, so that the stepper motor drives the cutter and the encoder to rotate in the opposite direction of the target rotation direction through the transmission mechanism, until the origin is detected to return to the position of the sensor.

[0066] Thirdly, this application provides a wire marking machine, which includes a stepper motor, a sensor, a transmission mechanism, a cutter, a processor, and a memory. The transmission mechanism includes a code disk, which includes at least a first light-blocking area, a first light-transmitting area, a second light-blocking area, and a second light-transmitting area arranged sequentially in a preset direction. The first light-blocking area, the first light-transmitting area, the second light-blocking area, and the second light-transmitting area form an annular code disk area. The origin corresponding to the sensor is located in the initial code disk area, and the cutting point corresponding to the cutting action is located in the target code disk area. Both the initial code disk area and the target code disk area are arbitrary code disk areas.

[0067] The aforementioned memory stores a computer program adapted to be loaded by the aforementioned processor and execute the steps of the method provided by the first aspect of the embodiments of this application or any possible implementation thereof.

[0068] Fourthly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the steps of the method provided by the first aspect of the embodiments of this application or any possible implementation thereof.

[0069] In this embodiment, the wire marking machine includes a stepper motor, a sensor, a transmission mechanism, and a cutter. The transmission mechanism includes a code disk, which includes at least a first light-blocking area, a first light-transmitting area, a second light-blocking area, and a second light-transmitting area arranged sequentially in a preset direction. The first light-blocking area, the first light-transmitting area, the second light-blocking area, and the second light-transmitting area form a ring-shaped code disk area. The origin corresponding to the sensor is located in the initial code disk area, and the cutting point corresponding to the cutting action is located in the target code disk area. Both the initial code disk area and the target code disk area are arbitrary code disk areas. By controlling the machine when the origin is located at the position of the sensor, if a trigger command for the cutting action is detected, the machine will... The stepper motor rotates according to the target rotation direction corresponding to the cutting action, so that the stepper motor drives the code disk to rotate in the target rotation direction through the transmission mechanism, and drives the cutter through the transmission mechanism. When the sensor is detected to enter the target code disk area where the cutting point corresponding to the cutting action is located, the number of steps to be taken is determined based on the target rotation direction corresponding to the cutting action. The stepper motor is controlled to rotate based on the number of steps to be taken, so that the cutting point corresponding to the cutting action rotates to the position of the sensor. When the cutting point corresponding to the cutting action is detected to have rotated to the position of the sensor, it is determined that the cutting action of the cutter has ended. Thus, recording begins when the cutter and sensor are at the origin of the code disk, and the position information of the cutter relative to the code disk can be accurately determined by the sensor's identification of each code disk area. When the transition point between two adjacent code disk areas is detected, the number of steps the stepper motor should continue to advance can be accurately calculated, so that the cutter reaches the ideal cutting point. This reduces the impact of the cumulative error of the stepper motor during operation on the cutting position, thereby improving the cutting accuracy and operating efficiency of the wire marking machine. Attached Figure Description

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

[0071] Figure 1 A schematic diagram of the structure of a wire marking machine provided for an exemplary embodiment of this application;

[0072] Figure 2 A schematic diagram of the code disk area distribution provided for an exemplary embodiment of this application;

[0073] Figure 3A flowchart illustrating a cutting control method for a wire marking machine, provided as an exemplary embodiment of this application;

[0074] Figure 4 A schematic diagram of the code disk area distribution provided for an exemplary embodiment of this application;

[0075] Figure 5 A schematic diagram of the code disk area distribution provided for an exemplary embodiment of this application;

[0076] Figure 6 A flowchart illustrating a cutting control method for a wire marking machine is provided as an exemplary embodiment of this application;

[0077] Figure 7 A schematic diagram of the structure of a cutting control device for a wire marking machine provided as an exemplary embodiment of this application;

[0078] Figure 8 This is a schematic diagram of the structure of a wire marking machine provided for an exemplary embodiment of this application. Detailed Implementation

[0079] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0080] The terms "first," "second," "third," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0081] An exemplary embodiment of this application provides a cutting control method for a wire marking machine, applied to a wire marking machine, wherein the wire marking machine includes a stepper motor, a sensor, a transmission mechanism, and a cutter. The transmission mechanism includes a code disk, which includes at least a first light-blocking area, a first light-transmitting area, a second light-blocking area, and a second light-transmitting area arranged sequentially in a preset direction. The first light-blocking area, the first light-transmitting area, the second light-blocking area, and the second light-transmitting area form an annular code disk area. The origin corresponding to the sensor is located in the initial code disk area, and the cutting point corresponding to the cutting action is located in the target code disk area. The initial code disk area and the target code disk area are both arbitrary code disk areas.

[0082] Optionally, the preset direction can be clockwise or counterclockwise.

[0083] Optionally, the sensor is fixed on a fixed bracket around the code disk, with the detection end of the sensor facing the code disk, for identifying the code disk area passing through the sensor.

[0084] Optionally, the cutter is connected to the stepper motor via the transmission mechanism, and the encoder is connected to the stepper motor via the transmission mechanism.

[0085] Optionally, the cutting action includes a half-cutting action and a full-cutting action, and the cutting points include a first cutting point corresponding to the half-cutting action and a second cutting point corresponding to the full-cutting action. The first cutting point and the second cutting point can be in the same code disk area, in which case there is one target code disk area; the first cutting point and the second cutting point can also be in different code disk areas, in which case there are two target code disk areas.

[0086] Please refer to the following. Figure 1 The example shown is a schematic diagram of the structure of a wire marking machine provided in an embodiment of this application. Figure 1 As shown, the wire marking machine includes a sensor 110, a stepper motor (not shown), a transmission mechanism (not shown), and a cutter (not shown). The transmission mechanism includes a code disk 120, which contains only a first light-blocking area 121, a first light-transmitting area 122, a second light-blocking area 123, and a second light-transmitting area 124 arranged sequentially in a preset direction (e.g., clockwise). The first light-blocking area 121, the first light-transmitting area 122, the second light-blocking area 123, and the second light-transmitting area 124 form a ring-shaped code disk area. The second light-blocking area 123 is the initial code disk area, and the origin 125 corresponding to the sensor 110 is located in the initial code disk area, i.e., the second light-blocking area 123. The target code disk area is the first light-blocking area 121, and the first cutting point 126 corresponding to the half-cutting action and the second cutting point 127 corresponding to the full-cutting action are located in the target code disk area, i.e., the first light-blocking area 121. The four-area design simplifies the code disk structure, avoids complex multi-area designs, helps reduce production and assembly costs, lowers the complexity of the wire marking machine, and makes debugging and maintenance more convenient. Furthermore, it makes the sensor response and data acquisition more intuitive and clear. The sensor only needs to switch between the four areas, without having to deal with more complex area changes, and can more accurately determine the position of the cutting point and the target code disk area, thereby improving positioning accuracy and response speed.

[0087] Please refer to the following. Figure 2 The above-mentioned code disk areas will be explained. Figure 2 A schematic diagram of the code disk area distribution is provided for an exemplary embodiment of this application. Figure 2 The code disk 220 and Figure 1The middle code is consistent with 120. Figure 2 Sensor 210 and Figure 1 The sensor is consistent with sensor 110. For example... Figure 2 As shown, the arc angle of the first light-blocking area 221 can be greater than the arc angle of the second light-blocking area 223, and the arc angle of the first light-transmitting area 222 can be less than the arc angle of the second light-transmitting area 224. Optionally, the arc angle of the first light-blocking area 221 can be 179 degrees, the arc angle of the second light-blocking area 223 can be 22 degrees; the arc angle of the first light-transmitting area 222 can be 30 degrees, and the arc angle of the second light-transmitting area 224 can be 129 degrees.

[0088] In some embodiments, the wire marking machine may further include a controller for controlling the operation of other components and executing the cutting control method of the wire marking machine.

[0089] For details on the cutting control method of the above-mentioned wire marking machine, please refer to [link / reference needed]. Figure 3 The example illustrates a flowchart of a cutting control method for a wire marking machine provided in an embodiment of this application. Figure 3 As shown, the cutting control method of this wire marking machine includes the following S31-S34:

[0090] S31. When the origin is located at the position of the sensor, if a cutting action trigger command is detected, the stepper motor is controlled to rotate based on the target rotation direction corresponding to the cutting action, so that the stepper motor drives the code disk to rotate in the target rotation direction through the transmission mechanism, and the stepper motor drives the cutter to move through the transmission mechanism.

[0091] The stepper motor rotates precisely at predetermined step angles. By accurately controlling the rotation of the stepper motor, the movement of the encoder disk and the cutter can be precisely controlled. The encoder disk is a rotating disk used in conjunction with a sensor to provide position information. When the stepper motor rotates, the encoder disk rotates, and the sensor reads the position data on the encoder disk to determine the current position. The cutter is the tool that performs the cutting action. The cutter is driven by the stepper motor and moves through a transmission mechanism to cut the object to be cut (such as a conduit).

[0092] In some embodiments, the origin is located at the location of the sensor, which can indicate that the cutter is in a preset cutter return position. After the stepper motor rotates, it can drive the cutter to start moving from the cutter return position to perform the cutting action.

[0093] In some embodiments, the cutting action described above is a partial cutting action or a full cutting action. The triggering instruction for the cutting action can be a first triggering instruction for a partial cutting action or a second triggering instruction for a full cutting action. The triggering instruction for the cutting action can be a command or signal used to start the cutting action, specifically a hardware input, a sensor state change, or a triggering condition within the program, with the purpose of activating the stepper motor to drive the encoder and cutter to complete the cutting action.

[0094] In some embodiments, the target rotation direction corresponding to the cutting action can be clockwise or counterclockwise, and the target rotation direction corresponding to the half-cut action is opposite to the target rotation direction corresponding to the full-cut action. For example, the target rotation direction corresponding to the half-cut action is clockwise, and the target rotation direction corresponding to the full-cut action is counterclockwise; or, the target rotation direction corresponding to the half-cut action is counterclockwise, and the target rotation direction corresponding to the full-cut action is clockwise. Having the target rotation directions corresponding to the half-cut action and the full-cut action opposite can avoid mutual interference between the two cutting actions. Especially in the case of continuous cutting, the opposite rotation directions ensure that there is no physical interference between the two cutting actions, thus making each cutting action smoother and more precise. Furthermore, the opposite rotation directions make it easier to handle the two cutting actions, ensuring that there is no directional confusion during operation, thereby improving the stability of the operation process.

[0095] S32. When the sensor is detected to have entered the target code disk area where the cutting point corresponding to the cutting action is located, the number of steps to be taken is determined based on the target rotation direction corresponding to the cutting action.

[0096] In some embodiments, the number of steps to be taken is the number of steps the stepper motor needs to take after the sensor enters the target code disk area.

[0097] In some embodiments, the sensor data detected by the sensor can be used to determine whether the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located.

[0098] S33. Based on the number of steps to be taken, control the stepper motor to rotate so that the cutting point corresponding to the cutting action rotates to the position of the sensor.

[0099] In some embodiments, after detecting that the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located, and then continuing to control the stepper motor to rotate for a certain number of steps, it can be determined that the cutting point corresponding to the cutting action has rotated to the position of the sensor.

[0100] S34. If the cutting point corresponding to the above cutting action is detected to rotate to the position of the above sensor, it is determined that the above cutting action has ended.

[0101] In some embodiments, the cutting point corresponding to the cutting action is preset based on the depth or cutting angle corresponding to the cutting action. When the cutting point is aligned with the position of the sensor, it can be considered that the cutter has reached the end position corresponding to the cutting action. At this time, the cutting action is considered to be completed, thereby realizing the automatic control of the cutting action.

[0102] In this embodiment, the wire marking machine includes a stepper motor, a sensor, a transmission mechanism, and a cutter. The transmission mechanism includes a code disk, which includes at least a first light-blocking area, a first light-transmitting area, a second light-blocking area, and a second light-transmitting area arranged sequentially in a preset direction. The first light-blocking area, the first light-transmitting area, the second light-blocking area, and the second light-transmitting area form a ring-shaped code disk area. The origin corresponding to the sensor is located in the initial code disk area, and the cutting point corresponding to the cutting action is located in the target code disk area. Both the initial code disk area and the target code disk area are arbitrary code disk areas. By controlling the machine when the origin is located at the position of the sensor, if a trigger command for the cutting action is detected, the machine will... The stepper motor rotates according to the target rotation direction corresponding to the cutting action, so that the stepper motor drives the code disk to rotate in the target rotation direction through the transmission mechanism, and drives the cutter through the transmission mechanism. When the sensor is detected to enter the target code disk area where the cutting point corresponding to the cutting action is located, the number of steps to be taken is determined based on the target rotation direction corresponding to the cutting action. The stepper motor is controlled to rotate based on the number of steps to be taken, so that the cutting point corresponding to the cutting action rotates to the position of the sensor. When the cutting point corresponding to the cutting action is detected to have rotated to the position of the sensor, it is determined that the cutting action of the cutter has ended. Thus, recording begins when the cutter and sensor are at the origin of the code disk, and the position information of the cutter relative to the code disk can be accurately determined by the sensor's identification of each code disk area. When the transition point between two adjacent code disk areas is detected, the number of steps the stepper motor should continue to advance can be accurately calculated, so that the cutter reaches the ideal cutting point. This reduces the impact of the cumulative error of the stepper motor during operation on the cutting position, thereby improving the cutting accuracy and operating efficiency of the wire marking machine.

[0103] In some embodiments, regarding the detection method in S32 where the sensor enters the target code disk area corresponding to the cutting point of the cutting action, the method further includes S301-S303:

[0104] S301. When the origin is located at the position of the sensor, if the trigger command of the cutting action is detected, the area to be traveled from the cutting point corresponding to the cutting action to the origin in the target rotation direction corresponding to the cutting action is determined, and the number of the encoder areas included in the area to be traveled is determined, wherein the area to be traveled includes at least two encoder areas.

[0105] The area to be traversed refers to the region on the encoder disk, specifically the area the encoder disk needs to pass through the sensor during the cutting action. This area includes at least two encoder disk regions, ensuring at least one switch between them throughout the cutting process. This guarantees the sensor detects different types of encoder disk regions at least twice during the entire cutting action. Switching between multiple encoder disk regions allows for more accurate capture of the actual cutting position. Even with minor deviations or errors in the encoder disk regions, switching to the target encoder disk region still yields more accurate positioning results, reducing data fluctuations caused by environmental changes (such as light variations, sensor aging, vibration, etc.) and effectively improving the accuracy and robustness of the cutting action.

[0106] by Figure 4 For example, Figure 4 A schematic diagram of the code disk area distribution is provided for an exemplary embodiment of this application, such as... Figure 4 The wire marking machine includes a sensor 410 and a code disk 420. The code disk 420 contains only a first light-blocking area 421, a first light-transmitting area 422, a second light-blocking area 423, and a second light-transmitting area 424 arranged in a clockwise direction. The second light-blocking area 423 is the initial code disk area, and the origin 425 corresponding to the aforementioned sensor 410 is located in the initial code disk area, i.e., the second light-blocking area 423. The target code disk area is the first light-blocking area 421. The first cutting point 426 corresponding to the half-cutting action and the second cutting point 427 corresponding to the full-cutting action are located in the target code disk area, i.e., the first light-blocking area 421.

[0107] Combination Figure 4 Taking a half-cutting action as an example, assuming the target rotation direction corresponding to the half-cutting action is clockwise, then when the origin 425 is located at the position of sensor 410, if the first trigger command of the half-cutting action is detected, the area 428 to be traveled from the first cutting point 426 corresponding to the half-cutting action towards the origin 425 in the corresponding target rotation direction (clockwise) is determined as... Figure 4 The area within the curved frame is 428.

[0108] S302. Based on the number of the above-mentioned code disk areas contained in the above-mentioned area to be traveled, determine the number of times the above-mentioned code disk areas will be changed in the above-mentioned area to be traveled.

[0109] Among them, the number of times the above-mentioned area type will change in the area to be traveled refers to the number of times the sensor detects the switching between the light-blocking area type and the light-transmitting area type in the area to be traveled, that is, switching from one area type code disk area to another area type code disk area.

[0110] S303. Based on the number of changes to be determined, determine whether the sensor has been detected to have entered the target code disk area where the cutting point corresponding to the cutting action is located.

[0111] In some embodiments, when the number of changes in the code disk area in the area to be traveled reaches the number of changes to be determined, it can be considered that the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located.

[0112] In this embodiment, by setting clearly defined light-blocking and light-transmitting areas on the code disk and combining this with sensor detection, the position on the code disk corresponding to the sensor can be accurately determined. This ensures that the cutting action ends at the precise cutting point, effectively reducing the accumulated positioning error caused by the angular deviation of the stepper motor rotation, thereby improving the overall positioning accuracy. Furthermore, this wire marking machine supports various cutting actions (such as half-cut and full-cut actions) and can determine the corresponding target rotation direction and cutting point according to different cutting requirements, expanding its application range.

[0113] In some embodiments, in S302 above, determining the number of times the code disk area in the area to be traversed will change based on the number of code disk areas included in the area to be traversed includes S3021-S3023:

[0114] S3021. Determine whether the cutting point corresponding to the above cutting action and the above origin are located in the same encoder area.

[0115] S3022. If the cutting point and the origin are not located in the same code disk area, the number of code disk areas contained in the area to be traveled is reduced by 1 to obtain the number of times the code disk area to be changed in the area to be traveled.

[0116] As mentioned above Figure 4For example, the above cutting action is a half-cutting action, and the corresponding target rotation direction is clockwise. The number of code disk areas contained in the area to be traveled 428 is 3, specifically: the first light-blocking area 421, the second light-transmitting area 422, and the second light-blocking area 423. Subtracting 1 from the number of code disk areas contained in the area to be traveled 428, we get that the number of changes required for the above-mentioned area type in the area to be traveled is 2. That is to say, when the code disk area passing through the sensor 410 needs to change 2 times during the half-cutting action, it can be determined that the sensor 410 has entered the target code disk area where the first cutting point 426 corresponding to the above half-cutting action is located, namely the first light-blocking area 421. The two changes of the code disk area are: from the second light-blocking area 423 to the first light-transmitting area 422, and then from the first light-transmitting area 422 to the first light-blocking area 421.

[0117] S3023. When the cutting point and the origin are located in the same code disk area, the number of code disk areas contained in the area to be traveled is taken as the number of times the code disk areas in the area to be traveled will be changed.

[0118] The cutting point corresponding to the cutting action and the origin mentioned above are located in the same code disk area, which means that the initial code disk area and the target code disk area are the same code disk area. Therefore, the area to be traveled includes all the code disk areas in the code disk. This means that during the execution of the cutting action, it is necessary to control all the code disk areas in the code disk to pass through the sensor.

[0119] by Figure 5 For example, Figure 5 A schematic diagram of the code disk area distribution is provided for an exemplary embodiment of this application, such as... Figure 5 The marking machine includes a sensor 510 and a code disk 520. The code disk contains only a first light-blocking area 521, a first light-transmitting area 522, a second light-blocking area 523, and a second light-transmitting area 524 arranged clockwise. The second light-blocking area 523 is the initial code disk area, and the origin 525 corresponding to the aforementioned sensor 510 is located in the initial code disk area, i.e., the second light-blocking area 523. The target code disk area is the first light-blocking area 521. The first cutting point 526 corresponding to the half-cut action is located in the second light-transmitting area 524, and the second cutting point 527 corresponding to the full-cut action is located in the first light-blocking area 521. Taking a full-cut action as an example, with the corresponding target rotation direction being counterclockwise... Figure 5The area to be traversed contains four code disk areas: a first light-blocking area 521, a second light-transmitting area 524, a second light-blocking area 523, and a first light-transmitting area 522. Since the second cutting point 527 and the origin 525 corresponding to the full-cut action are located in the same code disk area, the number 4 code disk areas contained in the area to be traversed is taken as the number of changes required for the aforementioned area type within the area to be traversed. In other words, during the half-cut action, when the code disk area passing through sensor 510 needs to change 4 times, it can be determined that sensor 510 has entered the target code disk area where the second cutting point 527 corresponding to the full-cut action is located, i.e., the first light-blocking area 521. The four changes of the code disk area are as follows: from the first light-blocking area 521 to the first light-transmitting area 522, then from the first light-transmitting area 522 to the second light-blocking area 523, then from the second light-blocking area 523 to the second light-transmitting area 524, and finally from the second light-transmitting area 524 back to the first light-blocking area 521.

[0120] In this embodiment, by accurately calculating the number of changes to the code disk area within the area to be traveled, the positions of the sensor and the cutting point can be controlled more precisely, effectively reducing deviations and errors during the cutting action and improving the accuracy of the cutting.

[0121] In some embodiments, S303, determining whether the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located based on the number of changes to be determined includes S3031-S3034:

[0122] S3031. When the stepper motor is detected to rotate one step, the sensor data at the current moment is collected through the sensor.

[0123] In some embodiments, the sensor may be a photoelectric sensor, which may include a photoelectric detection element for detecting the object to be detected and converting it into an electrical signal output.

[0124] S3032. Determine the region type corresponding to the above sensor data. The region type corresponding to the above sensor data is the region type that passes through the encoder area of ​​the above sensor at the time of acquisition of the above sensor data.

[0125] In some embodiments, in S3032, determining the region type corresponding to the sensor data includes: determining whether the sensor data is greater than a preset sensor data threshold; if yes, determining the region type corresponding to the sensor data as the light-transmitting region type; if no, determining the region type corresponding to the sensor data as the light-shielding region type.

[0126] Among them, the area type of the first shading area and the second shading area is the shading area type; the area type of the first light-transmitting area and the second light-transmitting area is the light-transmitting area type.

[0127] Optionally, the preset sensor data threshold can be a pre-defined sensor data value that distinguishes between shading area types and light-transmitting area types. For example, the preset sensor data threshold can be 1000.

[0128] In this embodiment, by processing different area types (shading area type and light-transmitting area type), it is possible to adapt to complex code disk structures. When the area to be traveled contains multiple code disk areas, the sensor can accurately distinguish different area types and detect the switching of area types. This method provides greater flexibility and a wider range of applications, and can adapt to different code disk designs and cutting requirements.

[0129] S3033. When a change in the region type corresponding to the above sensor data is detected, it is determined that the above code disk region has changed, and the number of times the code disk region has changed in the above-mentioned region to be traveled is updated.

[0130] Since the code disk areas of different area types are arranged alternately, when a change in the area type corresponding to the above sensor data is detected, it is determined that the above code disk area has changed.

[0131] In some implementations, whenever a change is determined to have occurred in the aforementioned code disk area, the current number of changes is incremented by 1 to obtain a new number of changes.

[0132] S3034. If the number of changes has reached the number of changes to be changed, it is determined that the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located.

[0133] When the number of changes reaches the number of changes to be changed mentioned above, it means that the edge point of the target code disk area has reached the position of the sensor, that is, the sensor has entered the target code disk area where the cutting point corresponding to the above cutting action is located.

[0134] In this embodiment, by collecting sensor data in real time and comparing it with a preset threshold, the system can accurately determine the type of the current encoder area (shaded area or transparent area) and detect changes in sensor data in real time. When the area type changes, the system updates the number of changes, enabling rapid detection of changes in the encoder area and timely detection of the sensor entering the target encoder area, thereby executing the corresponding operation. This effectively improves the position detection accuracy of the encoder area and thus improves the accuracy of the cutter operation.

[0135] In some embodiments, in S32, the number of steps to be taken is determined based on the target rotation direction corresponding to the above-mentioned cutting action, including S321-S322:

[0136] S321. Obtain the preset number of steps between the cutting point corresponding to the above cutting action and the edge point of the target encoder area where the cutting point is located in the above target rotation direction.

[0137] S322. Determine the above-mentioned preset number of steps as the number of steps to be taken.

[0138] As mentioned above Figure 4 For example, the preset number of steps between the first cutting point 426 corresponding to the half-cutting action and the target code disk area where the first cutting point 426 is located, i.e., the first light-blocking area 421, in the clockwise direction, is the number of steps to be taken. That is to say, when the edge point A passes the sensor 410, it is recognized by the sensor 410, and it is determined that the sensor 410 has entered the target code disk area where the first cutting point 426 corresponding to the half-cutting action is located, i.e., the first light-blocking area 421. At this time, it can be determined that the number of steps to be taken is the preset number of steps between the first cutting point 426 and the edge point A. This preset number of steps is known data and depends on the structural design of the code disk.

[0139] In this embodiment, by using the number of steps between the cutting point and the edge of the target encoder area as the number of steps to be taken, the rotation steps of the stepper motor can be precisely controlled. When the edge point passes the sensor, the system determines whether the cutting point has been reached based on the preset number of steps, thereby ensuring the accurate execution of the cutting action, avoiding cutting errors caused by inaccurate step counts, effectively preventing cutting deviations caused by too much or too little motor rotation, and thus improving cutting quality.

[0140] Figure 6 This application provides a schematic flowchart of a cutting control method for a wire marking machine as an exemplary embodiment. The cutting control method specifically includes steps S601-S608:

[0141] S601, When the origin is located at the sensor's position, a trigger command for the cutting action is detected.

[0142] S602, control the stepper motor to rotate based on the target rotation direction corresponding to the cutting action.

[0143] Optionally, S601-S602 are the same as S31 above, and will not be repeated here.

[0144] S603. Determine whether the sensor has entered the target encoder area where the cutting point corresponding to the cutting action is located. If not, return to S602 until it is determined that the sensor has entered the target encoder area where the cutting point corresponding to the cutting action is located, then execute S604; if yes, execute S604 directly.

[0145] Optionally, S603 is the same as S3031-S3034 above, and will not be repeated here.

[0146] S604. Obtain the preset number of steps between the cutting point corresponding to the cutting action and the edge point of the target encoder area where the cutting point is located in the target rotation direction.

[0147] S605. Set the preset number of steps as the number of steps to be taken.

[0148] S606, controlling the rotation of a stepper motor based on the number of steps to be moved.

[0149] S607. Determine whether the cutting point corresponding to the cutting action has been detected to rotate to the position of the sensor. If not, return to execute S606 until the cutting point corresponding to the cutting action is detected to rotate to the position of the sensor, then execute S608. If yes, execute S608 directly.

[0150] S608, Confirm that the cutting action of the cutter has been completed.

[0151] Optionally, S604-S608 are the same as S32-S33 above, and will not be repeated here.

[0152] In this embodiment, by determining whether the sensor has entered the target encoder area or whether the cutting point has reached the sensor's location, the position of the cutting point can be detected and calibrated in real time, ensuring that each cut is based on the precise cutting point position, which greatly improves the cutting accuracy and avoids cutting errors caused by position offset.

[0153] In some embodiments, after determining that the cutter has finished performing the cutting action, the method further includes: controlling the stepper motor to rotate so that the stepper motor drives the cutter and the code disk to rotate in the opposite direction of the target rotation direction through the transmission mechanism until the origin is detected to return to the position of the sensor.

[0154] Specifically, when the sensor is detected entering the initial encoder area, the number of steps to be taken is determined based on the opposite direction of the target rotation direction. Then, the stepper motor is controlled to rotate the required number of steps until the origin is detected and the sensor's position is returned. This is the cutter reset operation, allowing the cutter to return to its initial working state, preparing for the next cutting action.

[0155] Optionally, the detection method for the sensor entering the initial code disk area is the same as the detection method for the sensor entering the target code disk area in S301-S305, and will not be described again here.

[0156] In this embodiment, by rotating in the opposite direction until returning to the origin, the cutter is ensured to accurately return to the starting position, providing a reliable reference for subsequent operations and avoiding cutting errors caused by inaccurate reset. Automatic reset reduces equipment failures caused by human error or equipment error, and improves the reliability and working efficiency of the wire marking machine.

[0157] Please refer to the following. Figure 7 This is a schematic diagram of the structure of a cutting control device for a wire marking machine provided in an exemplary embodiment of this application. The wire marking machine includes a stepper motor, a sensor, a transmission mechanism, and a cutter. The transmission mechanism includes a code disk, which includes at least a first light-blocking area, a first light-transmitting area, a second light-blocking area, and a second light-transmitting area arranged sequentially in a preset direction. The first light-blocking area, the first light-transmitting area, the second light-blocking area, and the second light-transmitting area form a ring-shaped code disk area. The origin corresponding to the sensor is located in the initial code disk area, and the cutting point corresponding to the cutting action is located in the target code disk area. Both the initial code disk area and the target code disk area are arbitrary code disk areas. Figure 7 As shown, the cutting control device 700 of the above-mentioned wire marking machine includes:

[0158] The first control module 701 is used to control the stepper motor to rotate based on the target rotation direction corresponding to the cutting action when the origin is located at the position of the sensor and a trigger command for the cutting action is detected, so that the stepper motor drives the code disk to rotate in the target rotation direction through the transmission mechanism, and drives the cutter to move through the transmission mechanism.

[0159] The first determining module 702 is used to determine the number of steps to be taken based on the target rotation direction corresponding to the cutting action when the sensor is detected to have entered the target code disk area where the cutting point corresponding to the cutting action is located.

[0160] The second control module 703 is used to control the rotation of the stepper motor based on the number of steps to be moved, so that the cutting point corresponding to the cutting action rotates to the position of the sensor.

[0161] The second determining module 704 is used to determine that the cutting action has ended when the cutting point corresponding to the cutting action is detected to have rotated to the position of the sensor.

[0162] In one possible implementation, the cutting action is either a partial cut or a full cut, and the target rotation direction corresponding to the partial cut is opposite to the target rotation direction corresponding to the full cut.

[0163] In one possible implementation, the device 700 further includes:

[0164] The third determining module is used to determine the area to be traveled from the cutting point corresponding to the cutting action to the origin in the direction of rotation of the target corresponding to the cutting action when the origin is located at the position of the sensor, and to determine the number of the code disk areas included in the area to be traveled, wherein the area to be traveled includes at least two code disk areas.

[0165] The fourth determining module is used to determine the number of times the code disk area in the area to be traveled will be changed based on the number of the code disk areas contained in the area to be traveled.

[0166] The fifth determining module is used to determine, based on the number of changes to be determined, whether the sensor has been detected entering the target code disk area where the cutting point corresponding to the cutting action is located.

[0167] In one possible implementation, the fourth determining module mentioned above includes:

[0168] The first determining unit is used to determine whether the cutting point corresponding to the above cutting action and the above origin are located in the same code disk area.

[0169] The second determining unit is used to subtract 1 from the number of the code disk areas contained in the area to be traveled when the cutting point and the origin are not located in the same code disk area, so as to obtain the number of times the code disk area to be changed in the area to be traveled.

[0170] The third determining unit is used to determine the number of code disk areas contained in the area to be traveled as the number of times the code disk areas in the area to be traveled will change when the cutting point and the origin are located in the same code disk area.

[0171] In one possible implementation, the fifth determining module mentioned above includes:

[0172] The acquisition unit is used to acquire sensor data at the current moment through the aforementioned sensors when the stepper motor is detected to rotate one step.

[0173] The fourth determining unit is used to determine the region type corresponding to the above sensor data, wherein the region type corresponding to the above sensor data is the region type that passes through the code disk area of ​​the above sensor at the time of acquisition of the above sensor data.

[0174] The fifth determining unit is used to determine that the code disk area has changed when a change in the area type corresponding to the above sensor data is detected, and to update the number of times the code disk area has changed in the above area to be traveled.

[0175] The sixth determining unit is used to determine, when the number of changes reaches the number of changes to be changed, the target code disk area where the sensor is detected entering the cutting point corresponding to the cutting action.

[0176] In one possible implementation, the first determining module 701 includes:

[0177] The acquisition unit is used to acquire a preset number of steps between the cutting point corresponding to the above cutting action and the edge point of the target code disk area where the cutting point is located in the target rotation direction.

[0178] The seventh determining unit is used to determine the preset number of steps as the number of steps to be taken.

[0179] In one possible implementation, the fourth determining unit mentioned above includes:

[0180] The judgment subunit is used to determine whether the above sensor data is greater than a preset sensor data threshold.

[0181] The first determining subunit is used to determine the region type corresponding to the sensor data as the light-transmitting region type when the sensor data is greater than a preset sensor data threshold.

[0182] The second determining subunit is used to determine the region type corresponding to the sensor data as the light-shielding region type when the sensor data is not greater than a preset sensor data threshold.

[0183] In one possible implementation, the arc angle of the first light-shielding area is greater than that of the second light-shielding area, and the arc angle of the first light-transmitting area is less than that of the second light-transmitting area.

[0184] The initial code disk area is the second light-blocking area, the target code disk area corresponding to the half-cut action is the first light-blocking area, the target code disk area corresponding to the full-cut action is the first light-blocking area, the target rotation direction corresponding to the half-cut action is clockwise, and the target rotation direction corresponding to the full-cut action is counterclockwise.

[0185] In one possible implementation, the device 700 further includes:

[0186] The third control module is used to control the rotation of the stepper motor, so that the stepper motor drives the cutter and the encoder to rotate in the opposite direction of the target rotation direction through the transmission mechanism, until the origin is detected to return to the position of the sensor.

[0187] The division of modules in the cutting control device 700 of the wire marking machine described above is for illustrative purposes only. In other embodiments, the cutting control device of the wire marking machine can be divided into different modules as needed to complete all or part of the functions of the cutting control device of the wire marking machine described above. The implementation of each module in the cutting control device of the wire marking machine provided in the embodiments of this specification can be in the form of a computer program. The computer program can run on a terminal or server. The program modules constituted by the computer program can be stored in the memory of the terminal or server. When the computer program is executed by the processor, it implements all or part of the steps of the cutting control method of the wire marking machine described in the embodiments of this specification.

[0188] Please refer to the following. Figure 8 This is a schematic diagram of the structure of a wire marking machine provided in an exemplary embodiment of this application. Figure 8 As shown, the wire marking machine 800 may include: a stepper motor, a sensor, a transmission mechanism, a cutter, a processor 810, and a memory 820. The transmission mechanism includes a code disk, which includes at least a first light-blocking area, a first light-transmitting area, a second light-blocking area, and a second light-transmitting area arranged sequentially in a preset direction. The first light-blocking area, the first light-transmitting area, the second light-blocking area, and the second light-transmitting area form a ring-shaped code disk area. The origin corresponding to the sensor is located in the initial code disk area, and the cutting point corresponding to the cutting action is located in the target code disk area. Both the initial code disk area and the target code disk area are arbitrary code disk areas. The wire marking machine 800 may also include a user interface 830, a network interface 840, and a communication bus 850.

[0189] The processor 810 may include one or more processing cores. The processor 810 connects to various parts within the wire marking machine 800 using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 820, and by calling data stored in the memory 820. Optionally, the processor 810 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 810 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system and applications; the GPU is responsible for rendering and drawing the content required for display on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 810.

[0190] The memory 820 may include random access memory (RAM) or read-only memory. Optionally, the memory 820 may include a non-transitory computer-readable storage medium. The memory 820 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 820 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as receiving functions, control functions, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. Optionally, the memory 820 may also be at least one storage device located remotely from the aforementioned processor 810. Figure 8 As shown, the memory 820, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.

[0191] Optionally, the communication bus 850 is used to realize the connection and communication between these components. The user interface 830 may include a display screen, a camera, and may also include standard wired interfaces and wireless interfaces. The network interface 840 may optionally include standard wired interfaces and wireless interfaces (such as Wi-Fi interfaces).

[0192] exist Figure 8 In the wire marking machine 800 shown, the processor 810 can be used to call program instructions stored in the memory 820 and specifically perform the following operations:

[0193] When the origin is located at the position of the sensor, if a cutting action trigger command is detected, the stepper motor is controlled to rotate based on the target rotation direction corresponding to the cutting action, so that the stepper motor drives the code disk to rotate in the target rotation direction through the transmission mechanism, and drives the cutter to move through the transmission mechanism.

[0194] When the sensor detects that it has entered the target encoder area where the cutting point corresponding to the cutting action is located, the number of steps to be taken is determined based on the target rotation direction corresponding to the cutting action.

[0195] Based on the number of steps to be taken, the stepper motor is controlled to rotate so that the cutting point corresponding to the cutting action rotates to the position of the sensor.

[0196] If the cutting point corresponding to the above cutting action is detected to have rotated to the position of the above sensor, it is determined that the above cutting action has ended.

[0197] In one possible implementation, the cutting action is either a partial cut or a full cut, and the target rotation direction corresponding to the partial cut is opposite to the target rotation direction corresponding to the full cut.

[0198] In one possible implementation, the above method also includes:

[0199] When the origin is located at the location of the sensor, if the trigger command of the cutting action is detected, the area to be traveled from the cutting point corresponding to the cutting action to the target rotation direction corresponding to the cutting action and to the origin is determined, and the number of the encoder areas contained in the area to be traveled is determined, wherein the area to be traveled includes at least two encoder areas.

[0200] The number of times the aforementioned code disk area needs to be changed in the aforementioned code disk area is determined based on the number of such code disk areas contained in the aforementioned area to be traversed.

[0201] Based on the number of changes to be determined, it is determined whether the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located.

[0202] In one possible implementation, determining the number of times the code disk area to be changed in the region to be traversed is based on the number of code disk areas contained in the region to be traversed includes:

[0203] Determine whether the cutting point corresponding to the above cutting action and the above origin are located in the same encoder area;

[0204] If the cutting point and the origin are not located in the same code disk area, the number of code disk areas contained in the area to be traveled is reduced by 1 to obtain the number of times the code disk area to be changed in the area to be traveled.

[0205] When the aforementioned cutting point and the aforementioned origin are located in the same code disk area, the number of code disk areas contained in the aforementioned area to be traversed is taken as the number of times the aforementioned code disk areas in the aforementioned area to be traversed will change.

[0206] In one possible implementation, the determination of whether the sensor has entered the target encoder area where the cutting point corresponding to the cutting action is located, based on the number of changes to be determined, includes:

[0207] When the stepper motor rotates one step, the sensor data at the current moment is collected by the aforementioned sensor.

[0208] Determine the region type corresponding to the above sensor data. The region type corresponding to the above sensor data is the region type that passes through the encoder area of ​​the above sensor at the time of acquisition of the above sensor data.

[0209] When a change in the region type corresponding to the above sensor data is detected, it is determined that the above code disk region has changed, and the number of times the code disk region has changed in the above region to be traveled is updated.

[0210] If the number of changes has reached the number of changes to be determined, it is determined that the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located.

[0211] In one possible implementation, the number of steps to be taken is determined based on the target rotation direction corresponding to the above-mentioned cutting action, including:

[0212] Obtain the preset number of steps between the cutting point corresponding to the above cutting action and the edge point of the target encoder area where the cutting point is located in the above target rotation direction;

[0213] The above-mentioned preset number of steps is determined as the number of steps to be taken.

[0214] In one possible implementation, determining the region type corresponding to the aforementioned sensor data includes:

[0215] Determine whether the above sensor data is greater than a preset sensor data threshold;

[0216] If so, then the region type corresponding to the above sensor data is determined to be the above light-transmitting region type;

[0217] If not, then the region type corresponding to the above sensor data is determined to be the above-mentioned shading region type.

[0218] In one possible implementation, the arc angle of the first light-shielding area is greater than that of the second light-shielding area, and the arc angle of the first light-transmitting area is less than that of the second light-transmitting area.

[0219] The initial code disk area is the second light-blocking area, the target code disk area corresponding to the half-cut action is the first light-blocking area, the target code disk area corresponding to the full-cut action is the first light-blocking area, the target rotation direction corresponding to the half-cut action is clockwise, and the target rotation direction corresponding to the full-cut action is counterclockwise.

[0220] In one possible implementation, after determining that the cutter has completed the cutting action, the method further includes:

[0221] Control the stepper motor to rotate so that the stepper motor drives the cutter and the encoder to rotate in the opposite direction of the target rotation direction through the transmission mechanism until the origin is detected to return to the position of the sensor.

[0222] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps in the above embodiments. If the constituent modules of the cutting control device for the wire marking machine described above are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium.

[0223] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state drives (SSDs)).

[0224] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. Unless otherwise specified, the technical features of this embodiment and its implementation can be combined arbitrarily.

[0225] The above-described embodiments are merely preferred embodiments of this application and are not intended to limit the scope of this application. Any modifications and improvements made by those skilled in the art to the technical solutions of this application without departing from the spirit of this application should fall within the protection scope defined by the claims of this application.

Claims

1. A cutting control method for a wire marking machine, characterized in that, The wire marking machine includes a stepper motor, a sensor, a transmission mechanism, and a cutter. The transmission mechanism includes a code disk, which includes at least a first light-blocking area, a first light-transmitting area, a second light-blocking area, and a second light-transmitting area arranged sequentially in a preset direction. The first light-blocking area, the first light-transmitting area, the second light-blocking area, and the second light-transmitting area form a ring-shaped code disk area. The origin corresponding to the sensor is located in the initial code disk area, and the cutting point corresponding to the cutting action is located in the target code disk area. Both the initial code disk area and the target code disk area are arbitrary code disk areas. The method includes: When the origin is located at the position of the sensor, if a trigger command for a cutting action is detected, the stepper motor is controlled to rotate based on the target rotation direction corresponding to the cutting action, so that the stepper motor drives the code disk to rotate in the target rotation direction through the transmission mechanism, and the stepper motor drives the cutter to move through the transmission mechanism. When the sensor is detected to have entered the target encoder area where the cutting point corresponding to the cutting action is located, the number of steps to be taken is determined based on the target rotation direction corresponding to the cutting action. The stepper motor is controlled to rotate based on the number of steps to be taken, so that the cutting point corresponding to the cutting action rotates to the position of the sensor. If the cutting point corresponding to the cutting action is detected to have rotated to the position of the sensor, it is determined that the cutting action of the cutter has ended.

2. The method as described in claim 1, characterized in that, The cutting action is either a partial cutting action or a full cutting action, and the target rotation direction corresponding to the partial cutting action is opposite to the target rotation direction corresponding to the full cutting action.

3. The method as described in claim 1, characterized in that, The method further includes: If the origin is located at the position of the sensor, and a trigger command for the cutting action is detected, then the area to be traveled from the cutting point corresponding to the cutting action to the target rotation direction corresponding to the cutting action and to the origin is determined, and the number of the code disk areas contained in the area to be traveled is determined, wherein the area to be traveled includes at least two code disk areas. The number of times the code disk area in the area to be traversed is to be changed is determined based on the number of code disk areas contained in the area to be traversed. Based on the number of changes to be determined, it is determined whether the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located.

4. The method as described in claim 3, characterized in that, The determination of the number of times the code disk area in the area to be traversed needs to be changed based on the number of code disk areas contained in the area to be traversed includes: Determine whether the cutting point corresponding to the cutting action and the origin are located in the same encoder area; If the cutting point and the origin are not located in the same code disk area, the number of code disk areas contained in the area to be traveled is reduced by 1 to obtain the number of times the code disk area in the area to be traveled will change. When the cutting point and the origin are located in the same code disk area, the number of code disk areas contained in the area to be traveled is taken as the number of times the code disk area in the area to be traveled will be changed.

5. The method as described in claim 3, characterized in that, The step of determining whether the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located based on the number of changes to be determined includes: When the stepper motor is detected to rotate one step, the sensor data at the current moment is collected through the sensor. Determine the region type corresponding to the sensor data, wherein the region type corresponding to the sensor data is the region type that passes through the encoder area of ​​the sensor at the time of sensor data acquisition; When a change in the region type corresponding to the sensor data is detected, it is determined that the code disk region has changed, and the number of times the code disk region has changed in the region to be traversed is updated. If the number of changes reaches the number of changes to be changed, it is determined that the sensor has entered the target code disk area where the cutting point corresponding to the cutting action is located.

6. The method as described in claim 1, characterized in that, Determining the number of steps to be taken based on the target rotation direction corresponding to the cutting action includes: Obtain the preset number of steps between the cutting point corresponding to the cutting action and the edge point of the target encoder area where the cutting point is located in the target rotation direction; The preset number of steps is determined as the number of steps to be taken.

7. The method as described in claim 5, characterized in that, Determining the region type corresponding to the sensor data includes: Determine whether the sensor data is greater than a preset sensor data threshold; If so, then the region type corresponding to the sensor data is determined to be the light-transmitting region type; If not, then the region type corresponding to the sensor data is determined to be the shading region type.

8. The method as described in claim 2, characterized in that, The arc angle of the first light-blocking area is greater than that of the second light-blocking area, and the arc angle of the first light-transmitting area is less than that of the second light-transmitting area. The initial code disk area is the second light-blocking area, the target code disk area corresponding to the half-cut action is the first light-blocking area, the target code disk area corresponding to the full-cut action is the first light-blocking area, the target rotation direction corresponding to the half-cut action is clockwise, and the target rotation direction corresponding to the full-cut action is counterclockwise.

9. The method as described in claim 1, characterized in that, After determining that the cutter has completed the cutting action, the method further includes: The stepper motor is controlled to rotate so that it drives the cutter and the code disk to rotate in the opposite direction of the target rotation direction through the transmission mechanism until the origin is detected to return to the position of the sensor.

10. A cutting control device for a wire marking machine, characterized in that, The wire marking machine includes a stepper motor, a sensor, a transmission mechanism, and a cutter. The transmission mechanism includes a code disk, which includes at least a first light-blocking area, a first light-transmitting area, a second light-blocking area, and a second light-transmitting area arranged sequentially in a preset direction. The first light-blocking area, the first light-transmitting area, the second light-blocking area, and the second light-transmitting area form a ring-shaped code disk area. The origin corresponding to the sensor is located in the initial code disk area, and the cutting point corresponding to the cutting action is located in the target code disk area. Both the initial code disk area and the target code disk area are arbitrary code disk areas. The device includes: The first control module is configured to, when the origin is located at the position of the sensor, if a trigger command for a cutting action is detected, control the stepper motor to rotate based on the target rotation direction corresponding to the cutting action, so that the stepper motor drives the code disk to rotate in the target rotation direction through the transmission mechanism, and drives the cutter to move through the transmission mechanism. The first determining module is used to determine the number of steps to be taken based on the target rotation direction corresponding to the cutting action when the sensor is detected to enter the target code disk area where the cutting point corresponding to the cutting action is located. The second control module is used to control the stepper motor to rotate based on the number of steps to be taken, so that the cutting point corresponding to the cutting action rotates to the position of the sensor. The second determining module is used to determine that the cutting action of the cutter has ended when the cutting point corresponding to the cutting action is detected to have rotated to the position of the sensor.

11. A wire marking machine, characterized in that, The wire marking machine includes a stepper motor, a sensor, a transmission mechanism, a cutter, a processor, and a memory. The transmission mechanism includes a code disk, which includes at least a first light-blocking area, a first light-transmitting area, a second light-blocking area, and a second light-transmitting area arranged sequentially in a preset direction. The first light-blocking area, the first light-transmitting area, the second light-blocking area, and the second light-transmitting area form a ring-shaped code disk area. The origin corresponding to the sensor is located in the initial code disk area, and the cutting point corresponding to the cutting action is located in the target code disk area. Both the initial code disk area and the target code disk area are arbitrary code disk areas. The memory stores a computer program adapted to be loaded by the processor and to execute the steps of the method as claimed in any one of claims 1 to 9.

12. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the steps of the method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Control system of circle cutting machine

    CN104772782A

  • Cutting information determination method and device, equipment and storage medium

    CN112286140A

Cited By

  • Wire marking machine control method and device, wire marking machine and computer storage medium

    CN119872102A

  • Control method and device of thread numbering machine, thread numbering machine and computer storage medium

    CN119872102B