A pointing arm rotating positioning method based on zero position calibration and step count solution

By using a method based on zero-position calibration and step count calculation, and utilizing a reference detector and transmission mechanism, the problem of pointing error accumulation of the guide arm without an encoder was solved, enabling continuous position recalibration of the guide arm and reducing the misjudgment rate and pointing error.

CN123184531APending Publication Date: 2026-11-27SHANGHAI ZEMSO ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611710293.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-11-02
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In the prior art, when the guide arm is driven without an encoder and in an open-loop manner, the pointing error accumulates due to mechanical zero-position deviation and transmission clearance. It is also difficult to distinguish between step loss and clearance change, which causes the pointing error to accumulate over time and makes it impossible to effectively correct the position.

Method used

By using a method based on zero-position calibration and step count calculation, a reference detector and a transmission mechanism are used to approach the same physical edge in both forward and reverse directions. The edge step count is latched, the backlash step count is deducted to determine the zero-position step count, and the step loss is corrected by weighted averaging to achieve continuous recalibration of the guide arm.

Benefits of technology

It enables continuous position recalibration of the guide arm without an encoder, avoids misjudging transmission backlash as step loss, reduces the step loss misjudgment rate, maintains stable pointing error, and is suitable for small guide arms with limited installation space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123184531A_ABST
    Figure CN123184531A_ABST
Patent Text Reader

Abstract

The application discloses a road pointing arm rotating positioning method based on zero position calibration and step number solution, which comprises the following steps: a stepping motor drives a road pointing arm through a transmission mechanism; when a reference mark passes through a reference detector, a motor side step number count and a steering are latched as an edge step number count; the road pointing arm is positively rotated and reversely rotated to approach the same physical edge to obtain a return difference step number; a median value is used as an arm side edge position and a zero position step number is determined; a dead zone with a width of the return difference step number is used to track an arm side equivalent step number and record a gap state, and an actual rotating angle of the road pointing arm is obtained; a half return difference step number is added or subtracted according to a current steering to obtain a predicted edge step number, a difference between the predicted edge step number and the edge step number count is used as a step loss and is corrected; the step loss under the positive rotation and the reverse rotation is respectively weighted and averaged, and the return difference step number is updated. The application reduces the influence of transmission gaps and cumulative step loss on pointing under the condition of not setting an encoder, and improves the accuracy of the road pointing arm rotating positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of directional arm rotation positioning technology, specifically to a directional arm rotation positioning method based on zero-position calibration and step count calculation. Background Technology

[0002] Rotating components such as guide arms, pointer instruments, and pan-tilt units, which are driven by stepper motors via gears or belts, typically operate in an open-loop manner. The rotation angle is obtained by multiplying the number of drive pulses by the step angle and the transmission ratio. The zero position is determined by using photoelectric or optical interruption reference marks set within the rotation range, so that the pointing direction corresponds to the angle reading.

[0003] In existing technologies, some solutions utilize the existing zero-point calibration optical interruptor and baffle of the gimbal. The baffle rotates in one direction, and the number of steps from blocking the optical interruptor to just leaving it is recorded. Then, the baffle rotates in the opposite direction until it just leaves the interruptor. The difference between the two step counts is used as the retrace difference. When returning to the preset position and moving in the opposite direction to the current direction, the retrace difference is added to the required number of steps. Another solution uses a unidirectional triggering method to determine the zero point, then measures the reversing gap along the same edge, and adds compensation steps during reversal. The compensation in these solutions all apply to the command side, adding steps only at the moment of reversal, without recording the steps within the transmission gap where the motor has rotated but the output has not. When the guide arm swings back and forth slightly or stops within the gap, the idle steps are still counted in the rotation angle, causing the correspondence between the pointing position and the accumulated steps to deviate. Furthermore, the zero position is only taken from one edge, and its position is offset relative to the center of the transmission gap.

[0004] Furthermore, existing solutions propose that during the continuous unidirectional rotation of the cam, the measured pulse count is compared with the theoretical count calculated based on the transmission ratio each time it passes the origin edge. If the deviation is within the limit, the count is corrected; otherwise, an error is reported and the machine stops. This solution is for unidirectional motion, and the theoretical count does not include transmission backlash. The guide arm needs to rotate back and forth in both directions, and during long-term operation, load fluctuations, stalling, or electromagnetic interference can cause step loss. The step loss and the change in transmission backlash are superimposed on the same counting deviation, making them difficult to distinguish. The edge position is also affected by detector threshold drift and light shield contamination. Under these conditions, the above solutions cannot determine whether the deviation comes from step loss or backlash change, nor can they prevent the detector's own edge drift from being mistaken for step loss and correcting the count. The pointing error continues to accumulate during long-term, unmaintained operation. Summary of the Invention

[0005] To address the technical problems in guide arms without encoders and driven by open-loop stepper motors, where mechanical zero-position deviation and transmission backlash cause systematic deviations between the calculated pointing direction and the actual pointing direction, the zero-position calibrated with a single reference detector shifts with the approach direction, the idle steps in the transmission backlash after reversal are mistakenly counted as the guide arm rotation angle, and the cumulative step loss during operation, zero-position loss due to power failure and restart, and backlash changes caused by transmission wear are all mixed together and cannot be detected and corrected in time, causing the pointing error to accumulate over time, this invention provides a guide arm rotation positioning method based on zero-position calibration and step count calculation.

[0006] One aspect of the present invention provides a method for rotating and positioning a guide arm based on zero-position calibration and step count calculation. The method includes: Step S1, a stepper motor drives the guide arm via a transmission mechanism. When a reference mark on the guide arm passes a reference detector on the frame, the step count on the motor side and the direction of rotation at the moment of output transition are latched as edge step counts; Step S2, the guide arm is made to approach the same physical edge of the reference mark in both forward and reverse directions. The step count of the forward rotation edge is subtracted from the step count of the reverse rotation edge, and then the hysteresis of the reference detector itself is subtracted to obtain the hysteresis step count. The median of the two counts is used as the position of the arm side edge, and the step count corresponding to the installation angle of the reference mark is added to obtain the zero-position step count; Step S3, the dead position is calculated with the hysteresis step count as the width. The area tracks the equivalent step count on the arm side by counting the steps on the motor side and records the gap state. The actual rotation angle of the guide arm is obtained by multiplying the difference between the equivalent step count on the arm side and the zero-position step count by the step equivalent. In step S4, during operation, the edge step count is subtracted for forward rotation and added to half of the reference detector's own hysteresis for reverse rotation. The edge position on the arm side is added to for forward rotation and subtracted to half of the hysteresis step count for reverse rotation as the predicted edge step count. The step loss is obtained by subtracting the predicted edge step count from the converted count. When the absolute value exceeds the recalibration tolerance, the step loss is subtracted from both the step count on the motor side and the equivalent step count on the arm side. In step S5, the step loss in forward and reverse rotation is weighted and averaged. When the two are reversed, the difference between the forward average value and the reverse average value is added to the hysteresis step count, and the actual rotation angle of the guide arm is updated.

[0007] This invention achieves simultaneous backlash steps and zero-position steps at the center of the gap in a single round trip by approaching the same physical edge during forward and reverse rotation. A dead zone with a width equal to the backlash steps is used to track the equivalent steps on the arm side via a step count on the motor side, preventing zero-position deviation and transmission gap from being factored into the calculation of the actual rotation angle of the guide arm. During operation, the predicted edge steps corrected according to direction are compared with the latched edge step count to obtain the lost steps amount. Weighted averages are then applied according to direction to distinguish between cumulative lost steps and backlash changes, allowing for continuous recalibration of the step count without the need for additional encoders, thus preventing zero-position loss.

[0008] Further, in step S1, after the reference detector outputs a transition, it continuously samples and confirms the level stability within multiple subsequent drive pulse cycles before determining it as a valid edge. When the confirmation is successful, the motor-side step count latched at the transition moment is still used. When the guide arm passes the reference mark during operation, the delay step count is calculated based on the current speed and the response delay of the reference detector, and the delay step count is deducted from the edge step count according to the sign of the current direction of rotation. It is subtracted when rotating forward and added when rotating in reverse.

[0009] Further, in step S2, the guide arm is made to cross the reference mark multiple times at a calibration speed lower than the operating speed, and the median of the edge step count of the same physical edge under both forward and reverse rotation is used for calculation; the larger of the ranges calculated for each edge step count under both forward and reverse rotation is used as the calibration dispersion. When the calibration dispersion exceeds the upper limit of dispersion, an alarm is output and the calibration result is not used.

[0010] Further, in step S3, when the difference between the motor-side step count and the arm-side equivalent step count is greater than half of the backlash step count, the arm-side equivalent step count is set to the motor-side step count minus half of the backlash step count, and the gap state is recorded as being close to the forward rotation side; when the difference is less than a negative half of the backlash step count, the arm-side equivalent step count is set to the motor-side step count plus half of the backlash step count, and the gap state is recorded as being close to the reverse rotation side; otherwise, the arm-side equivalent step count remains unchanged, and the gap state is recorded as being in the gap.

[0011] Furthermore, when the guide arm can rotate a full circle, the absolute value of the difference between the edge step counts triggered by two adjacent triggers of the same physical edge under the same direction is taken as the measured full circle step count. The step equivalent is obtained by dividing the full circle angle by the measured full circle step count. When the absolute value of the difference between the measured full circle step count and the nominal full circle step count calculated according to the nominal reduction ratio exceeds the upper limit of the transmission deviation, an alarm is output. When the rotation range of the guide arm is limited, a reference mark is set at each end of the rotation range. The step equivalent is obtained by dividing the included angle of the two reference marks measured during assembly by the absolute value of the difference between the edge step counts triggered in the same direction.

[0012] Furthermore, it also includes: converting the target direction angle into the arm-side target step number using the step equivalent and the zero-position step number; determining the drive direction by selecting the smaller turning angle within the path that does not exceed the allowable rotation range; when the drive direction is the same as the side that the gap state is attached to, the arm-side target step number is offset by half the backlash step number along the drive direction as the motor-side target step number; when the drive direction is opposite to the side that is attached to, or when the gap state is in the gap, the arm-side target step number is also offset by half the backlash step number along the drive direction as the motor-side target step number; the absolute value of the difference between the arm-side equivalent step number offset by half the backlash step number along the drive direction and the motor-side step count is used as the backlash compensation step number, and this step number is completed first during the initial movement phase; the arm-side target step number is taken as the nearest integer step, and the residual is rounded off and included in the next calculation.

[0013] Further, in step S4, when the absolute value of the lost step amount exceeds the lost step limit, the current pointing is stopped and step S2 is re-executed; the cumulative number of steps since the last recalibration is counted, and when the cumulative number of steps exceeds the active recalibration threshold, the path for the next pointing is selected to pass through the side of the reference mark, or a recalibration action of crossing the reference mark and returning to the original pointing is inserted when the pointing arm is idle.

[0014] Further, the reference mark has an entry edge and an exit edge along the rotation direction. In step S4, the edge step counts of the entry edge and the exit edge are latched in one overshoot in the same direction. The difference between the two is used as the measured mark width step count. The difference between the measured mark width step count and the calibration mark width step count measured in the same direction during calibration is used as the width deviation. When the absolute value of the width deviation exceeds the width tolerance, it is judged that the edge capture is unreliable and is only recorded without correction. When the absolute value of the width deviation does not exceed the width tolerance, the average of the step loss amounts of the entry edge and the exit edge is used as the step loss amount for this time.

[0015] Furthermore, it also includes: before each start of movement, setting the movement flag and writing it along with the starting point count and target count into non-volatile storage; after the movement is completed and stabilized, writing the motor-side step count, the arm-side equivalent step count, and the gap state, and clearing the movement flag; if the movement flag has been cleared upon restart, driving the guide arm to rotate toward the nearest reference mark and opening search windows on both sides of the predicted edge step count; if the movement flag is still set, expanding the search window to cover all possible edge positions between the starting point count and the target count; when an edge is captured in the search window, correcting according to step S4; if no edge is captured or the level of the reference detector is inconsistent with the level predicted according to the storage position, re-executing step S2.

[0016] Furthermore, the positioning parameter records in the non-volatile storage are divided into a calibration area and a status area. The calibration area stores the zero-position step count, the backlash step count, and the step equivalent, and is only rewritten when calibration or when the backlash step count is updated. The status area stores the motor-side step count, the arm-side equivalent step count, the gap status, the motion flag, the starting point count, and the target count, and is rewritten as the movement progresses. Each record has a serial number and a check code, and when reading, the record with the latest serial number and the one that has passed the check is retrieved.

[0017] The beneficial effects of this invention are as follows: For guide arms without encoders and driven by open-loop stepper motors, accumulated step loss during operation can be detected and corrected in a timely manner when the guide arm passes the reference mark, and the pointing error does not accumulate with running time; transmission gap will not be misjudged as step loss, reducing the step loss misjudgment rate; random errors from edge latching will not cause frequent jumps in the count; backlash changes caused by transmission wear can be distinguished from step loss and updated online, and the pointing error remains stable during long-term operation. After reversing, the idle time in the transmission gap is no longer counted as the guide arm rotation angle, reducing the pointing error that changes with the direction of rotation; after power failure and restart, the current contact side of the transmission can be known and the position can be restored accordingly; zero-position calibration does not shift with the approach direction, reducing the pointing system deviation introduced by the zero-position calibration. The above-mentioned zero-position calibration, reversing gap processing, and in-operation recalibration only require one reference mark and one reference detector, and continuous position recalibration can be achieved without adding an encoder, making it suitable for small guide arms with limited installation space. Attached Figure Description

[0018] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0019] Figure 1 This is a flowchart of the guide arm positioning method of the present invention.

[0020] Figure 2 This is a data flow diagram of online recalibration of non-standard data in Embodiment 2 of the present invention.

[0021] Figure 3 This is a schematic diagram for determining the predicted edge step count and step loss amount in the cross-standard comparison.

[0022] Figure 4 This is a schematic diagram of gap hysteresis dead zone tracking.

[0023] Figure 5 This is a comparison chart showing how the pointing error changes over time.

[0024] Figure 6 This is a comparison chart showing the directional deviation between forward and reverse approach. Detailed Implementation

[0025] To make the objectives and technical solutions of this invention clearer, the embodiments of this invention will be further described in detail below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of this invention and should not be construed as limiting the scope of protection of this invention.

[0026] Example 1 The directional arm rotation positioning method of this embodiment is used for open-loop stepper-driven rotatable directional arms, such as the indicator arms in directional guidance devices installed in stadiums, transportation hubs, or parks, whose direction rotates as the target point changes. The directional arm is mounted on a frame and can rotate around a pivot. A stepper motor is fixed to the frame and drives the directional arm via a transmission mechanism. The transmission mechanism can be a belt drive consisting of a synchronous belt and pulley, or a gear reduction drive; both have backlash during reversal. A reference mark is fixed on the follower part of the directional arm (arm root or output shaft), and a reference detector is fixed at the corresponding position on the frame. The device does not have an encoder; the rotation angle of the directional arm is calculated entirely by counting the drive pulses of the stepper motor, and the switching change of the switch output of the reference detector is the only absolute angle reference. The controller uses a microcontroller with an external interrupt or input capture channel, runs the following steps, and is equipped with non-volatile storage for saving positioning parameter records.

[0027] like Figure 1 As shown, the method in this embodiment includes five processing blocks connected sequentially from top to bottom: Step S1 latches the edge step count and outputs the motor-side step count and direction; Step S2 calibrates the zero position and hysteresis by approaching forward and backward and outputs the hysteresis step count and zero position step count; Step S3 calculates the actual rotation angle by tracking the dead zone and outputs the equivalent step count and gap state on the arm side; Step S4 compares and corrects the missed steps to obtain the predicted edge step count and missed step amount; Step S5 updates the hysteresis by weighted average of directions and outputs the updated hysteresis step count. Figure 1 This represents the main process of five steps, and the execution timing, data supply and return relationship of each step are handled as described in this embodiment.

[0028] In step S1, the stepper motor drives the guide arm via a transmission mechanism. When the reference mark on the guide arm passes the reference detector on the frame, the step count on the motor side and the direction of rotation at the moment of output transition are latched as the edge step count. The reference detector can be a slotted photoelectric switch, a Hall switch, or a reed switch, and the corresponding reference mark is a light-shielding plate or a magnet. The reference mark has a certain arc length along the rotation direction, and therefore has two physical edges; the edge that enters first in forward rotation becomes the edge that leaves last in reverse rotation. The same physical edge referred to below refers to a specific edge on the reference mark, regardless of whether it is entered or left in the current direction.

[0029] The motor-side step count is maintained by the drive pulse interrupt: for each forward rotation pulse issued by the controller, the motor-side step count increments by one; for each reverse rotation pulse issued, it decrements by one. The counting unit is the microstep set by the stepper motor driver. The output of the reference detector is connected to an external interrupt or input capture channel. Once the output level changes, the interrupt service routine reads the current motor-side step count and direction, storing them together with the change direction as an edge event record. The motor-side step count and drive pulse are maintained in the same interrupt context, and the latched value is strictly synchronized with the pulse sequence, thus achieving a resolution of a single microstep for the angle reference. Alternatively, the step position register inside the driver chip can be used instead of software counting, and this register can be directly read in the transition interrupt.

[0030] Mechanical vibration, electromagnetic interference, and switch contact jitter can cause the reference detector to produce multiple short transitions near the edge. Therefore, after the reference detector output transitions, the level is continuously sampled and confirmed to be stable over several subsequent drive pulse cycles before being considered a valid edge. This embodiment requires consistent sampling results for four consecutive drive pulse cycles. When confirmation is successful, the motor-side step count latched at the transition moment is used, not the count at the confirmation moment itself. This confirmation process is only used to distinguish between true and false edges, and does not include the steps consumed in the edge step count. If confirmation is unsuccessful, the edge event record is discarded. The number of cycles required for confirmation is determined by the jitter duration of the reference detector and the pulse period at the calibrated speed. Too many cycles will push the confirmation moment beyond the reference mark, while too few cycles will result in insufficient anti-interference.

[0031] During zero-position calibration, the guide arm rotates at a constant speed lower than the operating speed, and the number of steps corresponding to inertial lag and detector response delay can be ignored. During operation, when the guide arm passes the reference marker at the operating speed, there is a response delay between the reference marker reaching the detection position and the reference detector output jump. During this time, the drive pulse is still being emitted, and the latched count is therefore offset along the current direction. Therefore, when the guide arm passes the reference marker during operation, the delay steps are calculated based on the current speed and the reference detector's response delay. This is done by multiplying the instantaneous pulse frequency at the jump moment by the response delay, and deducting the delay steps from the edge step count according to the sign of the current direction: subtracting for forward rotation and adding for reverse rotation. The response delay is taken from the value given in the reference detector's specifications, or it can be calculated at the factory by exceeding the calibration at several different speeds and using the slope of the latched count as a function of speed.

[0032] Step S2 involves making the guide arm approach the same physical edge of the reference mark in both forward and reverse rotations. The difference between the forward rotation edge step count and the reverse rotation edge step count, minus the reference detector's own hysteresis, is used to obtain the hysteresis step count. The midpoint of these two counts is taken as the arm-side edge position, and the zero-position step count is determined accordingly. Due to the backlash in the transmission mechanism, the stepper motor must idle for a short distance after reversing before driving the guide arm: when approaching in forward rotation, the motor teeth are close to the forward rotation side, leading the arm side by half a gap; when approaching in reverse rotation, the motor is close to the reverse rotation side, lagging behind the arm side by half a gap. Therefore, the count triggered by the same physical edge in forward rotation is always larger than the count triggered in reverse rotation. This larger count is the sum of the step count corresponding to the transmission backlash and the reference detector's own hysteresis.

[0033] Calibration is performed upon power-on or upon receiving a calibration command. The controller rotates at the calibration speed in the forward direction, passing the reference mark and then continuing to rotate a certain distance away until the gap is fully engaged. It then reverses direction to pass the reference mark again, and repeats this process multiple times. In this embodiment, the cycle repeats three times. Each forward and reverse rotation yields a count of the edge steps for the physical edge. The median of the counts during forward rotation and the median of the counts during reverse rotation are used in the calculation to suppress occasional latching errors. An odd number of cycles is chosen to directly obtain the median; a higher number of cycles results in more stable calibration, but also takes longer, determined by the allowable power-on time.

[0034] The hysteresis steps are calculated by subtracting the median of the forward rotation from the median of the reverse rotation, and then subtracting the hysteresis of the reference detector itself. The hysteresis of the reference detector is the difference between the level switching points of the detector when it is triggered by entry and when it is triggered by exit. It is given by the detector specifications, or it can be measured at the factory by aligning the reference detector with the mark on the output shaft of the stepper motor and measuring it in the same reciprocating method without transmission backlash. The median of the two medians corresponds to the position of the edge when the motor tooth surface is in the center of the backlash, which is the position of the edge in the equivalent number of steps on the arm side, i.e., the position of the arm side edge. The level switching points of the reference detector triggered by entry and when it is triggered by exit are located on both sides of this edge, each offset by half of its own hysteresis. When taking the median, this part cancels out along with the transmission backlash. The asymmetrical part of the two switching points relative to this edge is a fixed amount and is incorporated into the position of the arm side edge. Step S4 uses the same arm side edge position as the comparison benchmark, and this part cancels out during the comparison. Therefore, in forward rotation, the trigger point is actually at the arm side edge position plus half a hysteresis step and half the reference detector's own hysteresis. In reverse rotation, the trigger point is at the arm side edge position minus these two items. The over-calibration comparison in step S4 is based on this and includes the detector's own hysteresis. The number of steps corresponding to the mounting angle of the reference mark plus the arm side edge position is taken as the zero position step number; the mounting angle is the angle between the edge of the reference mark and the zero-point direction of the guide arm, which is measured during assembly and converted into a step equivalent. This invention determines the zero position by taking the median value of the bidirectional count, so that the zero position falls in the center of the gap without being biased towards either side. The zero position calibration itself no longer carries the pointing system deviation that changes with the approach direction. The same round trip also gives the hysteresis step number, thus decoupling the zero position and hysteresis.

[0035] The calibration process also groups the edge step counts for forward and reverse rotation. For each group, the maximum count is subtracted from the minimum count to obtain the range. The larger of the two ranges is taken as the calibration dispersion. If the calibration dispersion exceeds the upper limit, an alarm is output, and the current calibration result is not used; the last valid calibration value in the positioning parameter record is reused. In this embodiment, the upper limit of dispersion is the number of steps corresponding to a pointing angle of 0.2°. Exceeding this value indicates that the repeatability of the zero position is lower than the pointing accuracy requirement, often caused by loose transmission or a faulty reference detector. If the hysteresis step count itself exceeds the preset upper limit of hysteresis, a separate prompt is issued indicating wear and repair of the transmission components; the calibration result is still used. Two bidirectional calibrations can also be performed on each of the two physical edges of the reference mark, taking the average of the two zero-position step counts, and verifying the calibration by checking whether the two hysteresis step counts are consistent.

[0036] The step equivalent is also calibrated during the same calibration process. When the guide arm can rotate a full circle, it rotates continuously in the same direction after bidirectional calibration. The absolute value of the difference between the edge step counts of two adjacent triggers of the same physical edge in the same direction is taken as the measured full circle step count. Both triggers are in the same direction, the gap is always close to the same side, and the hysteresis does not enter the difference value. The step equivalent is obtained by dividing the full circle angle by the measured full circle step count, which is the guide arm rotation angle corresponding to each microstep. When the absolute value of the difference between the measured full circle step count and the nominal full circle step count calculated according to the nominal reduction ratio exceeds the upper limit of the transmission deviation, an alarm is output. In this embodiment, the upper limit of the transmission deviation is taken as 0.5% of the nominal full circle step count. The normal manufacturing deviation of the pulley diameter and tooth ratio is much smaller than this value. If it exceeds this value, it indicates that the belt is slipping or the gear is skipping teeth. When the rotation range of the guide arm is limited, such as due to cable entanglement, a reference mark is set at each end of the rotation range. The step equivalent is obtained by dividing the included angle between the two reference marks measured during assembly by the absolute value of the difference between the step counts of the two edges triggered in the same direction. The step equivalent is taken as the measured value. The transmission ratio error caused by pulley diameter deviation and belt creep does not increase with the rotation angle. If it is necessary to further reduce the influence of single latching error, the average number of whole revolutions can be taken by rotating continuously for multiple revolutions. The calculation of the installation angle conversion and the zero-position step count are completed after the step equivalent is obtained.

[0037] Step S3: Using the dead zone with a hysteresis step count as its width, the motor-side step count tracks the arm-side equivalent step count and records the gap state. The actual rotation angle of the guide arm is obtained by multiplying the difference between the arm-side equivalent step count and the zero-position step count by the step equivalent. The arm-side equivalent step count is a quantity that converts the actual rotation angle of the guide arm to the same scale as the motor-side step count. It only moves when the motor-side step count deviates from it by more than half a hysteresis step count. Therefore, the idle steps after the reversal are not included in the rotation angle of the guide arm.

[0038] After each update of the motor-side step count, the difference between the motor-side step count and the arm-side equivalent step count is calculated. If the difference is greater than half a backlash step, the arm-side equivalent step count is set to the motor-side step count minus half a backlash step, and the gap state is recorded as being close to the forward rotation side. If the difference is less than a negative half a backlash step, the arm-side equivalent step count is set to the motor-side step count plus half a backlash step, and the gap state is recorded as being close to the reverse rotation side. Otherwise, the arm-side equivalent step count remains unchanged, and the gap state is recorded as being in a gap. During forward rotation, the motor-side advances synchronously with the arm-side by half a backlash step. In the initial stage after commutation, the motor-side step count moves within a dead zone while the arm-side equivalent step count remains stationary. After completing one backlash step, it enters the position close to the reverse rotation side, and only then does the arm-side equivalent step count begin to follow in the reverse direction. The above update can be performed after each drive pulse or in batches according to the pulse increment of the motion control cycle, with the same result.

[0039] like Figure 4As shown, the horizontal axis represents the step count on the motor side, and the vertical axis represents the equivalent step count on the arm side. The horizontal distance between the two parallel diagonal lines represents the backlash steps, with the area between them corresponding to the gap. The right diagonal line corresponds to the forward rotation side, and the left diagonal line corresponds to the reverse rotation side; the horizontal line segment between the two diagonal lines indicates that the equivalent step count on the arm side remains constant. The schematic trajectory moves upward along the right diagonal line with forward rotation, then crosses the gap along the horizontal line segment after the change of direction to the left diagonal line, and then moves downward along the left diagonal line with reverse rotation.

[0040] The actual rotation angle of the guide arm is equal to the difference between the equivalent steps on the arm side and the zero-position steps, multiplied by the step equivalent. For full rotations, the modulus of the full-circle angle is taken. The zero-position step number corresponds to the center of the gap. The dead zone is symmetrical about the zero position. The difference between the equivalent steps on the arm side and the zero-position steps directly corresponds to the rotation angle of the guide arm relative to the zero-point direction, without the need for additional offset. When the backlash step number is an odd number of microsteps, half a backlash step is a half-integer. In this case, all counts are doubled and calculated as integers. The gap state and the equivalent steps on the arm side are saved together for target pointing calculation and power-off recovery.

[0041] When the shaft is horizontally arranged and the arm's own weight generates a unidirectional off-center load, the guide arm always remains against the tooth surface on the side subjected to the gravity torque. The clearance state can be determined by the direction of the gravity torque within the half-cycle of the guide arm. When the guide arm crosses the vertical position and the gravity torque reverses, the equivalent step count on the arm side jumps by one hysteresis step. When the guide arm is long and has elastic deformation, an elastic hysteresis term proportional to the step count increment on the motor side can be superimposed outside the dead zone.

[0042] Based on the equivalent number of steps and clearance status on the arm side, this embodiment further calculates the target number of steps on the arm side by converting the target direction angle into the step equivalent and the zero-position step count. That is, the target direction angle is divided by the step equivalent and then the zero-position step count is added. The target direction angle is the angle of the target relative to the zero direction, which is obtained by converting the target point coordinates and the installation position and orientation of the guide arm. Then, the drive steering is determined by selecting the smaller turning angle from the path that does not exceed the allowable rotation range: when full rotation is possible, the forward and reverse paths are compared; when the rotation range is limited, only the path that does not exceed the limit is retained.

[0043] When the drive steering is the same as the side the gap is against, the target step number on the arm side is offset by half a backlash step along the drive steering direction as the target step number on the motor side. This is added during forward rotation and subtracted during reverse rotation. When the drive steering is opposite to the side it is against, or when the gap is in the gap, the target step number on the arm side is also offset by half a backlash step along the drive steering direction as the target step number on the motor side. The backlash compensation step number is the absolute value of the difference between the equivalent arm side step number offset by half a backlash step along the drive steering direction and the current motor side step count. This represents the number of steps required for the motor side to reach the contact boundary corresponding to the current arm side position along the drive steering direction. This step is completed first at the start of the movement; when on the opposite contact side, it is the entire backlash step number; when in the gap, it is the remaining step number to reach that boundary. The backlash compensation step number is completed at a lower speed, ensuring the gap is in place before acceleration. The remaining steps are then completed according to a trapezoidal or S-shaped speed curve. The target step number on the arm side is taken as the nearest integer step, and the rounded residual is included in the next calculation. That is, the residual from the previous calculation is added to the converted value and then rounded again. After multiple pointing, the residual will not accumulate in one direction. Thus, the guide arm stops at the same angle when approaching the same target from any direction. When higher accuracy is required, the last segment can also approach the target along the same direction used in step S2. If necessary, it can first cross the target and then turn back to keep the gap state constant when stopping.

[0044] Step S4: During operation, for each edge step count, the arm-side edge position is adjusted by adding or subtracting half a hysteresis step based on the current direction to obtain the predicted edge step count. The lost step amount is obtained by subtracting the predicted edge step amount from the edge step count after deducting the detector's own hysteresis. If the absolute value exceeds the recalibration tolerance, the lost step amount is simultaneously subtracted from both the motor-side step count and the arm-side equivalent step count. Whenever the guide arm crosses the reference mark during normal pointing, step S1 generates an edge event record. This step utilizes this opportunity for recalibration, without requiring a dedicated zero-return action.

[0045] Before comparison, the edge step count is first converted to a scale that excludes the detector's own hysteresis: after deducting the delay steps, half of the reference detector's own hysteresis is deducted according to the current direction of rotation; subtracted during forward rotation and added during reverse rotation; the edge step counts entering and leaving the edge in the same overshoot are converted in the same way. After this conversion, the trigger position of the physical edge in forward rotation is the arm-side edge position plus half of the hysteresis steps, and in reverse rotation it is the arm-side edge position minus half of the hysteresis steps; when a full rotation is possible, the product of the current cycle and the measured full cycle steps is added, converted to the current cycle, to obtain the predicted edge step count. The step loss is obtained by subtracting the predicted edge step count from the edge step count converted above. A positive step loss indicates that the motor-side step count is more than the actual rotation of the guide arm, that is, the stepper motor has taken fewer pulses; a negative step loss indicates the opposite. The predicted edge step count is included in half of the hysteresis step count according to the current direction, and the edge step count is also reduced by half of the reference detector's own hysteresis according to the current direction. The sum of the two is exactly half of the difference between the forward and reverse edge step counts in step S2. The comparison of the overshoot under forward and reverse rotation will not misjudge the transmission gap as a step loss, nor will it allow the detector's own hysteresis to be mixed into the directional average of step S5 with a pair of equal values ​​and opposite signs and be mistakenly regarded as a hysteresis change.

[0046] If the absolute value of the lost step amount does not exceed the recalibration tolerance, it is only recorded and the count is not corrected to avoid count jitter caused by random errors in edge latching and detector response. The recalibration tolerance is not less than the calibration dispersion and less than the lost step upper limit, and is determined according to the valid calibration result. If it exceeds the recalibration tolerance, the lost step amount is subtracted from both the motor-side step count and the arm-side equivalent step count to complete the on-site correction. If the guide arm is currently performing pointing, the target step number on the motor side is recalculated according to the corrected count to correct the current target. If the absolute value of the lost step amount exceeds the lost step upper limit, the current pointing is stopped and step S2 is re-executed. The lost step upper limit is the number of steps corresponding to a pointing angle of 5°. Exceeding this limit indicates that a stall, collision, or manual manipulation has occurred. A single correction is unreliable and a complete recalibration is required.

[0047] The guide arm may not cross the reference mark for an extended period, preventing recalibration. Therefore, the cumulative step count since the last recalibration is calculated, which is the sum of the absolute values ​​of each movement. This count is reset to zero after each cross-mark comparison. When the cumulative step count exceeds the active recalibration threshold, the next pointing path is selected to pass through the reference mark, even if the path has a large turning angle. If a detour is not possible, a recalibration action is inserted when the guide arm is idle (i.e., there is no pointing action to be performed), crossing the reference mark and returning to the original direction. In this embodiment, the active recalibration threshold is equivalent to the number of steps required for the guide arm to rotate 10 times. This threshold is determined based on the stepper motor's step loss probability under rated load and the allowable pointing error; a smaller threshold results in more frequent recalibration.

[0048] The two physical edges of the reference mark along the rotation direction are called the entry edge and the exit edge, respectively. When the reference mark can be completely crossed in the same direction, a double-edge processing method can also be used: in one crossing of the mark in the same direction, the edge step counts of the entry edge and the exit edge are latched, and the difference between the two is used as the measured mark width step count; the two edges are on the same contact side, and the backlash cancels out in the difference value, so the measured mark width step count only reflects the arc length of the reference mark. The difference between the measured mark width step count and the calibration mark width step count measured in the same direction during calibration is used as the width deviation. The calibration mark width step count is measured incidentally in the round trip of step S2, and one copy is stored for each of the forward and reverse rotations. The predicted edge step count of the exit edge is also derived from the arm side edge position and the calibration mark width step count. If the absolute value of the width deviation exceeds the width tolerance, the edge capture is deemed unreliable, and only recorded without correction. This type of situation is often caused by vibration during the overshoot, dirt at the edge, or loss of synchronization during the overshoot. If the absolute value of the width deviation does not exceed the width tolerance, the average of the loss of synchronization when entering and leaving the edge is taken as the loss of synchronization for this time, and then processed according to the above criteria. The width tolerance is determined by the superposition of the two edge latching errors and is on the same order of magnitude as the recalibration tolerance.

[0049] Step S5 involves weighted averaging of the step loss amounts for both forward and reverse rotation. When the signs are opposite, the difference between the forward average and reverse average is added to the backlash step count, and the actual rotation angle of the guide arm is updated. When the stepper motor loses steps, the step loss amounts change in the same sign for both forward and reverse rotation. When wear on the transmission mechanism increases the clearance, the lower edge triggers at a larger count point for forward rotation and at a smaller count point for reverse rotation; the step loss amounts in both directions are equal but opposite in sign. Separate direction statistics effectively separate these two causes.

[0050] The controller maintains an exponentially weighted average of the step loss for both forward and reverse rotation. Each valid step loss is updated according to the direction of rotation, with the new value taking a smaller fixed weight. This smooths out single random errors and preserves the slow wear trend. The original step loss before correction is used for averaging. Wear-induced deviations increase progressively, and single errors are usually less than the recalibration tolerance, not triggering the correction in step S4. Therefore, they first appear in the directional averaging. When the two averages have the same sign, their common portion is classified as a step loss and processed by step S4. When the two averages have opposite signs and their absolute values ​​both exceed half of the recalibration tolerance, it is determined that the hysteresis has changed. The difference between the forward average and the reverse average is added to the hysteresis step count as the new hysteresis step count, and then the two averages are reset to zero and re-accumulated.

[0051] After updating the backlash step count, the equivalent step count on the arm side is recalculated according to the current gap state: when close to the forward rotation side, it is set to the motor side step count minus half of the new backlash step count; when close to the reverse rotation side, it is set to the motor side step count plus half of the new backlash step count; when in the gap, it remains unchanged; then the actual rotation angle of the guide arm is updated according to step S3. The predicted edge step count, dead zone width, and motor side target step count all use the new backlash step count thereafter. The arm side edge position is taken from the median of the bidirectional counts; it remains unchanged when the gap increases symmetrically, and the zero-position step count does not need to be recalibrated. The new backlash step count is written into the positioning parameter record; when the cumulative increment exceeds the backlash upper limit, the transmission mechanism is prompted for maintenance. This invention distinguishes between step loss and backlash changes through directional weighted averaging, correcting cumulative step loss and tracking transmission wear online without adding an encoder, ensuring that pointing errors do not accumulate over operating time.

[0052] This embodiment also includes power-off recovery. Before each movement is started, the movement flag is set and written to non-volatile storage along with the starting point count and target count; after the movement is completed and comes to a stop, the motor-side step count, the arm-side equivalent step count and gap status are written and the movement flag is cleared.

[0053] Upon restart, non-volatile memory is read. If the motion marker has been cleared, the power outage occurred in a stationary state, the stored position is reliable, the guide arm is driven to rotate towards the nearest reference marker, and search windows are opened on both sides of the predicted edge step count. If the motion marker is still in place, the power outage occurred midway through the motion, the actual position of the guide arm is between the start count and the target count, the search window is expanded to cover all possible edge positions between the start count and the target count. The half-width of the search window is the number of steps corresponding to a pointing angle of 3°, used to cover the offset that may be caused by the stepper motor rebounding to the nearest full step position when the power is off, without causing the recovery action to be too long. If an edge is captured within the search window, it is corrected according to step S4, and then the original pointing is returned; if no edge is captured, or the level of the reference detector is inconsistent with the level predicted according to the stored position, the position record is judged to be invalid, and step S2 is re-executed. After restarting, it is not necessary to search back to zero for a full rotation, the recovery action is short, and the swing of the guide arm is small.

[0054] The positioning parameter records in the non-volatile memory are divided into a calibration area and a status area. The calibration area stores the zero-position step count, hysteresis step count, and step equivalent, and can also store the measured integer step count and calibration mark width step count. It is only rewritten when the calibration or hysteresis step count is updated. The status area stores the motor-side step count, arm-side equivalent step count, gap status, motion flag, starting point count, target count, and cumulative step count since the last calibration. It is rewritten as the system moves. With the two areas separated, even if the frequently rewritten status area is damaged, it will not affect the calibration results. Each record has a serial number and a check code. When reading, the record with the latest serial number and that has passed the check is retrieved. If all records fail the check, the record is considered invalid, and step S2 is re-executed. The check code can use cyclic redundancy check. The status area is written to multiple storage blocks in rotation. When stationary, it is only written after the count changes to extend the life of the non-volatile memory.

[0055] In the above steps, step S2, along with the synchronous equivalent calibration, is performed when the device is powered on, the position record fails, or the step loss exceeds the limit. Steps S1, S3, S4, and S5 are continuously executed during operation: the edge event record of step S1 is used for both the calibration of step S2 and the recalibration of step S4; the equivalent step count and gap status of the arm side in step S3 are used for target pointing calculation; and the step loss amount in step S4 is used for statistics in step S5. Only one reference marker is needed, and only one switching device is needed for the reference detector. The entire positioning system does not rely on an encoder.

[0056] Example 2 In a preferred embodiment of the present invention, the online recalibration of steps S4 and S5 is further refined. This step does not add an encoder; it relies solely on the edge step count generated each time the reference mark on the guide arm passes the reference detector on the frame. During operation, it continuously detects and corrects accumulated step loss, while simultaneously separating step loss from hysteresis changes caused by transmission wear. Figure 2 As shown, the data stream for online calibration of out-of-calibration enters through the edge event record, which includes the edge step count, direction, and edge type. The predicted edge step count is generated by the arm-side edge position and hysteresis step count. This is subtracted from the edge step count (after deducting the delay step count and deducting half of the reference detector's own hysteresis according to the current direction) in the comparison stage to obtain the step loss amount. The step loss amount is then split into three outputs according to the calibration tolerance and the step loss limit: recording only, local correction, and recalibration. Another branch sends the step loss amounts separated by direction to the respective weighted averaging stage, whose output is written back to the hysteresis step count.

[0057] The generation of the predicted edge step count is the foundation of the entire process. Step S2 has already determined the arm-side edge position as the median value of the counts during the two triggers of forward and reverse rotation of the same physical edge. This corresponds to the position of the edge when the motor tooth surface of the transmission mechanism is in the center of the gap. During operation, the guide arm is always against the side pushed by the motor tooth surface: when rotating forward, the motor tooth surface is against the rotating side, and the position of the edge in the equivalent step count on the arm side is the arm-side edge position. The motor side step count needs to go half a backlash step more to make the reference mark reach the detection position, so the predicted edge step count in forward rotation is equal to the arm-side edge position plus half a backlash step; when rotating in reverse, the side against the motor side changes to the other side, and the predicted edge step count is equal to the arm-side edge position minus half a backlash step. For guide arms that can rotate a full circle, the predicted edge step count also needs to be converted to the current cycle based on the actual full circle step count. When converting, the cycle with the smallest difference from the latch count is taken, so that the absolute value of the lost step does not exceed half a full circle step. The reference marker has two physical edges along the rotation direction. The entry edge and the exit edge are predicted separately. The edge type is given along with the edge event record so that the corresponding predicted value can be retrieved.

[0058] The step loss is obtained by subtracting the predicted edge step count from the edge step count. Before comparison, the edge step count has been verified, deducted for delayed steps, and calculated by subtracting half of the reference detector's own hysteresis based on the current direction, as described in Example 1. Therefore, the step loss includes the following components: cumulative step loss due to motor step loss or the guide arm being driven by external force, hysteresis changes due to transmission wear, and random errors in edge latching and detector response. When the absolute value of the step loss is not greater than the recalibration tolerance, it is only written into the record without counting, to prevent random errors from causing the count to fluctuate. When it is greater than the recalibration tolerance but not greater than the step loss upper limit, the step loss is subtracted from both the motor-side step count and the arm-side equivalent step count. Both values ​​are corrected simultaneously because the difference between them carries the gap state; after subtracting the same value, the gap state remains unchanged, and the recorded contact side remains valid. The correction is completed in one go within the short critical zone of turning off the drive pulse interruption, avoiding the omission or duplication of newly generated pulses during the correction period. After correction, the target pointing step count is recalculated based on the corrected count to correct the currently executing pointing. The pointing arm returns to the target direction in this movement. If the absolute value of the lost step amount is greater than the upper limit of lost steps, it indicates that a stall or collision has occurred. A single correction is unreliable, the current pointing is stopped, and step S2 is re-executed.

[0059] like Figure 3As shown, the upper and lower strips share a step axis with the motor-side step count as the horizontal axis. The central vertical line indicates the position of the arm-side edge. The upper strip corresponds to forward rotation, and the lower strip corresponds to reverse rotation. The predicted edge step count line is half a hysteresis step away from the arm-side edge position. It is located on one side of the arm-side edge position during forward rotation and on the other side during reverse rotation. Centered on the predicted edge step count, the inner light gray area represents the calibration tolerance. When the step loss falls into this area, it is only recorded. The dotted area between the calibration tolerance and the upper limit of step loss is corrected locally when the step loss falls into it. When the absolute value of the step loss exceeds the upper limit of step loss, the current direction stops. The solid triangle in the figure represents the edge step count after deducting the delay steps and deducting half of the reference detector's own hysteresis according to the current direction. The arrow pointing from the predicted edge step count to the edge step count indicates the step loss. The step loss in the upper strip falls into the local correction area, and the step loss in the lower strip falls within the calibration tolerance.

[0060] The key parameter determining the validity of this step is the recalibration tolerance. Its selection is not based on empirical rounding, but rather determined by the calibration dispersion obtained in step S2: the recalibration tolerance is not less than the larger of the ranges calculated separately for each steering direction, ensuring that normal edge latching errors fall within the tolerance while remaining below the step loss upper limit, allowing for the detection of true step loss. The step loss upper limit is determined by the minimum number of steps that the guide arm might lose in a single stall or collision, leaving a sufficient interval between the two. Small deviations are ignored, large deviations are fully corrected, and exceeding the limit triggers recalibration.

[0061] After each deviation from the calibration standard, a recalibration conclusion is given, categorized as normal, corrected, or requiring recalibration. This conclusion, along with the lost step amount, the corrected motor-side step count, and the equivalent step count on the arm side, is written into the deviation record. A conclusion of "normal" is given when the absolute value of the lost step amount is not greater than the recalibration tolerance; "corrected" is given when it falls between the recalibration tolerance and the upper limit for lost steps; and "recalibration" is given when it exceeds the upper limit for lost steps. If, during the deviation process, the guide arm reverses direction on the reference mark, and the two edges that occurred consecutively in the same deviation have different directions, the gap adjacent to the edge corresponding to the edge step count has changed. Such deviations are not included in the comparison; only the direction and count are recorded, awaiting the next complete deviation in the same direction. If the change in the motor-side step count between two adjacent deviations differs from the theoretically required number of steps between adjacent edges by more than the upper limit for lost steps, it is also treated as a severe loss of steps, and the next deviation is not awaited.

[0062] Edge events are latched by interrupt service routines, and comparison and correction are completed in the main loop, with the two being handed over via edge event records. The interrupt service routine is only responsible for writing the edge step count, direction, and edge type into the record and setting the event flag. After the main loop retrieves the event, it performs the predicted edge step count lookup and step loss calculation, so that the recalibration operation does not occupy the interrupt time of the drive pulse. If a new edge is generated before the main loop has processed the previous record, it is queued in order, and no record is discarded. When using double-edge processing, the step loss is calculated separately for entering and leaving the edge. The count is not corrected separately. The results are combined according to the width criterion described in Example 1 before recalibration determination. Example 3 further illustrates this process.

[0063] The weighted averaging in step S5 is performed after the processing in this stage. After each out-of-range step loss, it is categorized into two groups based on its direction of rotation: forward or reverse. Each group maintains an exponentially weighted average with a weighting coefficient of 0.25. This ensures that the average can both suppress the random error of a single latch and keep up with the slow changes in hysteresis caused by transmission wear. The weighting coefficient is chosen based on the difference between hysteresis change and out-of-range step loss on the time scale: the hysteresis change caused by wear is measured in hundreds of round trips and can be considered constant within a few adjacent out-of-range steps, while random error is independent each time. A smaller weight can suppress it, while a larger weight will mix single out-of-range step loss into the hysteresis estimation. When the two sets of average values ​​have the same sign and are roughly equal in size, it indicates that the predicted edge steps in both forward and reverse rotations have deviated by the same direction and amount, which is considered cumulative step loss. This has already been corrected locally as described above, and the hysteresis steps remain unchanged. When the two sets of average values ​​have opposite signs, it indicates that the predicted edge steps in forward rotation are too far back, while those in reverse rotation are too far forward or vice versa. This indicates that the hysteresis has changed. The difference between the average step loss in forward rotation and the average step loss in reverse rotation is added to the hysteresis steps. After the update, the zero-position steps and the arm side edge position remain unchanged, only the dead zone width and the offset of the predicted edge steps change accordingly, and the actual rotation angle of the guide arm is updated accordingly. When the hysteresis steps exceed the upper limit of hysteresis given during calibration, it indicates wear of the transmission components.

[0064] To prevent the guide arm from failing to recalibrate due to prolonged periods without passing the reference marker, step S4 also counts the cumulative steps since the last calibration. When the cumulative steps exceed the active calibration threshold, the next path on the guide arm, which can rotate a full circle, is selected to pass through the reference marker, even if the turning angle of that path is large. When the guide arm is idle, a calibration action is inserted to cross the reference marker and then return to the original direction. Upon return, the number of steps is still calculated based on the target direction and included in the backlash compensation steps. The cumulative steps are cleared to zero after each calibration and written to non-volatile storage along with the zero-point steps and backlash steps so that they can continue to accumulate after power failure.

[0065] The beneficial effects of using the above methods are as follows: step loss is detected and corrected on the spot when it occurs for the first time; the pointing error is only related to the number of steps that may be lost between two adjacent step losses and does not accumulate with running time; the step loss comparison in forward and reverse rotation uses their respective predicted edge steps, so the transmission gap will not be misjudged as step loss, and no new deviation will be introduced in the recalibration due to reversal; the step loss amount in forward and reverse rotation is counted separately, so the backlash change caused by transmission wear can be tracked online, and the zero-position calibration result does not have to be completely invalidated due to wear; the recalibration only relies on a single switch reference detector, without adding an encoder or other sensors, and the computation is limited to one subtraction and one comparison, which has no impact on the real-time performance of the open-loop stepper drive.

[0066] The principle behind this effect lies in incorporating transmission backlash into the comparison benchmark when predicting edge steps. If the arm-side edge position is directly compared to the latch count, the step loss in forward and reverse rotation will differ by one backlash step. This difference is indistinguishable from the actual step loss, requiring a tolerance to allow all steps smaller than the backlash to be missed. Adding or subtracting half a backlash step for each direction cancels out the backlash during comparison, and the remaining step loss only reflects the deviation between the motor-side step count and the actual position of the guide arm. Step loss causes the step loss amounts in both directions to shift in the same direction, while backlash changes cause them to shift in opposite directions. After separate statistics for forward and reverse rotation, the same-direction and opposite-direction components can be algebraically separated. The same-direction component is used to correct the count, and the opposite-direction component is used to update the backlash step count. The correction action acts on both the motor-side step count and the equivalent step count on the arm side, not just the output angle. Therefore, the starting point for calculating subsequent steps is correct after correction, and the error will not be amplified again with subsequent movements.

[0067] This method requires saving very few states: two calibration values ​​for the arm side edge position and the hysteresis steps, two weighted averages for forward and reverse rotation, and the cumulative steps since the last recalibration. The weighted average is reset to zero after recalibration, the hysteresis steps are updated and written to the calibration area in non-volatile storage, and the cumulative steps are written to the status area. After a power outage and restart, the process can resume directly without re-accumulating statistics. The predicted edge steps are calculated instantly from these values ​​each time the calibration is exceeded, without relying on historical calibration records. Therefore, record loss or storage block rotation will not affect subsequent comparisons.

[0068] Compared to the method of only performing unidirectional correction when the guide arm passes the origin, this method compares every deviation from the standard throughout the entire operation and provides predicted values ​​for both forward and reverse rotation. Unidirectional correction treats the clearance as zero or constant, and the step loss during reversal deviations is mixed with the hysteresis step count, which cannot distinguish between step loss and hysteresis, nor can it correct for hysteresis with wear. This method, however, incorporates the distinction between the two as part of the recalibration process, making the hysteresis step count an updated quantity during operation, rather than a constant that remains unchanged after factory calibration.

[0069] The applicability of this method has limitations: the guide arm must rotate in both directions and periodically pass the reference mark. If it rotates only in a small range far from the reference mark for a long time, the cumulative step loss can only be limited by active recalibration. When the detector response delay changes too much with the rotation speed, the error in the calculation of the delay step number will be included in the step loss. At this time, it is necessary to reduce the running speed when the standard is exceeded.

[0070] Example 3 In another embodiment of the present invention, the same-direction double-edge processing of step S4 described in Embodiments 1 and 2 is further explained. Utilizing the arc length of the reference mark, the entry and exit edges are simultaneously captured in a single overshoot within the same rotation direction. The reference mark has a certain arc length, and the entry and exit edges are generated sequentially along the rotation direction. A drawback of single-edge comparison is that it cannot determine the reliability of the current edge capture: edge offsets caused by light-shielding plate contamination, false triggers caused by electromagnetic interference, and edge position offsets caused by temperature drift of the reference detector threshold or response will all be directly incorporated into the step loss amount and treated as step loss, incorrectly correcting the motor-side step count and the arm-side equivalent step count.

[0071] This implementation adds one item to both the calibration and operation phases. In the calibration phase, during step S2, when the guide arm rotates forward and reverse to cross the reference mark, the number of edge steps entering and leaving the edge is simultaneously latched each time it crosses the mark. The difference between the two edge counts under the same direction is the mark width step count. Because both edges are triggered under the same direction, the motor teeth always remain on the same side, and the backlash step count is not included in the difference value. The mark width step count for both forward and reverse rotation is taken as the median of multiple round trips and recorded as the calibration mark width step count, with one count stored for each direction. During calibration and operation, the directional width step count is obtained by subtracting the entry edge count from the exit edge count; the value is positive for forward rotation and negative for reverse rotation. The absolute value of the difference between the measured value and the calibration value in the same direction is used to determine the width deviation. The position of the arm side edge corresponding to the departure edge is obtained by adding the width step of the calibration mark to the position of the arm side edge entering the edge, without having to perform a complete bidirectional calibration for each of the two edges. If higher reliability is required, a bidirectional calibration can be performed for each of the two physical edges, and the consistency of the zero-position step count obtained in the two calibrations can be used to verify the calibration result.

[0072] During operation, the reference detector outputs transitions at the entry and exit edges sequentially during a single overshoot in the same direction. Both transitions are counted according to the latching edge steps described in Example 1, deducting the delay steps, and then deducting half of the reference detector's own hysteresis based on the current direction. The difference between the two edge step counts is the measured mark width steps. The difference between the measured mark width steps and the calibrated mark width steps under the current direction is used as the width deviation, and its absolute value is compared with the width tolerance. The width tolerance is determined based on the range of mark width steps during the calibration phase, and must not be less than this range to prevent normal latching errors from triggering a judgment.

[0073] When the absolute value of the width deviation exceeds the width tolerance, the edge capture is deemed unreliable. In this case, one of three reasons—a dirty light shield, electromagnetic false triggering, or detector threshold drift—causes at least one edge to deviate from its true position. However, a single deviation is insufficient to determine which edge it deviates from, and therefore, the required correction amount. Thus, this deviation only records the counts of entering and leaving the edge, the width deviation, and the direction of rotation; the motor-side step count and the arm-side equivalent step count are not corrected, and the hysteresis step count is not updated. If multiple consecutive deviations are deemed unreliable, a message indicating that the detector or light shield needs maintenance is provided in the record. The guide arm's positioning continues based on the existing arm-side equivalent step count, and the active recalibration action triggered by the accumulated step count selects the opportunity for another deviation.

[0074] When the absolute value of the width deviation does not exceed the width tolerance, the step loss amount of each of the two edges is calculated separately, that is, the step count of each edge minus the predicted step count of each edge. The average of the two step loss amounts is taken as the step loss amount for this time, and then proceeds to the recalibration tolerance and step loss upper limit determination, on-site correction, and directional weighted averaging described in Example 2. The basis for averaging is the symmetry of the detector threshold drift: when the threshold or response drifts with temperature, the triggering of entering the edge is delayed, and the triggering of leaving the edge is advanced, or the two are opposite. The offset of the two edges is the same in magnitude and opposite in direction, and they cancel each other out in the average step loss amount. True step loss causes the two edges to shift in the same direction and will not disappear in the average. Therefore, when the threshold drift of the two edges is equal in magnitude and opposite in direction, the drift cancels each other out in the average step loss amount; when this symmetry condition is not met, the average step loss amount may still contain the residual component of the drift, and the drift amount itself is reflected in the width deviation: the drift makes the measured mark width step count narrower or wider, and the width deviation is twice the drift amount. Recording the changes in width deviation with the number of deviations can be used as a monitoring quantity for detector aging and the influence of ambient temperature. When the deviation increases slowly, it can provide an early maintenance prompt, and at this time the average step loss can still be used for recalibration.

[0075] Response delay is different from threshold drift. The delay of two edges under the same direction is converted into the same number of steps in the same direction. They are canceled out in the difference in width, but not in the average number of lost steps. Therefore, the deduction of delay steps must be performed before the width calculation and averaging. It cannot be omitted because double edges are used.

[0076] The difference between this embodiment and the single-edge processing described in Example 1 is that single-edge processing only compares a single edge, resulting in the simplest system structure. It can still be used when the reference mark is very narrow or the rotation range is limited. This embodiment requires the arc length of the reference mark to be greater than the width change that may be caused by detector jitter and threshold drift, and the mark must be completely crossed within the rotation range. When the rotation range is limited, and a reference mark is set at each end while the guide arm often stops at the edge of the mark, only one edge can be captured in one crossing. In this case, it reverts to the single-edge processing of Example 1. If the arc length of the reference mark is too large, it will occupy the rotation stroke and cause the interval between the two edges in one crossing to exceed the interval corresponding to the step loss limit, making it difficult to distinguish the predicted edge steps of entering and leaving the edge. Compared with the two, the advantage of Example 1 is that it has no requirements on the shape of the mark, while the advantage of this embodiment is that the crossing comparison itself has a reliability criterion and separates the detector drift from the step loss, making it suitable for occasions with a wide range of operating temperature variations and where the light shield may be contaminated.

[0077] Example 4 This embodiment describes the implementation of the method on a directional arm with a limited rotation range. The end of the directional arm is connected to a control unit on the frame via a flexible cable, used to indicate the target location on the equipment panel to the operator. Due to the cable length limitation, the directional arm can only rotate back and forth within a range of less than one revolution, with mechanical limits at both ends of the range, preventing continuous full revolutions along the same direction as in Embodiment 1. This scenario presents three specific difficulties: First, it is impossible to obtain the edge step count for two adjacent triggers of the same physical edge under the same direction, and the step equivalent must be obtained separately; second, there is only one path corresponding to the target direction angle, and reversal cannot be avoided, making the backlash more concentrated on the direction than during full revolutions; third, when the directional arm approaches the limits at both ends, if the recalibration action exceeds the allowed rotation range, it will collide with the limits, introducing new step loss.

[0078] The arrangement of reference markers and reference detectors is adjusted accordingly. A stepper motor drives the guide arm via a transmission mechanism. Two reference markers are positioned on the follower turntable of the guide arm along the rotation direction, respectively near the forward and reverse ends of the allowable rotation range. The included angle between the two reference markers is 270°, and the allowable rotation range is 300°. The margin between each reference marker and the adjacent mechanical limit is greater than the sum of the backlash steps and the distance the marker is traveled after passing it during calibration. The reference detector is fixed to the frame. When the two reference markers pass the same reference detector sequentially, the edge step count and direction are latched according to step S1. The edge step count itself does not carry a marker identity. It determines whether the reference marker that has been crossed is the forward or reverse end based on which side of the midpoint of the allowed rotation range the equivalent step count on the arm side is located at the latching moment. At the same time, it calculates the predicted edge step count based on the arm side edge position of another reference marker. The predicted edge step count of the two reference markers is subtracted from the edge step count. If the reference marker corresponding to the smaller absolute value of the difference is inconsistent with the result determined by position, it is considered that the step loss exceeds the step loss limit, the current pointing is stopped and step S2 is re-executed.

[0079] Step S2 is performed in two locations in this scenario: At the reference mark on the forward rotation end, the guide arm is moved back and forth multiple times at the calibration speed to obtain the backlash step count and the position of the arm's side edge, and the zero-position step count is determined accordingly; the same backlash step count is performed at the reference mark on the reverse rotation end to obtain the position of the arm's side edge and the backlash step count for that reference mark itself. If the difference between the backlash step counts obtained from the two locations exceeds the upper limit of dispersion, it indicates that the transmission clearance is unevenly distributed along the rotation angle or that a certain reference mark is loosely installed, and an alarm is output and the calibration result is not used; if it does not exceed the upper limit, the average of the two backlash step counts is taken as the subsequent dead zone width, and the positions of the two arm side edges are each retained for predicting the edge step count. During the calibration process, the distance that the guide arm continues to rotate after passing the reference mark is limited within the margin and does not touch the mechanical limit.

[0080] The step equivalent is obtained using a limited rotation range method: the angle between two reference marks measured during assembly is divided by the absolute value of the difference between the step counts of the two edges triggered in the same direction. The step counts of the two edges are taken from the same physical edge of the two reference marks under the same direction, and the gap is always close to the same side, so the hysteresis is not included in the difference value. The absolute value of the difference between the step counts of the two edges triggered in the same direction is compared with the angle step count converted according to the nominal reduction ratio. When the absolute value of the difference exceeds the upper limit of transmission deviation, an alarm is output. The upper limit of transmission deviation in this scenario is converted into a step count at the same ratio as the nominal angle step count, which is used to detect belt slippage or gear skipping.

[0081] During operation, the target direction angle is converted into the arm-side target step count using the step equivalent and the zero-position step count. There is only one path within the allowed rotation range. The drive steering is directly determined by the size of the arm-side target step count relative to the current arm-side equivalent step count. When the target direction angle is outside the allowed rotation range, pointing is rejected and an out-of-bounds warning is output. The calculation of the backlash compensation steps follows the method described in Example 1. In this scenario, the reversal occurs between most pointing directions, and the gap state is mostly recorded as being close to one side. The compensation steps can be completed in the initial stage of the movement.

[0082] The active recalibration process also changes accordingly. During a full rotation, the next pointing path can be changed to the side passing the reference marker. In restricted scenarios, the path cannot be selected, so the cumulative number of steps since the last recalibration is counted. When the active recalibration threshold is exceeded, a recalibration action is inserted when the guide arm is idle, i.e., there is no pointing action to be executed. This action crosses the nearest reference marker and then returns to the original pointing direction. The active recalibration threshold is taken as the number of steps equivalent to 6 times the allowed rotation range of the guide arm's cumulative rotation. This action ensures that the reference marker is crossed once in both forward and reverse rotations, providing two samples of lost steps for step S5. If the guide arm is far from both reference markers, the recalibration action first moves within the margin before crossing the marker, and the travel distance does not exceed the allowed rotation range.

[0083] Upon power failure and restart, if the motion marker has been cleared, the nearest reference marker is determined based on the stored equivalent step count on the arm side, and the arm rotates towards it. If the motion marker is still in place, the search window covers all possible edge positions between the starting count and the target count, and is truncated within the allowable rotation range, with both ends of the window not exceeding mechanical limits. If an edge is captured within the window, step S4 is followed for correction; if no edge is captured or the level of the reference detector is inconsistent with the predicted level, step S2 is re-executed. Compared to full rotation, the above methods eliminate the need for full rotation search and calibration within the limited rotation range, ensuring that the guide arm's recalibration and recovery actions are always limited to the allowable rotation range.

[0084] Example 5 This example illustrates an application case: a wayfinding mechanism within a station hall. The mechanism's guide arm is driven by a stepper motor via pulleys and a belt. Indicator lights at the arm end sequentially point in several exit directions. It operates continuously throughout the day, with almost constant reversals before and after each pointing action. The entire machine is powered off at night and restarted the following day. The required pointing accuracy is a pointing error of no more than 0.3°, but the mechanism cannot be fitted with an encoder: firstly, the space at the arm end is limited; secondly, the maintenance cycle is long, and encoder contamination and cable lifespan become new sources of failure. The difficulty in this case lies in the fact that belt creep and wear increase the hysteresis steps over time, and occasional pedestrian contact with the guide arm causes short-term step loss. Both accumulate over time, and the zero-position and hysteresis values ​​calibrated once cannot cover these changes. Therefore, conventional methods are insufficient to maintain consistent pointing over long periods.

[0085] The implementation process adopts settings unique to this case. A reference marker is installed at the base of the guide arm, and the reference detector is a slotted photoelectric switch. The guide arm can rotate a full circle, and the step equivalent is the result of the full-circle calibration. The recalibration tolerance is set at 4 microsteps to cover the random error of edge latching. When using this value, it is verified according to the above unified rules that it is not less than the calibration dispersion of the current effective calibration and less than the upper limit of lost steps. The pointing action in each exit direction is calculated according to Example 1, determining the target step number and hysteresis compensation step number on the motor side. When crossing the reference marker, the predicted edge step number is compared according to step S4. In step S5, the lost step amounts under forward and reverse rotation are weighted and averaged separately. When the two signs are reversed, the difference between the forward average and the reverse average is added to the hysteresis step number. Upon daily restart, search windows are opened on both sides of the predicted edge step number according to the stored position. After retrieving the reference marker, operation continues.

[0086] The test conditions are as follows: Six prototypes from the same batch were selected and each ran continuously for 720 hours, randomly pointing to 60 exit directions per hour. The operating environment consisted of an embedded microcontroller with a microstepping driver. Pointing error and pointing deviation were measured using an external high-resolution angle reference, which was used only for testing and not for control. Pointing error was the absolute value of the difference between the actual pointing angle and the target direction angle. The average of all pointing within one hour before and after each time point in Table 1 was taken, and then averaged over the six prototypes; the smaller the better. Pointing deviation was the difference between the actual pointing angle and the target direction angle, with the forward direction as positive. The average of the deviations of each prototype approaching the same target direction in both forward and reverse directions after 720 hours of operation was taken; the closer to 0 the better. The comparison method adopted the closest existing technical route: the hysteresis was measured by the difference in the number of edge steps in both forward and reverse directions and compensated for during reversal. No cross-standard comparisons were performed during operation. Two control groups for ablation: no online recalibration without exceeding the standard, steps S4 and S5 were removed, and the hysteresis steps were fixed at the calibration value; no dead zone tracking ( Figure 6 (This is referred to as gapless hysteresis position tracking), removing the dead zone tracking in step S3, and directly taking the equivalent step count on the arm side as the step count on the motor side.

[0087] Table 1. Changes in pointing error over running time

[0088]

[0089] Table 2. Pointing deviation of different approach directions after 720 h of operation

[0090]

[0091] like Figure 5As shown, the horizontal axis represents running time, and the vertical axis represents pointing error. The figure uses different line types and markings to show the pointing errors at various running time points for the proposed method, the online calibration without exceeding the standard, and the control method. The pointing error of the proposed method remains at the same order of magnitude across all running time points, while the pointing errors of the online calibration without exceeding the standard and the control method increase with running time.

[0092] As shown in Table 1, the pointing error of this method remained at the same order of magnitude within 720 hours. The pointing errors of the online calibration without deviation and the control method increased continuously with running time, reaching 0.93° and 0.97° respectively after 720 hours. The difference stemmed from the deviation comparison in step S4: step loss caused by pedestrian contact was detected and corrected in the next deviation, and was no longer accumulated; in step S5, the step loss amounts for the two turns were weighted and averaged separately, separating the backlash change caused by belt wear from the step loss, and the backlash step count was updated online accordingly, while the backlash compensation amount of the control method remained at the value at the calibration time. In the first 24 hours of operation, the pointing error of the online calibration without deviation was slightly lower than that of the control method because the former still had dead zone tracking.

[0093] like Figure 6 As shown, the horizontal axis represents the directional deviation, and the three vertical rows represent the proposed method, the gapless hysteresis position tracking method, and the control method, respectively. Each row uses a hollow circle to represent forward approach and a solid triangle to represent reverse approach. Two points are connected by a line, and the vertical dotted line passing through 0 serves as a reference. In the proposed method, the distance between two points and the reference line, as well as the length of the line connecting the two points, are both shorter than in the other two rows.

[0094] As shown in Table 2, the reversing approach deviation of dead-zone-free tracking is -0.31°, which differs from the forward approach deviation by one hysteresis angle. The number of idle steps after reversal is counted as the guide arm rotation angle. This method uses the width as the equivalent number of steps on the dead-zone tracking arm side for hysteresis steps, and the deviations in both approach directions are within 0.05°. The reversing approach deviation of the control method is between that of this method and dead-zone-free tracking, while the forward approach deviation is greater than both. This is because the hysteresis compensation gradually deviates from the actual hysteresis as the belt wears. The above results were obtained within the belt replacement cycle. After belt replacement, recalibration must be performed according to step S2 to bring the pointing error back to the level shown in Table 1.

[0095] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for rotating and positioning a guide arm based on zero-position calibration and step count calculation, characterized in that, include: Step S1: The stepper motor drives the guide arm through the transmission mechanism. When the reference mark on the guide arm passes the reference detector on the frame, the motor side step count and direction at the moment of output transition are latched as edge step count. Step S2: The guide arm is made to approach the same physical edge of the reference mark in both forward and reverse directions. The hysteresis step count is obtained by subtracting the reverse edge step count from the forward edge step count and then subtracting the hysteresis of the reference detector itself. The median of the two counts is used as the arm-side edge position, and the zero-position step count is obtained by adding the step count corresponding to the reference mark installation angle. Step S3: The dead zone with the hysteresis step count as its width is tracked by the motor-side step count to track the equivalent arm-side step count and the gap state is recorded. The actual rotation angle of the guide arm is obtained by multiplying the difference between the equivalent arm-side step count and the zero-position step count by the step equivalent. Step S4: During operation, the edge step count is subtracted for forward rotation and added to by half the reference detector's own hysteresis for reverse rotation. The edge position on the arm side is added to by half the hysteresis step count for forward rotation and subtracted to by half the hysteresis step count for reverse rotation as the predicted edge step count. The lost step amount is obtained by subtracting the predicted edge step number from the converted count. When the absolute value exceeds the recalibration tolerance, the lost step amount is subtracted from both the motor side step count and the arm side equivalent step count. Step S5: The lost step amounts for forward and reverse rotation are weighted and averaged respectively. When the two are reversed, the difference between the forward average value and the reverse average value is added to the hysteresis step count, and the actual rotation angle of the guide arm is updated.

2. The guide arm rotation positioning method based on zero-position calibration and step count calculation according to claim 1, characterized in that, In step S1, after the reference detector outputs a transition, it continuously samples and confirms the level stability within multiple subsequent drive pulse cycles before determining it as a valid edge. When the confirmation is successful, the motor-side step count latched at the transition moment is still used. When the guide arm passes the reference mark during operation, the delay step count is calculated based on the current speed and the response delay of the reference detector, and the delay step count is deducted from the edge step count according to the sign of the current direction of rotation. It is subtracted when rotating forward and added when rotating in reverse.

3. The guide arm rotation positioning method based on zero-position calibration and step count calculation according to claim 1, characterized in that, In step S2, the guide arm is made to cross the reference mark multiple times at a calibration speed lower than the running speed. The median of the edge step count of the same physical edge under both forward and reverse rotation is used for calculation. The larger of the ranges calculated for each edge step count under both forward and reverse rotation is used as the calibration dispersion. When the calibration dispersion exceeds the upper limit of dispersion, an alarm is output and the calibration result is not used.

4. The guide arm rotation positioning method based on zero-position calibration and step count calculation according to claim 1, characterized in that, In step S3, if the difference between the motor-side step count and the arm-side equivalent step count is greater than half of the backlash step count, the arm-side equivalent step count is set to the motor-side step count minus half of the backlash step count, and the gap state is recorded as being close to the forward rotation side; if the difference is less than half of the negative backlash step count, the arm-side equivalent step count is set to the motor-side step count plus half of the backlash step count, and the gap state is recorded as being close to the reverse rotation side; otherwise, the arm-side equivalent step count remains unchanged, and the gap state is recorded as being in the gap.

5. The guide arm rotation positioning method based on zero-position calibration and step count calculation according to claim 1, characterized in that, When the guide arm can rotate a full circle, the absolute value of the difference between the edge step counts triggered by two adjacent triggers of the same physical edge under the same direction is taken as the measured full circle step count. The step equivalent is obtained by dividing the full circle angle by the measured full circle step count. When the absolute value of the difference between the measured full circle step count and the nominal full circle step count calculated according to the nominal reduction ratio exceeds the upper limit of the transmission deviation, an alarm is output. When the rotation range of the guide arm is limited, a reference mark is set at each end of the rotation range. The step equivalent is obtained by dividing the included angle of the two reference marks measured during assembly by the absolute value of the difference between the edge step counts triggered in the same direction.

6. The guide arm rotation positioning method based on zero-position calibration and step count calculation according to claim 4, characterized in that, Also includes: The target number of steps on the arm side is calculated by converting the target direction angle into the step equivalent and the zero step number. The drive steering is determined by selecting the smaller turning angle in the path without exceeding the allowable rotation range. When the drive steering is the same as the side that the gap state is against, the target step number on the arm side is offset by half the backlash step number along the drive steering as the target step number on the motor side. When the drive steering is opposite to the side that is against, or when the gap state is in the gap, the target step number on the arm side is also offset by half the backlash step number along the drive steering as the target step number on the motor side. The absolute value of the difference between the equivalent step number on the arm side offset by half the backlash step number along the drive steering and the step count on the motor side is used as the backlash compensation step number, and this step is completed first in the initial stage of movement. The target step number on the arm side is taken as the nearest integer step, and the residual is rounded off and included in the next calculation.

7. The guide arm rotation positioning method based on zero-position calibration and step count calculation according to claim 1, characterized in that, In step S4, when the absolute value of the lost steps exceeds the upper limit of lost steps, the current pointing is stopped and step S2 is re-executed; the cumulative number of steps since the last recalibration is counted. When the cumulative number of steps exceeds the active recalibration threshold, the path for the next pointing is selected to pass through the side of the reference mark, or a recalibration action of crossing the reference mark and returning to the original pointing is inserted when the pointing arm is idle.

8. The guide arm rotation positioning method based on zero-position calibration and step count calculation according to claim 1, characterized in that, The reference mark has an entry edge and an exit edge along the rotation direction. In step S4, the edge step counts of the entry edge and the exit edge are latched in one overshoot in the same direction. The difference between the two is used as the measured mark width step count. The difference between the measured mark width step count and the calibration mark width step count measured in the same direction during calibration is used as the width deviation. When the absolute value of the width deviation exceeds the width tolerance, it is judged that the edge capture is unreliable and is only recorded without correction. When the absolute value of the width deviation does not exceed the width tolerance, the average of the step loss amounts of the entry edge and the exit edge is used as the step loss amount for this time.

9. The guide arm rotation positioning method based on zero-position calibration and step count calculation according to claim 1, characterized in that, Also includes: Before each movement is initiated, the movement flag is set and written to non-volatile storage along with the starting point count and target count. After the movement is completed and stabilized, the motor-side step count, the arm-side equivalent step count, and the gap state are written, and the movement flag is cleared. If the movement flag has been cleared upon restart, the guide arm is driven to rotate toward the nearest reference marker, and search windows are opened on both sides of the predicted edge step count. If the movement flag is still set, the search window is expanded to cover all possible edge positions between the starting point count and the target count. If an edge is captured within the search window, step S4 is followed for correction. If no edge is captured or the level of the reference detector is inconsistent with the level predicted according to the storage position, step S2 is re-executed.

10. The guide arm rotation positioning method based on zero-position calibration and step count calculation according to claim 9, characterized in that, The positioning parameter records in the non-volatile storage are divided into a calibration area and a status area. The calibration area stores the zero-position step count, the backlash step count, and the step equivalent, and is only rewritten when calibration or when the backlash step count is updated. The status area stores the motor-side step count, the arm-side equivalent step count, the gap status, the motion flag, the starting point count, and the target count, and is rewritten as the movement progresses. Each record has a serial number and a check code. When reading, the record with the latest serial number and that has passed the check is retrieved.