[go: up one dir, main page]

CN103699054B - The quick accurately predicting localization method of industry straight-line motion mechanism and positioning system - Google Patents

The quick accurately predicting localization method of industry straight-line motion mechanism and positioning system Download PDF

Info

Publication number
CN103699054B
CN103699054B CN201410003567.4A CN201410003567A CN103699054B CN 103699054 B CN103699054 B CN 103699054B CN 201410003567 A CN201410003567 A CN 201410003567A CN 103699054 B CN103699054 B CN 103699054B
Authority
CN
China
Prior art keywords
pulse
counter
positioning
signal
pulses
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410003567.4A
Other languages
Chinese (zh)
Other versions
CN103699054A (en
Inventor
孙光辉
任雨
高会军
孙一勇
张增杰
谢文麟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin Institute of Technology Shenzhen
Original Assignee
Harbin Institute of Technology Shenzhen
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Harbin Institute of Technology Shenzhen filed Critical Harbin Institute of Technology Shenzhen
Priority to CN201410003567.4A priority Critical patent/CN103699054B/en
Publication of CN103699054A publication Critical patent/CN103699054A/en
Application granted granted Critical
Publication of CN103699054B publication Critical patent/CN103699054B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Control Of Position Or Direction (AREA)

Abstract

工业直线运动机构的快速精确预测定位方法及定位系统,涉及工业直线运动机构的精确定位技术。本发明在定位过程中当预设脉冲数发送完成且设备还未停止时预测设备运动机构有没有可能最终停在目标位置,若有,就等待其停止再做进一步判断。若没有可能,则立即向位置脉冲减计数器发送若干个脉冲,让电机继续转动,如此往复,直到运动机构到达目标位置为止。本发明能够保证位移传感器的精度为5微米时定位精度在5微米以内,且由于在定位过程中加入了预测过程,根据预测结果决定电机的下一步运动方式,与传统的高精度定位方式相比,定位时间缩短了20%以上。本发明适用于工业直线运动机构的快速精确定位。

A fast and accurate predictive positioning method and positioning system for an industrial linear motion mechanism relate to the precise positioning technology of an industrial linear motion mechanism. In the positioning process, the present invention predicts whether the movement mechanism of the equipment may eventually stop at the target position when the preset pulse number is sent and the equipment has not stopped. If so, it waits for it to stop before making further judgments. If it is not possible, send several pulses to the position pulse subtracting counter immediately, so that the motor continues to rotate, and so on, until the motion mechanism reaches the target position. The invention can ensure that the positioning accuracy of the displacement sensor is within 5 microns when the precision of the displacement sensor is 5 microns, and because the prediction process is added in the positioning process, the next movement mode of the motor is determined according to the prediction result, compared with the traditional high-precision positioning mode , The positioning time has been shortened by more than 20%. The invention is suitable for fast and precise positioning of industrial linear motion mechanisms.

Description

工业直线运动机构的快速精确预测定位方法及定位系统Fast and accurate predictive positioning method and positioning system for industrial linear motion mechanism

技术领域technical field

本发明涉及工业直线运动机构的精确定位技术。The invention relates to the precise positioning technology of an industrial linear motion mechanism.

背景技术Background technique

在如高精度运动平台等工业设备运动控制中,运动机构能够精确、快速的运动到指定坐标位置是十分重要的。然而现有的电机驱动器都是根据接收到的位置脉冲数决定自己此次要到达的目标位置,再根据反馈的位置脉冲来决定自己停止的位置。在一些情况下(如在台达电机驱动器使用龙门控制方式时),由于位移传感器输出并不能作为反馈传给驱动器(这就需要通过一些比例运算来确定要发给驱动器的位置脉冲数,由于电机编码器刻度和位置传感器刻度各自的不均匀性,这种计算必然导致较大的舍入误差),而我们期望运动的目标位置总是以位移传感器为参考的,也就是说,发送给电机驱动器的位置脉冲就是此次整个运动过程中期望位移传感器输出脉冲数,但电机驱动器的参考不再是主控制器参考的位移传感器,这样就导致期望的位移和实际位移总会出现偏差,一般来说,位移传感器的精度为5微米时,系统定位偏差会达到50微米左右。In the motion control of industrial equipment such as high-precision motion platforms, it is very important for the motion mechanism to move to the specified coordinate position accurately and quickly. However, the existing motor drivers determine the target position to be reached this time according to the number of received position pulses, and then determine the stop position according to the feedback position pulses. In some cases (such as when the Delta motor driver uses the gantry control method), since the output of the displacement sensor cannot be used as feedback to the driver (this requires some proportional calculations to determine the number of position pulses to be sent to the driver, because the motor The respective inhomogeneity of the encoder scale and the position sensor scale, this calculation will inevitably lead to a large rounding error), and the target position we expect to move is always referenced to the displacement sensor, that is, sent to the motor driver The position pulse is the number of output pulses expected from the displacement sensor during the entire movement process, but the reference of the motor driver is no longer the displacement sensor referenced by the main controller, which will always cause a deviation between the expected displacement and the actual displacement. Generally speaking , when the accuracy of the displacement sensor is 5 microns, the system positioning deviation will reach about 50 microns.

要想让系统最终到达期望位置,可以在以上过程结束后,计算当前位置和目标位置的距离,继续让电机朝着期望位置转动,如此往复,直到设备运动机构到达期望坐标位置。这样设备的精度是达到的,但是该过程是相当耗时的,因为每次位置脉冲发送结束到电机真正停下来都需要一段时间(指令结束,驱动器对电机有一个调整过程),这将是一笔巨大的时间开销。To make the system finally reach the desired position, after the above process is completed, calculate the distance between the current position and the target position, and continue to let the motor rotate towards the desired position, and so on, until the equipment movement mechanism reaches the desired coordinate position. The accuracy of this device is achieved, but the process is quite time-consuming, because it takes a while from the end of each position pulse transmission to the actual stop of the motor (the end of the instruction, the driver has an adjustment process for the motor), which will be a long time. A huge time overhead.

发明内容Contents of the invention

本发明的目的是为了解决高精度运动平台等工业设备运动控制系统不同能时保证快速定位和精确定位的问题,提供一种耗时短、精度高的工业直线运动机构的快速精确预测定位方法及定位模块。The purpose of the present invention is to solve the problem that the motion control systems of industrial equipment such as high-precision motion platforms can not guarantee fast positioning and precise positioning at all times, and provide a fast and accurate predictive positioning method for industrial linear motion mechanisms with short time consumption and high precision. positioning module.

本发明所述的工业直线运动机构的快速精确预测定位方法,该方法是基于工业直线运动机构的快速精确预测定位系统实现的,所述工业直线运动机构的快速精确预测定位系统包括DSP、位置脉冲减计数器、电机驱动器、位移计数器和位移传感器,所述DSP向位置脉冲减计数器发送脉冲信号,所述位置脉冲减计数器发送驱动信号给电机驱动器以控制电机运动,同时,DSP从位置脉冲减计数器接收位置脉冲减计数器状态信号,即剩余脉冲数量信号,DSP通过位移计数器接收位移传感器发送的当前位置脉冲信号;The fast and accurate predictive positioning method of industrial linear motion mechanism according to the present invention is realized based on the fast and accurate predictive positioning system of industrial linear motion mechanism. The fast and accurate predictive positioning system of industrial linear motion mechanism includes DSP, position pulse Down counter, motor driver, displacement counter and displacement sensor, the DSP sends a pulse signal to the position pulse down counter, and the position pulse down counter sends a drive signal to the motor driver to control the movement of the motor. At the same time, the DSP receives the pulse signal from the position pulse down counter. The status signal of the position pulse subtracting counter, that is, the remaining pulse number signal, and the DSP receives the current position pulse signal sent by the displacement sensor through the displacement counter;

所述的快速精确预测定位方法是由嵌入在DSP内部的软件实现的,该方法包括以下步骤:The fast and accurate predictive positioning method is implemented by software embedded in the DSP, and the method includes the following steps:

目标位置指令接收步骤:用于接收目标位置指令脉冲数N,并在该步骤结束之后执行目标脉冲计算步骤;Target position command receiving step: used to receive the target position command pulse number N, and execute the target pulse calculation step after this step ends;

目标脉冲计算步骤:用于计算需要输出的脉冲数,所述的脉冲数等于目标位置指令脉冲数N;同时对到标志位RchPosCnt进行清零,即RchPosCnt=0;并在该步骤结束之后执行计划脉冲写入步骤;Target pulse calculation step: used to calculate the number of pulses that need to be output, the number of pulses is equal to the number of target position command pulses N; at the same time, clear the flag bit RchPosCnt, that is, RchPosCnt=0; and execute the plan after this step ends Pulse write step;

计划脉冲写入步骤:将脉冲数N的绝对值|N|写入位置脉冲减计数器;并在该步骤结束之后执行脉冲发送步骤;Planned pulse writing step: write the absolute value |N| of the pulse number N into the position pulse down counter; and execute the pulse sending step after this step ends;

脉冲发送步骤:用于通过位置脉冲发送端口发送1个位置脉冲信号给位置脉冲减计数器;并在该步骤结之后执行剩余脉冲信号接收步骤;Pulse sending step: used to send a position pulse signal to the position pulse down counter through the position pulse sending port; and execute the remaining pulse signal receiving step after the end of this step;

剩余脉冲信号接收步骤:用于接收位置脉冲减计数器发来的剩余脉冲数量信号;并在该步骤结束之后执行第一判断步骤;Remaining pulse signal receiving step: used to receive the remaining pulse quantity signal sent by the position pulse down counter; and execute the first judgment step after this step ends;

第一判断步骤;用于判断剩余脉冲数量信号是否为0,并在判断结果为是时执行当前位置接收步骤;在判断结果为否时返回执行脉冲发送步骤;The first judging step: for judging whether the remaining pulse quantity signal is 0, and executing the current position receiving step when the judging result is yes; returning and executing the pulse sending step when the judging result is no;

当前位置接收步骤:用于接收位移计数器发来的当前位置脉冲信号M;并在该步骤结束之后执行第二判断步骤;Current position receiving step: used to receive the current position pulse signal M sent by the displacement counter; and execute the second judgment step after this step ends;

位移计数器用于对位移传感器输出的脉冲进行计数,其计数值用于确定设备运动机构在系统坐标系中的位置,即当前位置;The displacement counter is used to count the pulses output by the displacement sensor, and its count value is used to determine the position of the equipment movement mechanism in the system coordinate system, that is, the current position;

第二判断步骤:用于判断|N-M|是否等于2,并在判断结果为是时执行到位标志递增步骤;在判断结果为否时执行校正脉冲数计算步骤;The second judging step: for judging whether |N-M| is equal to 2, and when the judging result is yes, execute the in-position flag incrementing step; when the judging result is no, execute the correction pulse number calculation step;

到位标志递增步骤:用于使到位标志增加1,即RchPosCnt=RchPosCnt+1;并在该步骤结束之后执行第三判断步骤;In-place flag increment step: used to increase the in-place flag by 1, that is, RchPosCnt=RchPosCnt+1; and execute the third judgment step after this step ends;

第三判断步骤:判断到位标志是否为p,p为大于10的整数,并在判断结果为是时结束定位;在判断结果为否时返回执行第二判断步骤;The third judging step: judging whether the in-place flag is p, p is an integer greater than 10, and ending the positioning when the judging result is yes; returning to execute the second judging step when the judging result is no;

校正脉冲数计算步骤:用于计算N的值,N=(ULONG)(θ(N-M)),其中,θ为0.5到1之间的数,同时对到标志位RchPosCnt进行清零;并在该步骤结束之后执行计划脉冲写入步骤。Correction pulse number calculation step: for calculating the value of N, N=(ULONG)(θ(N-M)), wherein, θ is a number between 0.5 and 1, and the flag bit RchPosCnt is cleared simultaneously; and in this After the step ends, execute the plan pulse writing step.

本发明所述的工业直线运动机构的快速精确预测定位系统,其特征在于:它包括DSP、位置脉冲减计数器、电机驱动器、位移计数器和位移传感器,所述DSP向位置脉冲减计数器发送脉冲信号,所述位置脉冲减计数器发送驱动信号给电机驱动器以控制电机运动,同时,DSP从位置脉冲减计数器接收位置脉冲减计数器状态信号,即剩余脉冲数量信号,DSP通过位移计数器接收位移传感器发送的当前位置脉冲信号;The fast and accurate predictive positioning system of the industrial linear motion mechanism of the present invention is characterized in that it includes a DSP, a position pulse down counter, a motor driver, a displacement counter and a displacement sensor, and the DSP sends a pulse signal to the position pulse down counter, The position pulse decrement counter sends a drive signal to the motor driver to control the motor movement. At the same time, the DSP receives the position pulse decrement counter status signal from the position pulse decrement counter, that is, the remaining pulse number signal, and the DSP receives the current position sent by the displacement sensor through the displacement counter. Pulse signal;

在DSP内部嵌入有由软件实现的定位模块,所述定位模块包括以下单元:A positioning module implemented by software is embedded in the DSP, and the positioning module includes the following units:

目标位置指令接收单元:用于接收目标位置指令脉冲数N;Target position command receiving unit: used to receive target position command pulse number N;

目标脉冲计算单元:用于计算需要输出的脉冲数,所述的脉冲数等于目标位置指令脉冲数N;同时对到标志位RchPosCnt进行清零,即RchPosCnt=0;Target pulse calculation unit: used to calculate the number of pulses that need to be output, the number of pulses is equal to the number of pulses N of the target position command; at the same time, the flag bit RchPosCnt is cleared, that is, RchPosCnt=0;

计划脉冲写入单元:将脉冲数N的绝对值|N|写入位置脉冲减计数器;Planned pulse writing unit: write the absolute value |N| of the pulse number N into the position pulse down counter;

脉冲发送单元:用于通过位置脉冲发送端口发送1个位置脉冲信号给位置脉冲减计数器;Pulse sending unit: used to send a position pulse signal to the position pulse down counter through the position pulse sending port;

剩余脉冲信号接收单元:用于接收位置脉冲减计数器发来的剩余脉冲数量信号;Remaining pulse signal receiving unit: used to receive the remaining pulse quantity signal sent by the position pulse down counter;

第一判断单元;用于判断剩余脉冲数量信号是否为0,并在判断结果为是时启动当前位置接收单元;在判断结果为否时启动脉冲发送单元;The first judging unit; used to judge whether the remaining pulse quantity signal is 0, and start the current position receiving unit when the judging result is yes; start the pulse sending unit when the judging result is no;

当前位置接收单元:用于接收位移计数器发来的当前位置脉冲信号M;Current position receiving unit: used to receive the current position pulse signal M sent by the displacement counter;

第二判断单元:用于判断|N-M|是否等于2,并在判断结果为是时启动到位标志递增单元;在判断结果为否时启动校正脉冲数计算单元;The second judging unit: used to judge whether |N-M| is equal to 2, and start the in-position flag increment unit when the judging result is yes; start the correction pulse number calculation unit when the judging result is no;

到位标志递增单元:用于使到位标志增加1,即RchPosCnt=RchPosCnt+1;In-position flag increment unit: used to increase the in-position flag by 1, that is, RchPosCnt=RchPosCnt+1;

第三判断单元:判断到位标志是否为p,p为大于10的整数,并在判断结果为是时结束定位;在判断结果为否时启动第二判断单元;The third judging unit: judging whether the in-place flag is p, p is an integer greater than 10, and ends the positioning when the judging result is yes; starts the second judging unit when the judging result is no;

校正脉冲数计算单元:用于计算N的值,N=(ULONG)(θ(N-M)),其中,θ为0.5到1之间的数,同时对到标志位RchPosCnt进行清零。Correction pulse number calculation unit: used to calculate the value of N, N=(ULONG)(θ(N-M)), where θ is a number between 0.5 and 1, and clear the flag bit RchPosCnt at the same time.

本发明所述的工业直线运动机构的快速精确预测定位方法在定位过程中,当预设脉冲数发送完成且设备还未停止运行时,预测设备运动机构有没有可能最终停在目标位置,若有,就等待其停止再做进一步判断。若没有可能,就判断运动机构是根本就到不了目标位置还是会冲过目标位置,如果是到不了,就立即向位置脉冲减计数器发送若干个脉冲,让电机继续前行;如果是会过冲,就向位置脉冲减计数器发送若干个反方向脉冲,使电机反向行进,直到电机到达目标位置为止。位移传感器的精度为5微米时,这种方法能够保证定位精度在5微米以内,且在定位过程中加入了预测过程,根据预测结果决定电机的下一步运动方式,与传统的高精度定位方式相比,定位时间缩短了20%以上。In the fast and accurate predictive positioning method of the industrial linear motion mechanism described in the present invention, during the positioning process, when the preset number of pulses is sent and the equipment has not stopped running, it is possible to predict whether the equipment’s motion mechanism will eventually stop at the target position, if so , just wait for it to stop before making further judgments. If it is not possible, judge whether the motion mechanism will not reach the target position at all or will overshoot the target position. If it cannot reach the target position, immediately send several pulses to the position pulse down counter to let the motor continue to move forward; if it will overshoot , send a number of pulses in the opposite direction to the position pulse down counter to make the motor run in the reverse direction until the motor reaches the target position. When the accuracy of the displacement sensor is 5 microns, this method can ensure the positioning accuracy within 5 microns, and a prediction process is added to the positioning process, and the next movement mode of the motor is determined according to the prediction results, which is different from the traditional high-precision positioning method. Compared with that, the positioning time has been shortened by more than 20%.

附图说明Description of drawings

图1为实施方式一所述的工业直线运动机构的快速精确预测定位方法的流程图;Fig. 1 is the flowchart of the fast and accurate predictive positioning method of the industrial linear motion mechanism described in the first embodiment;

图2为实施方式六所述的工业直线运动机构的快速精确预测定位系统的结构框图。Fig. 2 is a structural block diagram of the fast and accurate predictive positioning system of the industrial linear motion mechanism described in the sixth embodiment.

具体实施方式detailed description

具体实施方式一:结合图1说明本实施方式,本实施方式所述的工业直线运动机构的快速精确预测定位方法,该方法是基于工业直线运动机构的快速精确预测定位系统实现的,所述工业直线运动机构的快速精确预测定位系统包括DSP1、位置脉冲减计数器2、电机驱动器3、位移计数器4和位移传感器5,所述DSP1向位置脉冲减计数器2发送脉冲信号,所述位置脉冲减计数器2发送驱动信号给电机驱动器3以控制电机运动,同时,DSP1从位置脉冲减计数器2接收位置脉冲减计数器状态信号,即剩余脉冲数量信号,DSP1通过位移计数器4接收位移传感器5发送的当前位置脉冲信号;Specific Embodiment 1: This embodiment is described in conjunction with FIG. 1. The fast and accurate predictive positioning method for industrial linear motion mechanisms described in this embodiment is implemented based on the fast and accurate predictive positioning system for industrial linear motion mechanisms. The fast and accurate predictive positioning system of linear motion mechanism includes DSP1, position pulse down counter 2, motor driver 3, displacement counter 4 and displacement sensor 5, said DSP1 sends pulse signal to position pulse down counter 2, and said position pulse down counter 2 Send the driving signal to the motor driver 3 to control the movement of the motor. At the same time, DSP1 receives the status signal of the position pulse down counter from the position pulse down counter 2, that is, the remaining pulse number signal. DSP1 receives the current position pulse signal sent by the displacement sensor 5 through the displacement counter 4 ;

所述的快速精确预测定位方法是由嵌入在DSP1内部的软件实现的,该方法包括以下步骤:The fast and accurate prediction positioning method is realized by software embedded in DSP1, and the method comprises the following steps:

目标位置指令接收步骤:用于接收目标位置指令脉冲数N,并在该步骤结束之后执行目标脉冲计算步骤;Target position command receiving step: used to receive the target position command pulse number N, and execute the target pulse calculation step after this step ends;

目标脉冲计算步骤:用于计算需要输出的脉冲数,所述的脉冲数等于目标位置指令脉冲数N;同时对到标志位RchPosCnt进行清零,即RchPosCnt=0;并在该步骤结束之后执行计划脉冲写入步骤;Target pulse calculation step: used to calculate the number of pulses that need to be output, the number of pulses is equal to the number of target position command pulses N; at the same time, clear the flag bit RchPosCnt, that is, RchPosCnt=0; and execute the plan after this step ends Pulse write step;

计划脉冲写入步骤:将脉冲数N的绝对值|N|写入位置脉冲减计数器2;并在该步骤结束之后执行脉冲发送步骤;Planned pulse writing step: write the absolute value |N| of the pulse number N into the position pulse down counter 2; and execute the pulse sending step after this step ends;

脉冲发送步骤:用于通过位置脉冲发送端口发送1个位置脉冲信号给位置脉冲减计数器2;并在该步骤结之后执行剩余脉冲信号接收步骤;Pulse sending step: used to send a position pulse signal to the position pulse down counter 2 through the position pulse sending port; and execute the remaining pulse signal receiving step after the end of this step;

剩余脉冲信号接收步骤:用于接收位置脉冲减计数器2发来的剩余脉冲数量信号;并在该步骤结束之后执行第一判断步骤;Residual pulse signal receiving step: used to receive the remaining pulse quantity signal sent by the position pulse subtraction counter 2; and execute the first judgment step after this step ends;

第一判断步骤;用于判断剩余脉冲数量信号是否为0,并在判断结果为是时执行当前位置接受步骤;在判断结果为否时返回执行脉冲发送步骤;The first judging step: for judging whether the remaining pulse quantity signal is 0, and executing the current position accepting step when the judging result is yes; returning and executing the pulse sending step when the judging result is no;

当前位置接受步骤:用于接收位移计数器4发来的当前位置脉冲信号M;并在该步骤结束之后执行第二判断步骤;Current position acceptance step: for receiving the current position pulse signal M sent by the displacement counter 4; and after this step ends, execute the second judgment step;

第二判断步骤:用于判断|N-M|是否等于2,并在判断结果为为是时执行到位标志递增步骤;在判断结果为否时执行校正脉冲数计算步骤;The second judging step: for judging whether |N-M| is equal to 2, and when the judging result is yes, execute the in-position flag incrementing step; when the judging result is no, execute the correction pulse number calculation step;

到位标志递增步骤:用于使到位标志增加1,即RchPosCnt=RchPosCnt+1;并在该步骤结束之后执行第三判断步骤;In-place flag increment step: used to increase the in-place flag by 1, that is, RchPosCnt=RchPosCnt+1; and execute the third judgment step after this step ends;

第三判断步骤:判断到位标志是否为p,p为大于10的整数,并在判断结果为为是时结束定位;在判断结果为否时返回执行第二判断步骤;The third judging step: judging whether the in-place flag is p, p is an integer greater than 10, and ending positioning when the judging result is yes; returning to execute the second judging step when the judging result is no;

校正脉冲数计算步骤:用于计算N的值,N=(ULONG)(θ(N-M)),其中,θ为0.5到1之间的数,同时对到标志位RchPosCnt进行清零;并在该步骤结束之后执行计划脉冲写入步骤。Correction pulse number calculation step: for calculating the value of N, N=(ULONG)(θ(N-M)), wherein, θ is a number between 0.5 and 1, and the flag bit RchPosCnt is cleared simultaneously; and in this After the step ends, execute the plan pulse writing step.

本实施方式所述的工业直线运动机构的快速精确预测定位方法是由嵌入在DSP1内部的软件来实现的,该方法中,所有的位置和距离均以脉冲数来表示。系统运行前先初始化,初始化后设备运动机构回到原点,位移计数器4发送给DSP1的当前位置脉冲信号为0。DSP1首先接收目标位置指令脉冲数N,根据目标位置指令脉冲数N计算出需要发送给电机驱动器3的脉冲数,该脉冲数等于N-0,即:需要发送给电机驱动器3的脉冲数等于目标脉冲数与当前位置脉冲信号的差值,计算结果仍计为N。同时对到标志位RchPosCnt进行清零,然后将所述脉冲数N写入位置脉冲减计数器2。打开位置脉冲发送端口,向位置脉冲减计数器2发送一个脉冲信号,位置脉冲减计数器2将此脉冲作为驱动信号发送给电机驱动器3,电机驱动器3根据该驱动信号控制电机转动,根据N的符号(正或负)来设定电机的转动方向。DSP1每发送一个脉冲信号给位置脉冲减计数器2之后,会从位置脉冲减计数器2接收到一个反应位置脉冲减计数器2状态的信号,该信号为位置脉冲减计数器2的剩余脉冲数,DSP1判断该剩余脉冲数是否为0,即位置脉冲减计数器2的状态是否为空,如果位置脉冲减计数器2的状态不为空,则DSP1继续向位置脉冲减计数器2发送脉冲信号,如此循环,直到位置脉冲减计数器2的状态为空时,停止发送脉冲信号。此时,DSP1接收位移计数器4发来的当前位置脉冲信号M,然后通过目标位置与当前位置的距离预测设备运动机构有无可能停在目标位置,如果目标位置与当前位置的距离大于2个脉冲,则认为电机停止转动后,运动机构不可能停在目标位置处,,此时需要采取校正措施,避免时间浪费。校正措施为先计算再次需要输出的脉冲数,然后将此脉冲数发送给位置脉冲减计数器2,再次需要输出的脉冲数=(ULONG)(θ(N-M)),此脉冲数作为新的N值,取代位置脉冲减计数器2先前接收到的脉冲数N,即对N的数值大小进行更新,此处的系数θ为大于0.5且小于1的数,将目标位置与当前位置的距离乘上该系数,用向下圆整的方式方法取整后,N总是大于等于1,也就是说设备定位精度为正负一个位移传感器脉冲。N-M的符号代表预测最终电机是到不了位还是会冲过目标位置,N-M的符号将决定电机的转动方向。如果目标位置与当前位置的距离小于2个脉冲,则使到标志位RchPosCnt增加1,即RchPosCnt=RchPosCnt+1,然后判断RchPosCnt是否等于p,所述p为大于10的整数,如果RchPosCnt不等于p,则继续判断目标位置与当前位置的距离是否小于2个脉冲,如此循环,直到RchPosCnt等于p为止,停止定位。在RchPosCnt从0增加到p的这段时间内,如果目标位置与当前位置的距离始终保持小于2个脉冲,则认为设备运动机构已经到达目标位置,可以结束定位。The fast and accurate predictive positioning method of the industrial linear motion mechanism described in this embodiment is realized by the software embedded in the DSP1. In this method, all positions and distances are represented by pulse numbers. The system is initialized before running. After the initialization, the movement mechanism of the equipment returns to the origin, and the current position pulse signal sent by the displacement counter 4 to DSP1 is 0. DSP1 first receives the target position instruction pulse number N, calculates the pulse number that needs to be sent to the motor driver 3 according to the target position instruction pulse number N, and the pulse number is equal to N-0, that is: the pulse number that needs to be sent to the motor driver 3 is equal to the target The calculation result of the difference between the number of pulses and the current position pulse signal is still counted as N. At the same time, the flag bit RchPosCnt is cleared, and then the pulse number N is written into the position pulse down counter 2 . Open the position pulse sending port, send a pulse signal to the position pulse subtraction counter 2, the position pulse subtraction counter 2 sends this pulse as a drive signal to the motor driver 3, the motor driver 3 controls the motor to rotate according to the drive signal, according to the symbol of N ( positive or negative) to set the rotation direction of the motor. After DSP1 sends a pulse signal to the position pulse down counter 2, it will receive a signal from the position pulse down counter 2 that reflects the state of the position pulse down counter 2. The signal is the remaining pulse number of the position pulse down counter 2, and DSP1 judges the Whether the number of remaining pulses is 0, that is, whether the state of the position pulse down counter 2 is empty, if the state of the position pulse down counter 2 is not empty, then DSP1 continues to send pulse signals to the position pulse down counter 2, and so on until the position pulse When the state of the down counter 2 is empty, stop sending the pulse signal. At this time, DSP1 receives the current position pulse signal M sent by the displacement counter 4, and then predicts whether the equipment movement mechanism may stop at the target position through the distance between the target position and the current position. If the distance between the target position and the current position is greater than 2 pulses , it is considered that after the motor stops rotating, the motion mechanism cannot stop at the target position. At this time, corrective measures need to be taken to avoid wasting time. The corrective measure is to first calculate the number of pulses that need to be output again, and then send this number of pulses to the position pulse subtraction counter 2, the number of pulses that needs to be output again=(ULONG)(θ(N-M)), and this number of pulses is used as the new N value , to replace the number of pulses N previously received by the position pulse subtraction counter 2, that is, to update the value of N, where the coefficient θ is a number greater than 0.5 and less than 1, multiply the distance between the target position and the current position by this coefficient , after rounding down, N is always greater than or equal to 1, that is to say, the positioning accuracy of the equipment is plus or minus one displacement sensor pulse. The sign of N-M represents predicting whether the final motor will fail to reach the position or will overshoot the target position, and the sign of N-M will determine the direction of rotation of the motor. If the distance between the target position and the current position is less than 2 pulses, the flag bit RchPosCnt is increased by 1, that is, RchPosCnt=RchPosCnt+1, and then judge whether RchPosCnt is equal to p, and the p is an integer greater than 10, if RchPosCnt is not equal to p , then continue to judge whether the distance between the target position and the current position is less than 2 pulses, and so on, until RchPosCnt is equal to p, stop positioning. During the period when RchPosCnt increases from 0 to p, if the distance between the target position and the current position remains less than 2 pulses, it is considered that the device motion mechanism has reached the target position and the positioning can be ended.

本实施方式所述的工业直线运动机构的快速精确预测定位方法在定位过程中,当预设脉冲数发送完成且设备还未停止运行时,预测设备运动机构有没有可能最终停在目标位置,若有,就等待其停止再做进一步判断。若没有可能,就判断运动机构是根本就到不了目标位置还是会冲过目标位置,如果是到不了,就立即向位置脉冲减计数器2发送若干个脉冲,让电机继续前行;如果是会过冲,就向位置脉冲减计数器2发送若干个反方向脉冲,使电机反向行进,直到电机到达目标位置为止。这种方法能够保证定位精度在5微米以内,且在定位过程中加入了预测过程,根据预测结果决定电机的下一步运动方式,与传统的高精度定位方式相比,定位时间缩短了20%以上。In the fast and accurate predictive positioning method for industrial linear motion mechanisms described in this embodiment, during the positioning process, when the preset number of pulses is sent and the equipment has not stopped running, it is possible to predict whether the equipment’s motion mechanism will eventually stop at the target position. If there is, just wait for it to stop before making further judgments. If it is not possible, it is judged whether the motion mechanism will not reach the target position at all or will rush past the target position. If it cannot reach the target position, it will immediately send several pulses to the position pulse subtraction counter 2 to let the motor continue to move forward; If it rushes, send a number of pulses in the opposite direction to the position pulse down counter 2 to make the motor run in the reverse direction until the motor reaches the target position. This method can ensure that the positioning accuracy is within 5 microns, and a prediction process is added to the positioning process, and the next movement mode of the motor is determined according to the prediction result. Compared with the traditional high-precision positioning method, the positioning time is shortened by more than 20%. .

具体实施方式二:本实施方式是对实施方式一所述的工业直线运动机构的快速精确预测定位方法的进一步限定,本实施方式中,所述的第三判断步骤中,p=20。Embodiment 2: This embodiment is a further limitation of the fast and accurate predictive positioning method for industrial linear motion mechanisms described in Embodiment 1. In this embodiment, in the third determination step, p=20.

具体实施方式三:本实施方式是对实施方式一所述的工业直线运动机构的快速精确预测定位方法的进一步限定,本实施方式中,所述的位移传感器5采用磁栅尺或光栅尺实现。Embodiment 3: This embodiment is a further limitation of the rapid and accurate predictive positioning method for industrial linear motion mechanisms described in Embodiment 1. In this embodiment, the displacement sensor 5 is realized by a magnetic scale or a grating scale.

具体实施方式四:本实施方式是对实施方式一所述的工业直线运动机构的快速精确预测定位方法的进一步限定,本实施方式中,所述的位置脉冲减计数器2每接到一个DSP1发来的脉冲信号后,向电机驱动器3发送一个脉冲信号,然后再反馈给DSP1一个状态信号,该状态信号表示剩余脉冲数量。Specific Embodiment 4: This embodiment is a further limitation of the fast and accurate predictive positioning method of the industrial linear motion mechanism described in Embodiment 1. In this embodiment, the position pulse down counter 2 is sent every time a DSP1 sends After the pulse signal, send a pulse signal to the motor driver 3, and then feed back a status signal to DSP1, which indicates the number of remaining pulses.

本实施方式中的位置脉冲减计数器2是由嵌入在CPLD中的软件来实现的。位置脉冲减计数器2的功能为每接到一个DSP1发来的脉冲信号后,向电机驱动器3发送一个脉冲信号,然后再反馈给DSP1一个状态信号,该状态信号表示剩余脉冲数量。剩余脉冲数量的初始值为DSP1向其写入的|N|,位置脉冲减计数器2每向电机驱动器3发送完一个脉冲信号后,剩余脉冲数量减1,当发送完|N|个脉冲给电机驱动器3后,剩余脉冲数量为0,此时,位置脉冲减计数器2的状态为空。The position pulse down counter 2 in this embodiment is realized by software embedded in the CPLD. The function of the position pulse down counter 2 is to send a pulse signal to the motor driver 3 after receiving a pulse signal from DSP1, and then feed back a status signal to DSP1, which indicates the number of remaining pulses. The initial value of the number of remaining pulses is the |N| written to it by DSP1. After the position pulse down counter 2 sends a pulse signal to the motor driver 3, the number of remaining pulses is reduced by 1. When |N| pulses are sent to the motor After the driver 3, the number of remaining pulses is 0, at this time, the status of the position pulse down counter 2 is empty.

具体实施方式五:本实施方式是对实施方式一所述的工业直线运动机构的快速精确预测定位方法的进一步限定,本实施方式中,所述的位移计数器4用于对位移传感器5输出的脉冲进行计数,其计数值用于确定设备运动机构在系统坐标系中的位置,即当前位置。Embodiment 5: This embodiment is a further limitation of the rapid and accurate predictive positioning method of the industrial linear motion mechanism described in Embodiment 1. In this embodiment, the displacement counter 4 is used for the pulse output by the displacement sensor 5 Counting is performed, and the count value is used to determine the position of the equipment movement mechanism in the system coordinate system, that is, the current position.

本实施方式中的所有的距离和位置均通过脉冲数来表示,位移传感器5输出的脉冲数反应了设备运动机构的当前位置,位移计数器4对位移传感器5输出的脉冲进行计数,并将其发送给DSP1,以使DSP1获得设备运动机构的当前位置。All distances and positions in the present embodiment are represented by pulse numbers, and the pulse numbers output by the displacement sensor 5 reflect the current position of the equipment kinematic mechanism, and the displacement counter 4 counts the pulses output by the displacement sensor 5 and sends them To DSP1, so that DSP1 obtains the current position of the device's motion mechanism.

具体实施方式六:结合图2说明本实施方式,本实施方式所述的工业直线运动机构的快速精确预测定位系统包括DSP1、位置脉冲减计数器2、电机驱动器3、位移计数器4和位移传感器5,所述DSP1向位置脉冲减计数器2发送脉冲信号,所述位置脉冲减计数器2发送驱动信号给电机驱动器3以控制电机运动,同时,DSP1从位置脉冲减计数器2接收位置脉冲减计数器状态信号,即剩余脉冲数量信号,DSP1通过位移计数器4接收位移传感器5发送的当前位置脉冲信号;Specific Embodiment Six: This embodiment is described in conjunction with FIG. 2. The fast and accurate predictive positioning system of the industrial linear motion mechanism described in this embodiment includes DSP1, position pulse down counter 2, motor driver 3, displacement counter 4 and displacement sensor 5, The DSP1 sends a pulse signal to the position pulse down counter 2, and the position pulse down counter 2 sends a drive signal to the motor driver 3 to control the movement of the motor. At the same time, the DSP1 receives the position pulse down counter state signal from the position pulse down counter 2, namely The remaining pulse number signal, DSP1 receives the current position pulse signal sent by the displacement sensor 5 through the displacement counter 4;

在DSP1内部嵌入有由软件实现的定位模块,所述定位模块包括以下单元:Embedded within the DSP1 is a positioning module implemented by software, and the positioning module includes the following units:

目标位置指令接收单元:用于接收目标位置指令脉冲数N;Target position command receiving unit: used to receive target position command pulse number N;

目标脉冲计算单元:用于计算需要输出的脉冲数,所述的脉冲数等于目标位置指令脉冲数N;同时对到标志位RchPosCnt进行清零,即RchPosCnt=0;Target pulse calculation unit: used to calculate the number of pulses that need to be output, the number of pulses is equal to the number of pulses N of the target position command; at the same time, the flag bit RchPosCnt is cleared, that is, RchPosCnt=0;

计划脉冲写入单元:将脉冲数N的绝对值|N|写入位置脉冲减计数器2;Planned pulse writing unit: write the absolute value |N| of the pulse number N into the position pulse down counter 2;

脉冲发送单元:用于通过位置脉冲发送端口发送1个位置脉冲信号给位置脉冲减计数器2;Pulse sending unit: used to send a position pulse signal to the position pulse down counter 2 through the position pulse sending port;

剩余脉冲信号接收单元:用于接收位置脉冲减计数器2发来的剩余脉冲数量信号;Residual pulse signal receiving unit: used to receive the remaining pulse quantity signal sent by the position pulse subtraction counter 2;

第一判断单元;用于判断剩余脉冲数量信号是否为0,并在判断结果为是时启动当前位置接受单元;在判断结果为否时启动脉冲发送单元;The first judging unit; used to judge whether the remaining pulse number signal is 0, and start the current position receiving unit when the judging result is yes; start the pulse sending unit when the judging result is no;

当前位置接受单元:用于接收位移计数器4发来的当前位置脉冲信号M;Current position receiving unit: used to receive the current position pulse signal M sent by the displacement counter 4;

第二判断单元:用于判断|N-M|是否等于2,并在判断结果为是时启动到位标志递增单元;在判断结果为否时启动校正脉冲数计算单元;The second judging unit: used to judge whether |N-M| is equal to 2, and start the in-position flag increment unit when the judging result is yes; start the correction pulse number calculation unit when the judging result is no;

到位标志递增单元:用于使到位标志增加1,即RchPosCnt=RchPosCnt+1;In-position flag increment unit: used to increase the in-position flag by 1, that is, RchPosCnt=RchPosCnt+1;

第三判断单元:判断到位标志是否为p,p为大于10的整数,并在判断结果为是时结束定位;在判断结果为否时启动第二判断单元;The third judging unit: judging whether the in-place flag is p, p is an integer greater than 10, and ends the positioning when the judging result is yes; starts the second judging unit when the judging result is no;

校正脉冲数计算单元:用于计算N的值,N=(ULONG)(θ(N-M)),其中,θ为0.5到1之间的数,同时对到标志位RchPosCnt进行清零。Correction pulse number calculation unit: used to calculate the value of N, N=(ULONG)(θ(N-M)), where θ is a number between 0.5 and 1, and clear the flag bit RchPosCnt at the same time.

本实施方式中,所述的工业直线运动机构的快速精确预测定位模块是由嵌入在DSP1内部的软件来实现的,该模块中,所有的位置和距离均以脉冲数来表示。系统运行前先初始化,初始化后设备运动机构回到原点,位移计数器4发送给DSP1的当前位置脉冲信号为0。DSP1首先接收目标位置指令脉冲数N,根据目标位置指令脉冲数N计算出需要发送给电机驱动器3的脉冲数,该脉冲数等于N-0,即:需要发送给电机驱动器3的脉冲数等于目标脉冲数与当前位置脉冲信号的差值,计算结果仍计为N。同时对到标志位RchPosCnt进行清零,然后将所述脉冲数N写入位置脉冲减计数器2。打开位置脉冲发送端口,向位置脉冲减计数器2发送一个脉冲信号,位置脉冲减计数器2将此脉冲作为驱动信号发送给电机驱动器3,电机驱动器3根据该驱动信号控制电机转动,根据N的符号(正或负)来设定电机的转动方向。DSP1每发送一个脉冲信号给位置脉冲减计数器2之后,会从位置脉冲减计数器2接收到一个反应位置脉冲减计数器2状态的信号,该信号为位置脉冲减计数器2的剩余脉冲数,DSP1判断该剩余脉冲数是否为0,即位置脉冲减计数器2的状态是否为空,如果位置脉冲减计数器2的状态不为空,则DSP1继续向位置脉冲减计数器2发送脉冲信号,如此循环,直到位置脉冲减计数器2的状态为空时,停止发送脉冲信号。此时,DSP1接收位移计数器4发来的当前位置脉冲信号M,然后通过目标位置与当前位置的距离预测设备运动机构有无可能停在目标位置,如果目标位置与当前位置的距离大于2个脉冲,则认为电机停止转动后,运动机构不可能停在目标位置处,,此时需要采取校正措施,避免时间浪费。校正措施为先计算再次需要输出的脉冲数,然后将此脉冲数发送给位置脉冲减计数器2,再次需要输出的脉冲数=(ULONG)(θ(N-M)),此脉冲数作为新的N值,取代位置脉冲减计数器2先前接收到的脉冲数N,即对N的数值大小进行更新,此处的系数θ为大于0.5且小于1的数,将目标位置与当前位置的距离乘上该系数,用向下圆整的方式方法取整后,N总是大于等于1,也就是说设备定位精度为正负一个位移传感器脉冲。N-M的符号代表预测最终电机是到不了位还是会冲过目标位置,N-M的符号将决定电机的转动方向。如果目标位置与当前位置的距离小于2个脉冲,则使到标志位RchPosCnt增加1,即RchPosCnt=RchPosCnt+1,然后判断RchPosCnt是否等于p,所述p为大于10的整数,如果RchPosCnt不等于p,则继续判断目标位置与当前位置的距离是否小于2个脉冲,如此循环,直到RchPosCnt等于p为止,停止定位。在RchPosCnt从0增加到p的这段时间内,如果目标位置与当前位置的距离始终保持小于2个脉冲,则认为设备运动机构已经到达目标位置,可以结束定位。In this embodiment, the fast and accurate predictive positioning module of the industrial linear motion mechanism is realized by software embedded in DSP1. In this module, all positions and distances are represented by pulse numbers. The system is initialized before running. After the initialization, the movement mechanism of the equipment returns to the origin, and the current position pulse signal sent by the displacement counter 4 to DSP1 is 0. DSP1 first receives the target position instruction pulse number N, calculates the pulse number that needs to be sent to the motor driver 3 according to the target position instruction pulse number N, and the pulse number is equal to N-0, that is: the pulse number that needs to be sent to the motor driver 3 is equal to the target The calculation result of the difference between the number of pulses and the current position pulse signal is still counted as N. At the same time, the flag bit RchPosCnt is cleared, and then the pulse number N is written into the position pulse down counter 2 . Open the position pulse sending port, send a pulse signal to the position pulse subtraction counter 2, the position pulse subtraction counter 2 sends this pulse as a drive signal to the motor driver 3, the motor driver 3 controls the motor to rotate according to the drive signal, according to the symbol of N ( positive or negative) to set the rotation direction of the motor. After DSP1 sends a pulse signal to the position pulse down counter 2, it will receive a signal from the position pulse down counter 2 that reflects the state of the position pulse down counter 2. The signal is the remaining pulse number of the position pulse down counter 2, and DSP1 judges the Whether the number of remaining pulses is 0, that is, whether the state of the position pulse down counter 2 is empty, if the state of the position pulse down counter 2 is not empty, then DSP1 continues to send pulse signals to the position pulse down counter 2, and so on until the position pulse When the state of the down counter 2 is empty, stop sending the pulse signal. At this time, DSP1 receives the current position pulse signal M sent by the displacement counter 4, and then predicts whether the equipment movement mechanism may stop at the target position through the distance between the target position and the current position. If the distance between the target position and the current position is greater than 2 pulses , it is considered that after the motor stops rotating, the motion mechanism cannot stop at the target position. At this time, corrective measures need to be taken to avoid wasting time. The corrective measure is to first calculate the number of pulses that need to be output again, and then send this number of pulses to the position pulse subtraction counter 2, the number of pulses that needs to be output again=(ULONG)(θ(N-M)), and this number of pulses is used as the new N value , to replace the number of pulses N previously received by the position pulse subtraction counter 2, that is, to update the value of N, where the coefficient θ is a number greater than 0.5 and less than 1, multiply the distance between the target position and the current position by this coefficient , after rounding down, N is always greater than or equal to 1, that is to say, the positioning accuracy of the equipment is plus or minus one displacement sensor pulse. The sign of N-M represents predicting whether the final motor will fail to reach the position or will overshoot the target position, and the sign of N-M will determine the direction of rotation of the motor. If the distance between the target position and the current position is less than 2 pulses, the flag bit RchPosCnt is increased by 1, that is, RchPosCnt=RchPosCnt+1, and then judge whether RchPosCnt is equal to p, and the p is an integer greater than 10, if RchPosCnt is not equal to p , then continue to judge whether the distance between the target position and the current position is less than 2 pulses, and so on, until RchPosCnt is equal to p, stop positioning. During the period when RchPosCnt increases from 0 to p, if the distance between the target position and the current position remains less than 2 pulses, it is considered that the device motion mechanism has reached the target position and the positioning can be ended.

本实施方式所述的工业直线运动机构的快速精确预测定位系统在定位过程中,当预设脉冲数发送完成且设备还未停止运行时,预测设备运动机构有没有可能最终停在目标位置,若有,就等待其停止再做进一步判断。若没有可能,就判断运动机构是根本就到不了目标位置还是会冲过目标位置,如果是到不了,就立即向位置脉冲减计数器2发送若干个脉冲,让电机继续前行;如果是会过冲,就向位置脉冲减计数器2发送若干个反方向脉冲,使电机反向行进,直到电机到达目标位置为止。所述快速精确预测定位系统能够保证定位精度在5微米以内,且在定位过程中加入了预测过程,根据预测结果决定电机的下一步运动方式,与传统的高精度定位方式相比,定位时间缩短了20%以上。In the positioning process of the fast and accurate predictive positioning system for industrial linear motion mechanisms described in this embodiment, when the preset number of pulses is sent and the equipment has not stopped running, it is possible to predict whether the motion mechanism of the equipment will eventually stop at the target position. If there is, just wait for it to stop before making further judgments. If it is not possible, it is judged whether the motion mechanism will not reach the target position at all or will rush past the target position. If it cannot reach the target position, it will immediately send several pulses to the position pulse subtraction counter 2 to let the motor continue to move forward; If it rushes, send a number of pulses in the opposite direction to the position pulse down counter 2 to make the motor run in the reverse direction until the motor reaches the target position. The fast and accurate predictive positioning system can ensure that the positioning accuracy is within 5 microns, and a predictive process is added to the positioning process, and the next movement mode of the motor is determined according to the predicted results. Compared with the traditional high-precision positioning mode, the positioning time is shortened more than 20%.

具体实施方式七:本实施方式是对实施方式六所述的工业直线运动机构的快速精确预测定位系统的进一步限定,本实施方式中,所述的第三判断单元中,p=20。Embodiment 7: This embodiment is a further limitation of the fast and accurate predictive positioning system for industrial linear motion mechanisms described in Embodiment 6. In this embodiment, in the third judging unit, p=20.

具体实施方式八:本实施方式是对实施方式六所述的工业直线运动机构的快速精确预测定位系统的进一步限定,本实施方式中,所述的位移传感器5采用磁栅尺或光栅尺实现。Embodiment 8: This embodiment is a further limitation of the fast and accurate predictive positioning system for industrial linear motion mechanisms described in Embodiment 6. In this embodiment, the displacement sensor 5 is realized by a magnetic scale or a grating scale.

具体实施方式九:本实施方式是对实施方式六所述的工业直线运动机构的快速精确预测定位系统的进一步限定,本实施方式中,所述的位置脉冲减计数器2每接到一个DSP1发来的脉冲信号后,向电机驱动器3发送一个脉冲信号,然后再反馈给DSP1一个状态信号,该状态信号表示剩余脉冲数量。Ninth specific embodiment: This embodiment is a further limitation of the fast and accurate predictive positioning system of the industrial linear motion mechanism described in the sixth embodiment. In this embodiment, the position pulse down counter 2 receives a DSP1 every After the pulse signal, send a pulse signal to the motor driver 3, and then feed back a status signal to DSP1, which indicates the number of remaining pulses.

本实施方式中的位置脉冲减计数器2是由嵌入在CPLD中的软件来实现的。位置脉冲减计数器2的功能为每接到一个DSP1发来的脉冲信号后,向电机驱动器3发送一个脉冲信号,然后再反馈给DSP1一个状态信号,该状态信号表示剩余脉冲数量。剩余脉冲数量的初始值为DSP1向其写入的|N|,位置脉冲减计数器2每向电机驱动器3发送完一个脉冲信号后,剩余脉冲数量减1,当发送完|N|个脉冲给电机驱动器3后,剩余脉冲数量为0,此时,位置脉冲减计数器2的状态为空。The position pulse down counter 2 in this embodiment is realized by software embedded in the CPLD. The function of the position pulse down counter 2 is to send a pulse signal to the motor driver 3 after receiving a pulse signal from DSP1, and then feed back a status signal to DSP1, which indicates the number of remaining pulses. The initial value of the number of remaining pulses is the |N| written to it by DSP1. After the position pulse down counter 2 sends a pulse signal to the motor driver 3, the number of remaining pulses is reduced by 1. When |N| pulses are sent to the motor After the driver 3, the number of remaining pulses is 0, at this time, the status of the position pulse down counter 2 is empty.

具体实施方式十:本实施方式是对实施方式六所述的工业直线运动机构的快速精确预测定位系统的进一步限定,本实施方式中,所述的位移计数器4用于对位移传感器5输出的脉冲进行计数,其计数值用于确定设备运动机构在系统坐标系中的位置,即当前位置。Specific Embodiment Ten: This embodiment is a further limitation of the fast and accurate predictive positioning system of the industrial linear motion mechanism described in the sixth embodiment. In this embodiment, the displacement counter 4 is used for the pulse output by the displacement sensor 5 Counting is performed, and the count value is used to determine the position of the equipment movement mechanism in the system coordinate system, that is, the current position.

本实施方式中的所有的距离和位置均通过脉冲数来表示,位移传感器5输出的脉冲数反应了设备运动机构的当前位置,位移计数器4对位移传感器5输出的脉冲进行计数,并将其发送给DSP1,以使DSP1获得设备运动机构的当前位置。All distances and positions in the present embodiment are represented by pulse numbers, and the pulse numbers output by the displacement sensor 5 reflect the current position of the equipment kinematic mechanism, and the displacement counter 4 counts the pulses output by the displacement sensor 5 and sends them To DSP1, so that DSP1 obtains the current position of the device's motion mechanism.

Claims (10)

1. The method for quickly and accurately predicting and positioning the industrial linear motion mechanism is realized based on a quick and accurate prediction and positioning system of the industrial linear motion mechanism, the rapid and accurate prediction positioning system of the industrial linear motion mechanism comprises a DSP (1), a position pulse subtraction counter (2), a motor driver (3), a displacement counter (4) and a displacement sensor (5), the DSP (1) sends a pulse signal to the position pulse reduction counter (2), the position pulse down counter (2) sends a driving signal to the motor driver (3) to control the motor to move, simultaneously, the DSP (1) receives a position pulse down counter state signal from the position pulse down counter (2), namely a residual pulse number signal, the DSP (1) receives a current position pulse signal sent by a displacement sensor (5) through a displacement counter (4);
the method is characterized in that: the rapid and accurate prediction positioning method is realized by software embedded in a DSP (1), and comprises the following steps:
a target position instruction receiving step: receiving the target position instruction pulse number N, and executing a target pulse calculation step after the step is finished;
target pulse calculation step: the device is used for calculating the number of pulses required to be output, wherein the number of pulses is equal to the number N of target position instruction pulses; meanwhile, resetting the flag bit RchPosCnt, namely, the RchPosCnt is equal to 0; and executing a planned pulse writing step after the step is finished;
a planning pulse writing step: writing the absolute value | N | of the number of pulses N into a position pulse down counter (2); and performing a pulse transmission step after the step is finished;
a pulse sending step: the position pulse down counter is used for sending 1 position pulse signal to the position pulse down counter (2) through the position pulse sending port; and performing a remaining pulse signal receiving step after the step is finished;
a residual pulse signal receiving step: the pulse counter is used for receiving a residual pulse number signal sent by the position pulse subtraction counter (2); and executing a first judgment step after the step is finished;
a first judgment step; the step of receiving the current position is executed when the judgment result is yes; if the judgment result is negative, returning to the step of sending the executed pulse;
receiving the current position: the device is used for receiving a current position pulse signal M sent by a displacement counter (4); and executing a second judging step after the step is finished;
the displacement counter (4) is used for counting the pulses output by the displacement sensor (5), and the counting value of the displacement counter is used for determining the position of the equipment movement mechanism in a system coordinate system, namely the current position;
a second judgment step: the step of increasing the in-place flag is executed when the judgment result is yes; executing a correction pulse number calculation step when the judgment result is negative;
an in-place flag increasing step: for increasing the in-place flag by 1, i.e., RchPosCnt + 1; and executing a third judgment step after the step is finished;
a third judging step: judging whether the in-place mark is p, wherein p is an integer larger than 10, and ending positioning when the judgment result is yes; if the judgment result is negative, returning to execute the second judgment step;
a correction pulse number calculation step: for the calculation of the value of N,wherein,the number is between 0.5 and 1, and the number to the flag bit RchPosCnt is cleared; and the planned pulse writing step is executed after the step is finished.
2. The method for fast and accurate predictive positioning of an industrial linear motion mechanism according to claim 1, wherein: in the third determination step, p is 20.
3. The method for fast and accurate predictive positioning of an industrial linear motion mechanism according to claim 1, wherein: the displacement sensor (5) is realized by adopting a magnetic grating ruler or a grating ruler.
4. The method for fast and accurate predictive positioning of an industrial linear motion mechanism according to claim 1, wherein: after receiving a pulse signal sent by the DSP (1), the position pulse subtraction counter (2) sends a pulse signal to the motor driver (3) and then feeds back the pulse signal to the DSP (1) to form a state signal, wherein the state signal represents the number of the residual pulses.
5. The method for fast and accurate predictive positioning of an industrial linear motion mechanism according to claim 1, wherein: the displacement counter (4) is used for counting the pulses output by the displacement sensor (5), and the counting value is used for determining the position of the movement mechanism of the equipment in a system coordinate system, namely the current position.
6. Quick accurate prediction positioning system of industry linear motion mechanism, its characterized in that: the device comprises a DSP (1), a position pulse reduction counter (2), a motor driver (3), a displacement counter (4) and a displacement sensor (5), wherein the DSP (1) sends a pulse signal to the position pulse reduction counter (2), the position pulse reduction counter (2) sends a driving signal to the motor driver (3) to control the motor to move, meanwhile, the DSP (1) receives a position pulse reduction counter state signal, namely a residual quantity signal, from the position pulse reduction counter (2), and the DSP (1) receives a current position pulse signal sent by the displacement sensor (5) through the displacement counter (4);
a positioning module realized by software is embedded in the DSP (1), and the positioning module comprises the following units:
a target position instruction receiving unit: the pulse number N is used for receiving the target position instruction pulse number;
a target pulse calculation unit: the device is used for calculating the number of pulses required to be output, wherein the number of pulses is equal to the number N of target position instruction pulses; meanwhile, resetting the flag bit RchPosCnt, namely, the RchPosCnt is equal to 0;
a planned pulse writing unit: writing the absolute value | N | of the number of pulses N into a position pulse down counter (2);
a pulse transmission unit: the position pulse down counter is used for sending 1 position pulse signal to the position pulse down counter (2) through the position pulse sending port;
a remaining pulse signal receiving unit: the pulse counter is used for receiving a residual pulse number signal sent by the position pulse subtraction counter (2);
a first judgment unit; the device is used for judging whether the residual pulse number signal is 0 or not and starting the current position receiving unit when the judgment result is yes; starting a pulse sending unit when the judgment result is negative;
a current position receiving unit: the device is used for receiving a current position pulse signal M sent by a displacement counter (4);
a second judgment unit: the system is used for judging whether | N-M | is equal to 2 or not and starting an in-place mark increasing unit when the judgment result is yes; starting a correction pulse number calculating unit when the judgment result is negative;
an in-place flag increasing unit: for increasing the in-place flag by 1, i.e., RchPosCnt + 1;
a third judging unit: judging whether the in-place mark is p, wherein p is an integer larger than 10, and ending positioning when the judgment result is yes; starting a second judgment unit when the judgment result is negative;
a correction pulse number calculation unit: for the calculation of the value of N,wherein,is a number between 0.5 and 1, and the flag bit RchPosCnt is cleared.
7. The system for rapid and accurate predictive positioning of industrial linear motion mechanisms of claim 6, wherein: in the third judging unit, p is 20.
8. The system for rapid and accurate predictive positioning of industrial linear motion mechanisms of claim 6, wherein: the displacement sensor (5) is realized by adopting a magnetic grating ruler or a grating ruler.
9. The system for rapid and accurate predictive positioning of industrial linear motion mechanisms of claim 6, wherein: after receiving a pulse signal sent by the DSP (1), the position pulse subtraction counter (2) sends a pulse signal to the motor driver (3) and then feeds back the pulse signal to the DSP (1) to form a state signal, wherein the state signal represents the number of the residual pulses.
10. The system for rapid and accurate predictive positioning of industrial linear motion mechanisms of claim 6, wherein: the displacement counter (4) is used for counting the pulses output by the displacement sensor (5), and the counting value is used for determining the position of the movement mechanism of the equipment in a system coordinate system, namely the current position.
CN201410003567.4A 2014-01-03 2014-01-03 The quick accurately predicting localization method of industry straight-line motion mechanism and positioning system Active CN103699054B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410003567.4A CN103699054B (en) 2014-01-03 2014-01-03 The quick accurately predicting localization method of industry straight-line motion mechanism and positioning system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410003567.4A CN103699054B (en) 2014-01-03 2014-01-03 The quick accurately predicting localization method of industry straight-line motion mechanism and positioning system

Publications (2)

Publication Number Publication Date
CN103699054A CN103699054A (en) 2014-04-02
CN103699054B true CN103699054B (en) 2016-01-20

Family

ID=50360621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410003567.4A Active CN103699054B (en) 2014-01-03 2014-01-03 The quick accurately predicting localization method of industry straight-line motion mechanism and positioning system

Country Status (1)

Country Link
CN (1) CN103699054B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107992109B (en) * 2017-12-06 2021-03-09 深圳易能电气技术股份有限公司 Full closed-loop positioning control system and method
CN109656193A (en) * 2019-02-18 2019-04-19 陶承明 Kinematic system is accurately positioned control method, control system and storage medium
CN115847395B (en) * 2022-11-02 2024-09-03 中日龙(襄阳)机电技术开发有限公司 Method, system, electronic equipment and storage medium for judging moving in place by extractor

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6865425B2 (en) * 2002-01-07 2005-03-08 Siemens Energy & Automation, Inc. State machine for a pulse output function
CN101520348B (en) * 2009-03-30 2011-08-24 哈尔滨工业大学 A measuring device for positioning force of permanent magnet linear motor
CN101820203B (en) * 2010-01-26 2012-02-08 南通大学 Hybrid drive semi-closed loop precision positioning system
CN101841295B (en) * 2010-05-10 2012-08-22 湖南天安门业科技有限公司 Linear motor motion control method based on fixed-step speed measurement
CN102136300A (en) * 2011-02-10 2011-07-27 南京师范大学 Three-section combined type ultraprecise positioning table and positioning method thereof

Also Published As

Publication number Publication date
CN103699054A (en) 2014-04-02

Similar Documents

Publication Publication Date Title
CN105631616B (en) Intelligent positioning system and positioning method for warehousing and logistics
CN103699054B (en) The quick accurately predicting localization method of industry straight-line motion mechanism and positioning system
CN108297101A (en) The position and attitude error detection of multi-joint arm serial manipulator end and dynamic compensation method
WO2015157936A1 (en) A flow control valve servo mechanism based on a step motor and control method thereof
CN105320061A (en) Motor control apparatus for controlling motor
CN107322599A (en) A kind of method, storage device and the control device of robot Zero calibration
US20180212539A1 (en) Motor stop control method and motor stop control apparatus
EP2918851A1 (en) Positioner
CN111687842B (en) Robot positioning detection and adjustment method
CN109313429B (en) S-shaped speed planning method, device and system, robot and numerical control machine
CN103760921B (en) The initial point Precise Position System of the multiple sensor fusion of low precision and localization method
CN101870433A (en) Crane positioning device
CN116766214B (en) Motion control method and system of trowel robot and trowel robot
US20090254210A1 (en) System and method for movement control
CN110884385B (en) Tray extension positioning method and system
CN104634496A (en) Measuring device and method for electromagnetic force or electromagnetic torque
CN110641462B (en) Automatic steering method for agricultural machinery
CN201737602U (en) Crane positioner
US20200355495A1 (en) Method and apparatus for determining a chamfer property of a workpiece chamfer and computer program
CN103684194A (en) Asynchronous-induction linear motor and method for driving asynchronous-induction linear motor
WO2019202944A1 (en) Control system, control method, and program
CN202255344U (en) Meshing line large-specification gear measuring center
TWI551966B (en) Flexible deformation compensation method of feed system
CN113029200B (en) Method, system and medium for testing course angle and accuracy based on robot sensor
KR101448510B1 (en) System of measuring orthogonality of stage and home positioning method using the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant