A method for outputting, monitoring and controlling high-speed pulse trains

By adopting a variety of zero return modes and real-time adjustment of trapezoidal acceleration and deceleration parameter curves in the stepper motor, the problem of acceleration mutation in the trapezoidal acceleration and deceleration algorithm is solved, achieving high-precision and low-cost smooth operation of the motor, and extending the time The service life of the motor.

CN118473283BActive Publication Date: 2024-10-11NANJING SHIDIAN ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410917235.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-10-11
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

In the existing technology, the trapezoidal acceleration and deceleration algorithm has a sudden acceleration at the beginning and end of the stepper motor's acceleration and deceleration, causing motor shock, affecting motor performance in high-precision and high-load applications, and cannot achieve low-cost and high-precision pulses at the same time. output.

Method used

Using the pulse output module, by setting different zero return modes and corresponding zero return speeds and approach speeds, configuring trapezoidal acceleration and deceleration parameter curves, and monitoring and adjusting them in real time during the operation to ensure that the motor remains stable when starting, running and stopping. , reduce mechanical impact and wear.

Benefits of technology

It improves the control accuracy and service life of the motor, reduces the control cost, achieves the best operating status in different working scenarios, and ensures the smooth operation and efficient positioning of the motor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118473283B_ABST
    Figure CN118473283B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of pulse generators, and proposes a method for outputting, monitoring and controlling a high-speed pulse train, which further improves the existing trapezoidal acceleration and deceleration algorithm for stepper motors. For this purpose, the present invention sets four corresponding zero return modes according to the working scene, configures the trapezoidal acceleration and deceleration parameter curve of the corresponding operation from the origin signal position, and forms a two-line pulse output to the motor driver based on the trapezoidal acceleration and deceleration parameter curve; the high-speed pulse train is monitored and managed during the operation, and the trapezoidal acceleration and deceleration parameter curve is adjusted according to the monitoring data to complete the operation; after the brake signal is used in the process, the corresponding zero return mode is re-executed. Through the technical solution recorded in the present invention, only four zero return modes are selected, and different working scenes are more accurately corresponded according to different forms of zero return modes, which is conducive to achieving high-speed pulse output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pulse generators, and in particular to a method for outputting, monitoring and controlling a high-speed pulse train. Background Art

[0002] The plug-in pulse output module is mainly used in industrial automation systems to connect stepper / servo drives, support high-speed pulse output, and has a variety of output modes and signal inputs. The control of pulse modules in the prior art is also very mature, especially the use of a smooth acceleration and deceleration process for stepper motors or other actuators to achieve stable motion. In the prior art, a trapezoidal acceleration and deceleration algorithm is usually used to achieve smooth acceleration, uniform motion, and precise deceleration of stepper motors, thereby improving the motion performance and positioning accuracy of stepper motors. However, due to the sudden change in acceleration at the beginning and end of the acceleration and deceleration of the trapezoidal acceleration and deceleration algorithm, there is a sudden change in acceleration. This sudden change will have an impact on the motor, especially in high-precision and high-load applications, which may cause the motor to lose steps, vibrate, or be damaged.

[0003] In this regard, there are also Chinese invention patents in the prior art, such as the application date of January 6, 2022, and the patent application number 202210011529.8, "An electric pulse control system and method". The invention relates to the field of pulse control technology; including a pulse output module, a database, a speed acquisition module, a controller, a personnel allocation module, a data acquisition module, a data analysis module and an alarm module; the pulse output module is used to output electric pulses, and the electric pulses are used to drive the moving speed of the stepper motor to the target speed; the controller is used to compare the actual moving speed with the target speed; if the difference between the actual moving speed and the target speed is greater than the preset difference range; an adjustment signal is generated; the personnel allocation module is used to receive the adjustment signal and assign the corresponding staff to adjust the electric pulse output by the pulse output module; improve control efficiency; when the stepper motor is running; the data analysis module is used to receive the operating parameters of the stepper motor and perform early warning analysis; determine whether the stepper motor is running abnormally; strengthen the protection of the stepper motor to avoid safety accidents.

[0004] This redesigned solution helps to improve the monitoring accuracy of the stepper motor's operating status, and can detect faults in the stepper motor in time; it also strengthens the protection of the stepper motor to avoid safety accidents. However, the whole solution has very high requirements for monitoring, and requires high-speed real-time calculation, high control cost, which is not conducive to large-scale promotion. The more general trapezoidal curve has a simple algorithm, takes less time, has a fast response, high efficiency, and is easy to implement. However, the uniform acceleration and uniform deceleration stages do not conform to the speed change law of the stepper motor, and cannot smoothly transition at the speed change and uniform speed turning points. Therefore, the trapezoidal curve algorithm in the prior art can usually only be used in occasions where the speed increase and decrease process is not required. It is impossible to achieve low cost and high-precision pulse output at the same time in the prior art. Summary of the invention

[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to propose a method for outputting, monitoring and controlling a high-speed pulse train, further improving the existing trapezoidal acceleration and deceleration algorithm for stepper motors, improving its control accuracy, making it meet more application scenarios, giving full play to the motor performance, and reducing impact vibration, thereby increasing the service life of the motor.

[0006] To achieve the above object, the present invention provides a method for outputting, monitoring and controlling a high-speed pulse train, which is implemented by a pulse output module and includes the following steps:

[0007] S1: The pulse output module is connected to the motor driver to obtain the working scene;

[0008] S2: According to the working scenario, the corresponding return-to-zero mode is set. The return-to-zero mode only uses return-to-zero mode 19, return-to-zero mode 21, return-to-zero mode 24, and return-to-zero mode 28:

[0009] S3: Obtain the origin signal according to the zero return mode selected in S2 and the corresponding zero return speed and zero return approach speed in the mode; configure the trapezoidal acceleration and deceleration parameter curve of the corresponding operation from the origin signal position, and form a two-line pulse output to the motor driver based on the trapezoidal acceleration and deceleration parameter curve;

[0010] S4: Monitor and manage the high-speed pulse train during the operation, and adjust the trapezoidal acceleration and deceleration parameter curve according to the monitoring data;

[0011] S5: Complete the homework;

[0012] In the process, a brake signal is additionally provided, and the brake signal is at the highest priority. When the brake signal is used, the corresponding return to zero mode is re-executed.

[0013] Preferably, the zero return mode selection in S2 is related to the expected initial position, where: Zero return mode 19: Positive zero return without positive limit switch, stopping outside the origin signal; Zero return mode 21: Negative zero return without negative limit switch, stopping outside the origin signal; Zero return mode 24: Positive zero return with limit switch, stopping inside the origin signal; Zero return mode 28: Negative zero return with limit switch, stopping inside the origin signal. In this way, only 4 zero return modes can fully cover all motion scenarios, providing guarantee for the selection of high-precision pulse output in the later stage.

[0014] Preferably, after any zero return mode successfully achieves zero return, a coordinate zero clearing instruction will be automatically executed once.

[0015] Preferably, an output timer is provided in the pulse output module, and a counting timer is also set. The output timer and the counting timer are configured in a cascaded master-slave mode; The pulse output scheme in S3 uses a single / double pulse output mode; The four-way pulses are completed by four timers respectively. Each timer enables two output channels. The timer generates an interruption every 1ms, and modifies the pulse frequency of each channel in the interruption.

[0016] Preferably, the trapezoidal acceleration and deceleration parameter curve in S3 is divided into three stages: acceleration, constant speed, and deceleration. The specific manifestation form in the acceleration stage is <x%, where Vbefore is the speed before acceleration, a is the acceleration, and x% is the proportion of the pulse change before and after. Its splitting boundary is 1kHz.

[0017] Preferably, the trapezoidal acceleration and deceleration parameter curve in S3 is divided into three stages: acceleration, constant speed, and deceleration. The specific manifestation form in the deceleration stage is a = , where Vrunning is the current running speed, Vbase is the base speed, and the remaining steps are the remaining action steps. The most suitable "deceleration acceleration" a for the current situation is calculated through the above formula. During the entire deceleration process, the "deceleration acceleration" is calculated every time the speed is adjusted in the interruption, so as to continuously adjust and optimize the values of the number of steps, deceleration time, and the lowest speed before shutdown. Ensure that when the number of steps reaches the set value, the deceleration time is also close to 0, and the lowest speed before shutdown is close to the base speed.

[0018] Preferably, the pulse frequencies of each channel are divided into three gears: 0 - 20Hz, 20Hz - 2kHz, 2kHz - 200kHz. The maximum adjustment accuracy is at 20, 2kHz, and 200kHz. However, when crossing gears during the gradual increase of the pulse frequency, it is necessary to change the timer frequency division, which will cause a short delay in the pulse.

[0019] Preferably, after the operation in S5 is completed, the pulse output signal obtained from the motor is collected by the encoder, and the pulse output signal is loaded into the test mainboard to form a motor output pulse signal graph, and the motor output pulse signal graph and the pulse signal graph formed by the pulse output module are compared, and the fluctuation point is found and optimized according to the needs of the corresponding operation. Since the ultimate purpose of the present invention is to drive the motor, it is more reasonable and accurate to use the pulse output signal collected at the motor as the observation object, and the adjustment thereof is also more targeted.

[0020] Preferably, during the comparison of the graphics, the pulse signal graphics formed by the pulse output module are used as a reference to set the expected offset. When the offset after the actual graphics comparison is greater than the expected offset, the offset difference will be reduced by extending the deceleration time.

[0021] Preferably, the brake signal is level controlled and has the highest priority in the entire system, and is immediately effective at any time. Therefore, as long as the brake command is 1, not only the current movement is immediately shut down, but also the next movement is not allowed to start. At the same time, when the brake signal is used, it may interfere with the zero point and encoder signal, causing interference pulses. These interference pulses may be mistaken by the counter as useful pulses, causing disorder in the positioning system.

[0022] Through the technical solution recorded in the present invention, only 4 return-to-zero modes are selected, and according to different forms of return-to-zero modes, different working scenes are more accurately corresponded, which is conducive to realizing high-speed pulse output. The technical effect brought by the present invention is mainly based on the needs of the actual working scene, taking into account factors such as the initial state, movement direction, speed, and approach speed, to ensure the accuracy and efficiency of the return to zero. Accurate trapezoidal acceleration and deceleration control is achieved under the condition of accurate return to zero: according to the selected return-to-zero mode and the corresponding parameters, an accurate trapezoidal acceleration and deceleration parameter curve can be configured. Moreover, the present invention optimizes the existing trapezoidal acceleration and deceleration control model in the prior art, not only the required parameters are far less than the existing model requirements, but also it can ensure that the motor can remain stable during the start-up, operation and stop process, reduce mechanical shock and wear, and extend the service life of the equipment.

[0023] During the operation, the system monitors the output of the high-speed pulse train in real time, and dynamically adjusts the trapezoidal acceleration and deceleration parameter curve according to the monitoring data. This real-time feedback and adjustment mechanism can ensure that the motor can maintain the best operating state under different working conditions, and timely access the brake signal when an abnormality occurs. The brake signal has the highest priority in the entire system. Once triggered, it will immediately stop the current movement and prohibit the start of the next movement. This design ensures that in an emergency, the system can respond quickly and effectively, and find the zero position before the next work, avoiding the impact of braking behavior on subsequent actions.

[0024] After the operation is completed, the system can collect the pulse output signal from the motor through the encoder, and compare it with the output pulse signal graph to find the fluctuation point and optimize it. This optimization mechanism is not only for the pulse output system, but also for the corresponding execution equipment, which can continuously improve the operating efficiency and accuracy of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention.

[0026] Figure 1 The figure is a flow chart of a method for outputting, monitoring and controlling a high-speed pulse train according to the present invention.

[0027] Figure 2 Schematic diagram of the overall system framework of a high-speed pulse train output, monitoring and control method of the present invention.

[0028] Figure 3 : A schematic flow chart of the zero return mode 19 in a method for outputting, monitoring and controlling a high-speed pulse train according to the present invention.

[0029] Figure 4 : A schematic flow chart of the zero return mode 21 in a method for outputting, monitoring and controlling a high-speed pulse train according to the present invention.

[0030] Figure 5 : A schematic flow chart of the zero return mode 24 in a method for outputting, monitoring and controlling a high-speed pulse train according to the present invention.

[0031] Figure 6 : A schematic flow chart of the zero return mode 28 in a method for outputting, monitoring and controlling a high-speed pulse train according to the present invention.

[0032] Figure 7 It is: a conventional trapezoidal acceleration and deceleration curve.

[0033] Figure 8 The figure is a trapezoidal acceleration and deceleration curve diagram finally realized in a method for outputting, monitoring and controlling a high-speed pulse train of the present invention.

[0034] Fig. 9 The invention discloses an uplink data table of a low-current grounding system in which a high-speed pulse train output, monitoring and control method of the invention is implemented.

[0035] Fig.10 The present invention provides a downlink data table of a low-current grounding system in which a high-speed pulse train output, monitoring and control method of the present invention is implemented. DETAILED DESCRIPTION

[0036] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. It can be understood that the specific implementation methods described here are only used to explain the relevant content, rather than to limit the present disclosure.

[0037] like Figure 1 , 2 As shown, the present invention provides a method for outputting, monitoring and controlling a high-speed pulse train, which is implemented by a pulse output module and includes the steps of:

[0038] S1: The pulse output module is connected to the motor driver to obtain the working scene;

[0039] S2: according to the working scene, a corresponding return to zero mode is set, and the return to zero mode at least includes return to zero mode 19, return to zero mode 21, return to zero mode 24, and return to zero mode 28: after any return to zero mode is successfully realized, a coordinate clearing instruction will be automatically executed.

[0040] S3: Get the origin signal according to the zero return mode selected in S2 and the corresponding zero return speed and zero return approach speed in this mode; configure the trapezoidal acceleration and deceleration parameter curve of the corresponding operation from the origin signal position, and form a two-line pulse output to the motor driver based on the trapezoidal acceleration and deceleration parameter curve; The pulse output scheme uses a single / double pulse output mode; the four pulses are completed by four timers respectively, each timer opens two output channels, and the timer generates an interrupt every 1ms, and the pulse frequency of each channel is modified in the interrupt. The pulse frequency of each channel is divided into three gears: 0-20Hz, 20Hz-2kHz, and 2kHz-200kHz.

[0041] S4: During the operation, the high-speed pulse train is monitored and managed, and the trapezoidal acceleration and deceleration parameter curve is adjusted according to the monitoring data; at this time, the object of adjustment is based on the signal output by the pulse output module, and the adjustment method is still based on adjusting some parameters in the trapezoidal acceleration and deceleration parameter curve.

[0042] S5: Complete the job; after the job is completed, the encoder collects the pulse output signal from the motor, loads the pulse output signal into the test mainboard, and compares it with the output pulse signal graph, finds the fluctuation point and optimizes it according to the needs of the corresponding job.

[0043] In the process, a brake signal is additionally provided, and the brake signal is at the highest priority. When the brake signal is used, the corresponding return to zero mode is re-executed.

[0044] It should be noted that the zero return mode 19, zero return mode 21, zero return mode 24, and zero return mode 28 described in the present invention are all based on the records in the CIA402 servo motion control standard specification. However, in fact, there are dozens of zero return modes in the CIA402 servo motion control standard. The present invention only needs to adopt 4 of the zero return modes to fully meet the working needs.

[0045] like Figure 3 As shown, the return-to-zero mode 19 described in S2 includes two working states;

[0046] Working state 1: When there is no origin signal input initially: first move in the positive direction at the zero return speed, and when there is an origin signal input, decelerate to 0; then move in the negative direction at the zero return approach speed again until the origin signal disappears and stops moving;

[0047] Working state 2: When the initial origin signal exists: first move in the negative direction at the zero return approach speed, and stop moving when the origin signal disappears.

[0048] like Figure 4 As shown, the return-to-zero mode 21 in S2 includes two working states:

[0049] Working state 1: When there is no origin signal input initially: first move in the negative direction at the zero return speed, and when there is an origin signal input, decelerate to 0; then move in the positive direction at the zero return approach speed again until the origin signal disappears and stops moving;

[0050] Working state 2: When the initial origin signal exists: first move in the positive direction at the zero approach speed, and stop moving when the origin signal disappears.

[0051] like Figure 5 As shown, the return-to-zero mode 24 in S2 includes three working states:

[0052] Working state 1: When there is no origin or positive limit signal input initially: first move in the positive direction at the zero return speed until the origin signal input is detected, then decelerate until the speed is 0; then move in the negative direction at the zero return approach speed until the origin signal disappears, then decelerate until the speed is 0; then move in the positive direction at the zero return approach speed until the origin signal appears and stop moving;

[0053] Working state 2: When there is no origin or positive limit signal input initially: first move in the positive direction at the zero return speed, and when the positive limit signal is input, brake until the speed is 0; then move in the negative direction at the zero return speed, and when the origin signal is exited, decelerate until the speed is 0; then move in the positive direction at the zero return approach speed until the origin signal appears and stop moving;

[0054] Working state 3: When the initial origin signal exists: first move in the negative direction at the zero return approach speed, and when the origin signal is exited, decelerate until the speed is 0; then move in the positive direction at the zero return approach speed until the origin signal appears and stop moving.

[0055] like Figure 6 As shown, the return-to-zero mode 28 in S2 includes three working states:

[0056] Working state 1: When there is no origin or negative limit signal input initially: first move in the negative direction at the zero return speed until the origin signal input is detected, then decelerate until the speed is 0; then move in the positive direction at the zero return approach speed until the origin signal disappears, then decelerate until the speed is 0; then move in the negative direction at the zero return approach speed until the origin signal appears and stop moving;

[0057] Working state 2: When there is no origin or negative limit signal input initially: first move in the negative direction at the zero return speed, and when the negative limit signal is input, brake until the speed is 0; then move in the positive direction at the zero return speed, and when the origin signal is exited, decelerate until the speed is 0; then move in the negative direction at the zero return approach speed until the origin signal appears and stop moving;

[0058] Working state 3: When the initial origin signal exists: first move in the positive direction at the zero return approach speed, and when the origin signal is exited, decelerate until the speed is 0; then move in the negative direction at the zero return approach speed until the origin signal appears and stop moving.

[0059] It should be noted that in the prior art, determining a trapezoidal acceleration / deceleration curve model usually requires the following parameters:

[0060] 1. Initial position (q0) and end position (q1): These two parameters define the total displacement the machine or system needs to move.

[0061] 2. Initial time (t0) and end time (t1): Although the time is usually calculated based on other parameters (such as speed, acceleration, etc.) in trapezoidal acceleration and deceleration planning, understanding the total motion time range (or expected time range) is helpful for system design and optimization.

[0062] 3. Initial speed (v0) and end speed (v1): These two parameters represent the speed at which the machine or system starts and ends motion, respectively. In trapezoidal acceleration and deceleration, the initial speed is usually zero or close to zero, and the end speed may also be zero or close to zero, but this is not required.

[0063] 4. Maximum speed (vmax or vv): During trapezoidal acceleration and deceleration, the machine or system may reach a constant maximum speed. This speed is limited by mechanical components and is a key factor affecting motion time and acceleration / deceleration.

[0064] 5. Acceleration (a) and deceleration (d): These two parameters define the rate at which a machine or system accelerates and decelerates. Acceleration is the rate at which speed increases over time, while deceleration is the rate at which speed decreases over time. They determine the time it takes for a machine or system to go from rest to maximum speed and from maximum speed to rest.

[0065] 6. Constant acceleration duration (Ta) and constant deceleration duration (Td): These two parameters define the time period during which the machine or system maintains constant acceleration and deceleration before and after reaching the maximum speed. In practical applications, in order to simplify calculations, it is usually assumed that Ta and Td are equal.

[0066] 7. Constant speed segment duration (tm): If the machine or system reaches the maximum speed during the movement, it will maintain this speed for a period of time. This period of time is the constant speed segment duration. Combining the above parameters, a complete trapezoidal acceleration and deceleration curve model can be described in the following way: Figure 7 As shown, its expression is:

[0067] • During the acceleration phase (t0 ≤ t < t0 + Ta), when the velocity increases from v0 to vmax, position A in the figure, the displacement is a parabolic function of time.

[0068] • In the uniform speed stage (t0 + Ta ≤ t < t1 - Td), the velocity remains at vmax, that is, position B in the figure, and the displacement is a linear function of time.

[0069] • During the deceleration phase (t1 - Td ≤ t ≤ t1), the velocity decreases from vmax to v1, that is, position C in the figure, and the displacement is a quadratic polynomial of time.

[0070] And the relationships and constraints between these parameters need to be determined according to the specific mechanical system and application requirements.

[0071] The present invention adopts the zero return mode set according to the working scene, and only needs four parameters for the trapezoidal acceleration and deceleration curve model: acceleration time, deceleration time, start speed, and running speed. Among them, the running speed, acceleration time, and deceleration time are modified frequently, so they are placed in the downlink instruction. The start speed is placed in the configuration parameters, and the four channels can be set separately.

[0072] In the present invention, the trapezoidal acceleration and deceleration parameter curve in S3 is divided into three stages: acceleration, constant speed, and deceleration. The specific manifestation of the acceleration stage is <x%, where Vbefore is the speed before acceleration, a is the fixed acceleration value; x% is the ratio of the change before and after the pulse. The specific manifestation of the deceleration stage is a = .

[0073] The technical solution in the present invention will be further explained below in view of the acceleration mutation problem and deceleration step number problem in the entire model.

[0074] Acceleration mutation problem: In a specific embodiment, the user sets the following parameters:

[0075] Starting speed: 1 Hz

[0076] Running speed: 200 kHz

[0077] Acceleration time: 1 second;

[0078] If according to the existing trapezoidal acceleration and deceleration model, start with a starting speed of 1 Hz, and then wait for 1 s when the 1 Hz output is completed. According to the model calculation, the 200 kHz pulse should be output immediately. At this time, the speed of the motor will have an instantaneous mutation from 1 Hz to 200 kHz, and the motor acceleration is full, which is very easy to miss steps or jitter.

[0079] It can be understood that in the continuous acceleration process that should be, only two discrete points (1 Hz, 200 kHz) are fitted. So in fact, the trapezoidal acceleration and deceleration curve cannot be completely applied. And the essence of the above problem is that the difference between the frequencies of the two adjacent pulses is not allowed to be too large. And this difference should be a ratio, such as: <x%

[0080] Here, V represents the pulse frequency, the unit is Hz, and the x% is the ratio of the change before and after the pulse, usually set at 20%. A small value of this means a small change amount and better continuity. This value determines the acceleration time and deceleration time.

[0081] In fact, it is necessary to ensure that the ratio of ΔV to the current pulse frequency does not exceed a certain ratio. In this way, both the continuity of the pulse and the pulse speed can be effectively guaranteed.

[0082] Therefore, we continue to use the above parameters, i.e., the starting speed is 1Hz, the running speed is 200kHz, and the acceleration is 1s. If 1Hz is split and disassembled into 10Hz for output, then it takes 100ms for 10Hz to output. The speed after output should be acceleration*100ms+starting speed 10Hz. The obtained value is approximately equal to 20kHz, which will make the curve smoother. It can be seen that the problem that needs to be solved now is how to split it to ensure that as many points as possible can be fitted on the curve, so as to ensure better and smoother operation continuity of the motor.

[0083] Based on the known conditions: <x%

[0084] To do the conversion:

[0085] V after = T before × a + V before

[0086] T front = (T is in milliseconds, so you need to multiply it by 1000)

[0087] <x%

[0088] It can be seen that the acceleration a is actually a fixed value, which is determined after the user sets all parameters, so the final ratio is related to the current output pulse speed.

[0089] But we also need to know that it is not enough to ensure smooth motion as long as the current speed is large enough, for example:

[0090] The acceleration time from 1Hz to 5001Hz is 1s, and the calculated acceleration is 5Hz / ms.

[0091] If 1Hz is split at the position where 1Hz runs to 1ms, the complete pulse period after splitting is 2ms and the frequency is 500Hz. However, when the first 500Hz pulse is output, the time reaches 2ms. According to the acceleration calculation, the actual output frequency of the second pulse should be 10Hz. Obviously, there is a frequency inversion problem. The pulse frequency before the acceleration period is higher than the pulse frequency after it.

[0092] Therefore, the split frequency is not the larger the better, but it must meet the following requirements: the split frequency is less than or equal to the normal acceleration frequency. In this way, as many points as possible can be fitted on the acceleration and deceleration curve without frequency inversion.

[0093] Because the single-chip microcomputer system cannot split the pulse indefinitely, assuming that the frequency value is modified every 1ms, the split boundary is 1 / 1ms = 1000Hz. This means that once the frequency of the current pulse exceeds 1kHz, there is no need to split it further, and the acceleration and deceleration model can be directly applied.

[0094] Deceleration step problem:

[0095] In the existing technology, during the actual deceleration process, three parameters must be controlled at the same time: number of steps, deceleration time, and minimum speed before shutdown. These three parameters need to be coordinated at the same time to make the entire deceleration process smoother. If one of the parameters is not controlled well, the following situations may occur:

[0096] The starting speed is 1Hz, the deceleration time is 1s, and when there are 100ms left in the deceleration time, the current calculation speed is 2Hz, and the number of steps left is 2. If the number of steps left is to be guaranteed, the deceleration time cannot be guaranteed. These three parameters cannot be satisfied at the same time.

[0097] Therefore, during the entire deceleration process, the deceleration rate needs to be adjusted dynamically so that all three parameters can be met at the same time.

[0098] Solution

[0099] The core question is, when a certain number of steps remain, what should the deceleration be set to? By breaking the entire deceleration process into N small processes - in the actual code, an interrupt is entered every 1ms, which is a small process - we can get the following formula:

[0100] ×T remaining = number of remaining steps;

[0101] a= ;

[0102] a= ;

[0103] According to the above formula, the current running speed, base speed, and the number of steps remaining can be used to calculate the most suitable "deceleration" a. During the entire deceleration process, the "deceleration" is calculated every time the speed is interrupted to adjust the speed, so as to continuously adjust the values ​​of the three optimization steps, deceleration time, and minimum speed before shutdown. Ensure that when the number of steps reaches the set value, the deceleration time is also close to 0, and the minimum speed before shutdown is close to the base speed. This makes the entire deceleration process smooth. In actual use, the motion trajectories of the absolute / relative position mode, speed mode, and return to zero mode all follow this set of trapezoidal acceleration and deceleration parameters.

[0104] like Figure 8The figure shows a schematic diagram after fitting using the technical solution described in the present invention. It can be seen that there is a more obvious fluctuation in the deceleration stage on the right side, and there is room for further optimization here.

[0105] In the embodiments described in the present invention, it is necessary to connect to supporting components to work. The module adopts XB6-P2000H power supply, XB6-CB0002 coupler, and cooperates with a computer pre-installed with GX WorkS3 software. And motor drivers, stepper / servo motors and other equipment connected by CC-Link IE Field Basic dedicated shielded cables. One Mitsubishi PLC, one switching power supply, module mounting rails and rail fixings, and equipment configuration files. It should be noted that in the present invention, only one PLC is needed to achieve very precise pulse output and management control, which is also very rare in the entire industry. It is usually necessary to achieve the following Fig. 9 , Fig.10 To achieve such an effect, a higher-precision PAC is often required, but the price of PAC is much higher than that of PLC. If installed on a device for mass transfer of Micro-LEDs, there are 20-30 generators on a single device, and the cost of the equipment alone is tens of thousands of yuan. In addition, PLC is designed to operate stably in harsh industrial environments, and its reliability is higher under extreme conditions such as high vibration, high temperature, and high humidity. This stability and reliability are crucial to achieving the continuity and safety of the pulses provided by the present invention for the production process.

[0106] In this embodiment, only channel 1 is used as the monitoring object:

[0107] 1. Channel 1 starts and returns to zero:

[0108] a. Configure the configuration parameters, select the zero return mode and set the zero return speed and zero return approach speed;

[0109] b. Ensure that the brake command of channel 1 is 0 and channel 1 is in a stationary state;

[0110] a) Make sure Ch1 Brake, Ch1 Pulse status Flag 1, and Ch1 Pulse status Flag 2 are equal to 0;

[0111] c. Set the zero return command of channel 1 from 0 to 1 to start zero return.

[0112] a) Ch1 Home is set from 0 to 1.

[0113] 2. Channel 1 turns on speed mode, running at 100 kHz, and changes the speed to 10kHz during operation

[0114] a. Configure the configuration parameters;

[0115] b. Set channel 1 to speed mode;

[0116] a) Ch1 Position / Velocity Mode is set to 1;

[0117] c. Configure channel 1 to run at a speed of 100 kHz and move in a direction of 0 (forward);

[0118] a) Ch1 Running Velocity is set to 100000;

[0119] b) Ch1 Running Direction is set to 0;

[0120] d. Ensure that the brake command of channel 1 is 0 and channel 1 is in a stationary state;

[0121] a) Make sure Ch1 Brake, Ch1 Pulse status Flag 1, and Ch1 Pulse status Flag 2 are equal to 0;

[0122] e. Set the start command of channel 1 from 0 to 1 to start the movement;

[0123] a) Ch1 start is set from 0 to 1.

[0124] f. During the exercise, change the running speed of channel 1 to 10kHz;

[0125] a) Ch1 Running Velocity is set to 10000;

[0126] g. Reset the start command of channel 1 from 0 to 1 to start motion merging.

[0127] a) Ch1 start is set from 0 to 1.

[0128] 3. The current position of channel 1 is 10000, and it moves to the position of 20000. During the movement, the position is changed to 50000.

[0129] a. Configure the configuration parameters as needed;

[0130] b. Set channel 1 to absolute position mode;

[0131] a) Ch1 Position / Velocity Mode is set to 0;

[0132] b) Ch1 Absolute / Relative Position Mode is set to 0;

[0133] c. Configure channel 1 to run at 20,000 steps and 1 kHz speed;

[0134] a) Ch1 Running Velocity is set to 1000;

[0135] b) Set Ch1 Running Position to 20000;

[0136] d. Ensure that the brake command of channel 1 is 0 and channel 1 is in a stationary state;

[0137] a) Make sure Ch1 Brake, Ch1 Pulse status Flag 1, and Ch1 Pulse status Flag 2 are equal to 0;

[0138] e. Set the start command of channel 1 from 0 to 1 to start the movement.

[0139] a) Ch1 start is set from 0 to 1.

[0140] f. During the movement, change the number of steps of channel 1 to 50000;

[0141] a) Set Ch1 Running Position to 50000;

[0142] g. Reset the start command of channel 1 from 0 to 1 to start motion merging.

[0143] a) Ch1 start is set from 0 to 1.

[0144] In the above embodiments, a brake signal can be added at any time. The brake signal is configured and input by the PLC, and its input signal Input Logic can be configured as:

[0145] 0: Limit is normally open, origin brake is normally open;

[0146] 1: Limit is normally open, origin brake is normally closed;

[0147] 2: Limit is normally closed, origin brake is normally open;

[0148] 3: Limit normally closed, origin brake normally closed;

[0149] The input signal logic can be set for four channels individually, of which the positive limit and negative limit can only be set uniformly, and the origin and brake can only be set uniformly. After the operation in S5 is completed, the encoder collects the pulse output signal obtained from the motor, and the pulse output signal is loaded into the test mainboard, and compared with the output pulse signal graph, the fluctuation point is found and optimized according to the needs of the corresponding operation. In the process of comparing the graphs, the pulse signal graph formed by the pulse output module is used as a reference to set the expected offset. When the offset after the actual graph comparison is greater than the expected offset, the deceleration time will be extended to reduce the offset difference, thereby ensuring that better results can be achieved when the related operation is performed next time.

[0150] In the prior art, in order to ensure the smoothness of the output signal, most drivers are equipped with smoothing algorithms. However, these smoothing algorithms will forcibly change the waveform output by the pulse output module. Customers do not want to fix the algorithm of the driver, but if the smoothing algorithm is not used, large fluctuations may occur, resulting in unstable output. Simply put, in the prior art, if you want to have a better waveform output, you need a more expensive control device to configure a more complex algorithm. In this way, there is no need to use the smoothing algorithm in the driver, but the cost is very high, equivalent to an output channel cost of about 2,000 yuan; or you can only use a relatively cheap configuration, while relying on the smoothing algorithm in the driver to ensure the smoothness of the output. The present invention can achieve stable and controllable pulse output at a lower cost, that is, 500 yuan for 4 channels, without relying on the smoothing algorithm of the driver.

[0151] Although the present invention is disclosed as above with preferred embodiments, it is not intended to limit the scope of the present invention. Any person of ordinary skill in the art can make some improvements without departing from the scope of the present invention, that is, all equivalent improvements made in accordance with the present invention should be covered by the scope of the present invention. In the description of this specification, the description of reference terms "an embodiment / method", "some embodiments / methods", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present application. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment / method or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, without contradicting each other, a person of ordinary skill in the art can combine and combine the different embodiments / methods or examples described in this specification and the features of different embodiments / methods or examples.

[0152] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0153] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.

Claims

1. A method for outputting, monitoring and controlling a high-speed pulse train, implemented using a pulse output module, characterized in that: Includes steps: S1: The pulse output module is connected to the motor driver to obtain the working scene; S2: According to the working scenario, the corresponding return to zero mode is set. The return to zero mode only adopts return to zero mode 19, return to zero mode 21, return to zero mode 24, and return to zero mode 28: The return to zero mode selection in S2 is related to the expected initial position, wherein: return to zero mode 19: positive return to zero without positive limit, stop outside the origin signal; return to zero mode 21: negative return to zero without negative limit, stop outside the origin signal; return to zero mode 24: positive return to zero with limit, stop inside the origin signal; return to zero mode 28: negative return to zero with limit, stop inside the origin signal; S3: Obtain the origin signal according to the homing mode selected in S2 and the corresponding homing speed and homing approach speed in this mode; configure the trapezoidal acceleration and deceleration parameter curve of the corresponding operation from the origin signal position, and form two-line pulses based on the trapezoidal acceleration and deceleration parameter curve and output them to the motor driver; an output timer is provided in the pulse output module, and a counting timer is also set, and the output timer and the counting timer are configured in a cascaded master-slave mode; the pulse output scheme in S3 uses a single / double pulse output mode; the four-way pulses are completed by four timers respectively, each timer opens two output channels, and the timer generates an interrupt every 1 ms, and modifies the pulse frequency of each channel in the interrupt; the trapezoidal acceleration and deceleration parameter curve in S3 is divided into three stages: acceleration, constant speed, and deceleration. The specific manifestation form of the acceleration stage is <x%, where Vbefore is the speed before acceleration, a is the fixed acceleration value, and its splitting boundary is 1 kHz; the specific manifestation form of the deceleration stage is a= , where Vrunning is the current running speed, Vbase is the base speed, and the remaining steps are the remaining action steps; S4: Monitor and manage the high-speed pulse train during the operation, and adjust the trapezoidal acceleration and deceleration parameter curve according to the monitoring data; S5: Complete the homework; In the process, a brake signal is additionally provided, and the brake signal is at the highest priority. When the brake signal is used, the corresponding return to zero mode is re-executed.

2. A method for outputting, monitoring and controlling a high-speed pulse train as claimed in claim 1, characterized in that: After any of the above return to zero modes successfully returns to zero, a coordinate clearing instruction will be automatically executed.

3. The method for outputting, monitoring and controlling a high-speed pulse train according to claim 1, characterized in that: The pulse frequency of each channel is divided into three gears: 0-20Hz, 20Hz-2kHz, and 2kHz-200kHz.

4. The method for outputting, monitoring and controlling a high-speed pulse train according to claim 1, characterized in that: After the operation in S5 is completed, the encoder collects the pulse output signal from the motor, and loads the pulse output signal into the test mainboard to form a motor output pulse signal graph. The motor output pulse signal graph is compared with the pulse signal graph formed by the pulse output module, and the difference is found and optimized according to the needs of the corresponding operation.

5. A method for outputting, monitoring and controlling a high-speed pulse train as claimed in claim 4, characterized in that: In the process of comparing the graphs, the pulse signal graph formed by the pulse output module is used as a reference to set the expected offset. When the offset after the actual graph comparison is greater than the expected offset, the offset difference will be reduced by extending the deceleration time.

6. A method for outputting, monitoring and controlling a high-speed pulse train as claimed in claim 1, characterized in that: The brake signal is level controlled and has the highest priority in the entire system and is immediately effective at any time.