CN118009864A - Rotor control method, device, electronic equipment and storage medium - Google Patents

Rotor control method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN118009864A
CN118009864A CN202410419065.3A CN202410419065A CN118009864A CN 118009864 A CN118009864 A CN 118009864A CN 202410419065 A CN202410419065 A CN 202410419065A CN 118009864 A CN118009864 A CN 118009864A
Authority
CN
China
Prior art keywords
distance
mover
encoder
target
reading
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.)
Granted
Application number
CN202410419065.3A
Other languages
Chinese (zh)
Other versions
CN118009864B (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.)
Suzhou Zongwei Technology Co ltd
Original Assignee
Suzhou Zongwei Technology Co ltd
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 Suzhou Zongwei Technology Co ltd filed Critical Suzhou Zongwei Technology Co ltd
Priority to CN202410419065.3A priority Critical patent/CN118009864B/en
Publication of CN118009864A publication Critical patent/CN118009864A/en
Application granted granted Critical
Publication of CN118009864B publication Critical patent/CN118009864B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65GTRANSPORT OR STORAGE DEVICES, e.g. CONVEYORS FOR LOADING OR TIPPING, SHOP CONVEYOR SYSTEMS OR PNEUMATIC TUBE CONVEYORS
    • B65G35/00Mechanical conveyors not otherwise provided for
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B7/00Measuring arrangements characterised by the use of electric or magnetic techniques
    • G01B7/003Measuring arrangements characterised by the use of electric or magnetic techniques for measuring position, not involving coordinate determination

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

本申请实施例提出的动子控制方法、装置、电子设备及存储介质,该方法通过首先,获取目标操作对应的控制距离,并获取多个编码器读头的读数距离;然后,控制动子在输送轨道上运动,并在运动过程中依次选取至少一个编码器读头作为目标读头;接下来,获取目标读头采集的动子的实时距离,并确定目标读头的实时距离与对应的读数距离一致,切换目标读头;最后,确定目标读头的实时距离与之前目标读头的读数距离之和为控制距离,执行目标操作,能够更加精准地在控制距离对目标动子执行目标操作。

The embodiments of the present application propose a mover control method, device, electronic device and storage medium. The method first obtains the control distance corresponding to the target operation and obtains the reading distances of multiple encoder readers; then, controls the mover to move on the conveying track, and selects at least one encoder reader in turn as the target reader during the movement; next, obtains the real-time distance of the mover collected by the target reader, determines that the real-time distance of the target reader is consistent with the corresponding reading distance, and switches the target reader; finally, determines that the sum of the real-time distance of the target reader and the previous reading distance of the target reader is the control distance, and executes the target operation, so that the target operation can be performed on the target mover at the control distance more accurately.

Description

动子控制方法、装置、电子设备及存储介质Movers control method, device, electronic equipment and storage medium

技术领域Technical Field

本申请涉及控制技术领域,尤其涉及动子控制方法、装置、电子设备及存储介质。The present application relates to the field of control technology, and in particular to a mover control method, device, electronic device and storage medium.

背景技术Background technique

利用磁栅检测技术对动子位置进行实时检测在工业自动化领域有着较为广泛的应用,比如可用于输送物流线上进行物品的装配、包装以及精密电子元器件的SMT等。在这些应用中大都需要根据动子运行过程中的实时位置执行相应的操作,因此需要对动子的实时位置进行精准测量,以便于精准地执行相应的操作。The use of magnetic grating detection technology to detect the position of the mover in real time has a wide range of applications in the field of industrial automation, such as assembly and packaging of items on the conveying logistics line and SMT of precision electronic components. In most of these applications, it is necessary to perform corresponding operations based on the real-time position of the mover during operation, so it is necessary to accurately measure the real-time position of the mover in order to accurately perform the corresponding operations.

在相关技术中,通常利用读数头的设置位置和读数头对动子的运动位置进行实时检测,当确定运动位置达到目标位置时,则对动子执行相应的控制操作。但是在动子的尺寸规格固定的情况下,通过这种检测方法容易出现目标位置距离超过读数头的检测情况,以导致无法精准地在目标位置对动子执行对应的控制操作。In the related art, the setting position of the reading head and the reading head are usually used to detect the moving position of the mover in real time. When it is determined that the moving position reaches the target position, the corresponding control operation is performed on the mover. However, when the size specifications of the mover are fixed, it is easy for this detection method to cause the target position distance to exceed the detection of the reading head, resulting in the inability to accurately perform the corresponding control operation on the mover at the target position.

发明内容Summary of the invention

本申请实施例的提供了一种动子控制方法、装置、电子设备及存储介质,能够提高检测动子运动到目标位置的精准性。The embodiments of the present application provide a mover control method, device, electronic device and storage medium, which can improve the accuracy of detecting the movement of the mover to the target position.

为实现上述目的,本申请实施例的第一方面提出了一种动子控制方法,所述方法包括:To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application provides a mover control method, the method comprising:

获取目标操作对应的控制距离,并获取多个编码器读头的读数距离;Obtain the control distance corresponding to the target operation and obtain the reading distances of multiple encoder readers;

控制动子在输送轨道上运动,并在运动过程中依次选取至少一个所述编码器读头作为目标读头;Controlling the mover to move on the conveying track, and selecting at least one of the encoder reading heads as a target reading head in sequence during the movement;

获取所述目标读头采集的所述动子的实时距离,并确定所述目标读头的所述实时距离与对应的所述读数距离一致,切换所述目标读头;Acquire the real-time distance of the mover collected by the target reading head, determine that the real-time distance of the target reading head is consistent with the corresponding reading distance, and switch the target reading head;

确定所述目标读头的所述实时距离与之前所述目标读头的所述读数距离之和为所述控制距离,执行所述目标操作。The sum of the real-time distance of the target reading head and the previous reading distance of the target reading head is determined as the control distance, and the target operation is performed.

在一些实施例,所述动子上设置有磁栅尺,所述获取多个编码器读头的读数距离之前,所述方法还包括:In some embodiments, a magnetic scale is provided on the mover, and before obtaining the reading distances of the plurality of encoder reading heads, the method further comprises:

获取所述磁栅尺的磁栅尺长度,并基于所述磁栅尺长度获取所述编码器读头的作用距离;所述作用距离包括起点位置和终点位置;Acquire the magnetic scale length of the magnetic scale, and acquire the action distance of the encoder reading head based on the magnetic scale length; the action distance includes a starting position and an end position;

依次设置所述编码器读头的探测位置,使得每一个所述编码器读头的所述终点位置至少在所述编码器读头的所述作用距离内;sequentially setting the detection positions of the encoder heads so that the end position of each encoder head is at least within the working distance of the encoder head;

根据所述探测位置确定每个所述编码器读头的所述读数距离。The reading distance of each encoder reading head is determined according to the detection position.

在一些实施例,所述根据所述探测位置确定每个所述编码器读头的所述读数距离,包括:In some embodiments, determining the reading distance of each encoder reading head according to the detection position includes:

根据所述编码器读头的位置顺序,选取相邻的所述编码器读头的所述作用距离的重叠区域得到候选范围,并从每个所述候选范围选取一个候选位置;According to the position sequence of the encoder heads, the overlapping area of the working distances of adjacent encoder heads is selected to obtain a candidate range, and a candidate position is selected from each candidate range;

依次根据第一个所述编码器读头的所述起点位置、所述候选位置、最后一个所述编码器读头的所述终点位置,基于每两个相邻的生成位置生成所述读数距离,并将所述读数距离与所述编码器读头进行关联,所述生成位置包括所述起点位置、所述候选位置以及所述终点位置。The reading distance is generated based on every two adjacent generation positions according to the starting position of the first encoder reader, the candidate position, and the end position of the last encoder reader, and the reading distance is associated with the encoder reader. The generation position includes the starting position, the candidate position, and the end position.

在一些实施例,所述在运动过程中依次选取至少一个所述编码器读头作为目标读头,包括:In some embodiments, sequentially selecting at least one of the encoder reading heads as a target reading head during the movement includes:

逐一将所述编码器读头的所述读数距离相加得到有效距离,直至所述有效距离至少大于或等于所述控制距离;Adding the reading distances of the encoder reading heads one by one to obtain an effective distance until the effective distance is at least greater than or equal to the control distance;

将获取所述有效距离对应的所述编码器读头依次作为所述目标读头。The encoder reading heads corresponding to the effective distances are sequentially used as the target reading heads.

在一些实施例,所述获取目标操作对应的控制距离,包括:In some embodiments, acquiring the control distance corresponding to the target operation includes:

获取所述动子与所述磁栅尺的相对位置;Obtaining the relative position of the mover and the magnetic scale;

获取所述动子的动子长度,并基于所述动子长度、所述相对位置和所述磁栅尺长度的差值得到控制误差;Acquiring a mover length of the mover, and obtaining a control error based on a difference between the mover length, the relative position and the length of the magnetic scale;

利用所述控制误差更新所述控制距离。The control distance is updated using the control error.

在一些实施例,所述获取所述目标读头采集的所述动子的实时距离,包括:In some embodiments, obtaining the real-time distance of the mover acquired by the target reading head includes:

获取所述目标读头实时采集的第一相增量和第二相增量;Acquire the first phase increment and the second phase increment collected in real time by the target reader;

基于所述第一相增量生成第一波形曲线,并基于所述第二相增量生成第二波形曲线;generating a first waveform curve based on the first phase increment, and generating a second waveform curve based on the second phase increment;

基于所述第一波形曲线和所述第二波形曲线的波形对比结果,确定所述动子的运行方向;Determining a running direction of the mover based on a waveform comparison result of the first waveform curve and the second waveform curve;

获取预设单位动量,基于所述运行方向、所述第一波形曲线的曲线参数、所述第二波形曲线的曲线参数以及所述预设单位动量确定所述实时距离。A preset unit momentum is obtained, and the real-time distance is determined based on the running direction, the curve parameters of the first waveform curve, the curve parameters of the second waveform curve, and the preset unit momentum.

在一些实施例,所述基于所述第一波形曲线和所述第二波形曲线的波形对比结果,确定所述动子的运行方向,包括;In some embodiments, determining the running direction of the mover based on a waveform comparison result between the first waveform curve and the second waveform curve includes:

确定所述第一波形曲线超过所述第二波形曲线第一预设角度时,确定所述运行方向为正向;When it is determined that the first waveform curve exceeds the first preset angle of the second waveform curve, determining that the running direction is forward;

或者,or,

确定所述第二波形曲线超过所述第一波形曲线第二预设角度时,确定所述运行方向为反向。When it is determined that the second waveform curve exceeds the second preset angle of the first waveform curve, it is determined that the running direction is reverse.

为实现上述目的,本申请实施例的第二方面提出了一种动子控制装置,所述装置包括:To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a mover control device, the device comprising:

获取模块,用于获取目标操作对应的控制距离,并获取多个编码器读头的读数距离;An acquisition module is used to acquire the control distance corresponding to the target operation and to acquire the reading distances of multiple encoder readers;

目标读头确定模块,用于控制动子在输送轨道上运动,并在运动过程中依次选取至少一个所述编码器读头作为目标读头;A target reader determination module is used to control the movement of the mover on the conveying track and sequentially select at least one of the encoder readers as a target reader during the movement;

切换模块,用于获取所述目标读头采集的所述动子的实时距离,并确定所述目标读头的所述实时距离与对应的所述读数距离一致,切换所述目标读头;A switching module, used to obtain the real-time distance of the mover collected by the target reading head, determine that the real-time distance of the target reading head is consistent with the corresponding reading distance, and switch the target reading head;

执行模块,用于确定所述目标读头的所述实时距离与之前所述目标读头的所述读数距离之和为所述控制距离,执行所述目标操作。An execution module is used to determine the sum of the real-time distance of the target reading head and the previous reading distance of the target reading head as the control distance, and execute the target operation.

为实现上述目的,本申请实施例的第三方面提出了一种电子设备,所述电子设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现如第一方面所述的动子控制方法。To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the actuator control method described in the first aspect when executing the computer program.

为实现上述目的,本申请实施例的第四方面提出了一种存储介质,所述存储介质为计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面所述的动子控制方法。To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program. When the computer program is executed by a processor, the actuator control method described in the first aspect is implemented.

本申请实施例提出的动子控制方法、装置、电子设备及存储介质,该方法通过首先,获取目标操作对应的控制距离,并获取多个编码器读头的读数距离;然后,控制动子在输送轨道上运动,并在运动过程中依次选取至少一个编码器读头作为目标读头;接下来,获取目标读头采集的动子的实时距离,并确定目标读头的实时距离与对应的读数距离一致,切换目标读头;最后,确定目标读头的实时距离与之前目标读头的读数距离之和为控制距离,执行目标操作。本申请实施例利用多个相邻设置的编码器读头对动子的运行的实时距离进行实时检测,避免单个读数头的有效识别范围无法满足较长的控制距离的距离要求,且逐一选取目标读头对动子运行进行检测,并利用实时距离是否达到读数距离作为目标读头的切换判断指标,避免多个相邻的读数头之间对动子的运行距离进行重复检测,从而有效地提高动子运动过程中的实时距离检测。同时利用当前目标读头精准检测的实时距离和之前的目标读头的读数距离之和实时判断是否达到了控制距离,能够更加精准地在控制距离对目标动子执行目标操作。The embodiment of the present application proposes a method, device, electronic device and storage medium for controlling a mover. The method first obtains the control distance corresponding to the target operation and obtains the reading distances of multiple encoder readers; then, controls the mover to move on the conveying track, and selects at least one encoder reader as the target reader in turn during the movement; next, obtains the real-time distance of the mover collected by the target reader, and determines that the real-time distance of the target reader is consistent with the corresponding reading distance, and switches the target reader; finally, determines that the sum of the real-time distance of the target reader and the reading distance of the previous target reader is the control distance, and executes the target operation. The embodiment of the present application uses multiple adjacently arranged encoder readers to perform real-time detection of the real-time distance of the mover's operation, avoiding the situation that the effective recognition range of a single reader cannot meet the distance requirements of the longer control distance, and selects the target reader one by one to detect the movement of the mover, and uses whether the real-time distance reaches the reading distance as the switching judgment index of the target reader, avoiding repeated detection of the moving distance of the mover between multiple adjacent readers, thereby effectively improving the real-time distance detection during the movement of the mover. At the same time, the sum of the real-time distance accurately detected by the current target reader and the reading distance of the previous target reader is used to determine in real time whether the control distance has been reached, so that the target operation can be performed on the target actuator more accurately at the control distance.

本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the description, claims and drawings.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请一实施例提供的磁驱检测系统的结构示意图。FIG. 1 is a schematic diagram of the structure of a magnetic drive detection system provided in an embodiment of the present application.

图2是本申请又一实施例提供的动子控制方法的流程图。FIG. 2 is a flow chart of a mover control method provided in yet another embodiment of the present application.

图3是本申请又一实施例提供的编码器读头的有效检测距离示意图。FIG3 is a schematic diagram of the effective detection distance of an encoder reader provided in yet another embodiment of the present application.

图4是图2中步骤201的流程图。FIG. 4 is a flow chart of step 201 in FIG. 2 .

图5是本申请又一实施例提供的动子控制误差的示意图。FIG5 is a schematic diagram of a mover control error provided in yet another embodiment of the present application.

图6是本申请又一实施例提供的动子控制误差的又一示意图。FIG. 6 is another schematic diagram of a mover control error provided in yet another embodiment of the present application.

图7是本申请又一实施例提供的动子控制方法的确定读数距离的流程图。FIG. 7 is a flow chart of determining a reading distance of a mover control method provided in yet another embodiment of the present application.

图8是图7中步骤703的流程图。FIG. 8 is a flow chart of step 703 in FIG. 7 .

图9是本申请又一实施例提供的读数距离确定示意图。FIG. 9 is a schematic diagram of determining a reading distance provided by another embodiment of the present application.

图10是图2中步骤202的流程图。FIG. 10 is a flow chart of step 202 in FIG. 2 .

图11是本申请又一实施例提供的目标读头的示意图。FIG. 11 is a schematic diagram of a target reading head provided in yet another embodiment of the present application.

图12是图2中步骤203的流程图。FIG. 12 is a flow chart of step 203 in FIG. 2 .

图13是图12中步骤1203的流程图。FIG. 13 is a flow chart of step 1203 in FIG. 12 .

图14是本申请又一实施例提供的运行增量示意图。FIG14 is a schematic diagram of an operation increment provided in yet another embodiment of the present application.

图15是本申请又一实施例提供的多编码器读头切换的动子运行曲线展示图。FIG. 15 is a diagram showing the operating curve of the actuator for switching multiple encoder heads provided in another embodiment of the present application.

图16是本申请又一实施例提供的多编码器读头切换的动子运行曲线又一展示图。FIG. 16 is another diagram showing the actuator operation curve of multi-encoder head switching provided in another embodiment of the present application.

图17是本申请又一实施例提供的动子控制方法的又一流程图。FIG. 17 is another flow chart of a mover control method provided in yet another embodiment of the present application.

图18是本申请一实施例提供的动子控制装置的结构示意图。FIG. 18 is a schematic structural diagram of a mover control device provided in an embodiment of the present application.

图19是本申请一实施例提供的电子设备的硬件结构示意图。FIG. 19 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

需要说明的是,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.

除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

首先,对本申请中涉及的若干名词进行解析:First, some nouns involved in this application are analyzed:

磁栅检测技术是一种用于测量、检测和分析物体表面磁场的非接触式检测方法。它基于磁场的相互作用原理,通过使用磁栅结构和传感器来识别和测量目标物体的磁场特征。磁栅检测技术主要有两种常见的应用方式:磁栅传感器和磁栅扫描。磁栅传感器是一种集成了磁栅结构和传感器的装置。当目标物体接近传感器时,磁场会改变传感器电压输出的特征,通过测量这种变化可以获得目标物体的磁场信息。磁栅传感器可用于测量磁场分布、检测目标物体的位置和姿态等应用领域。Magnetic grating detection technology is a non-contact detection method for measuring, detecting and analyzing the magnetic field on the surface of an object. It is based on the principle of magnetic field interaction and uses magnetic grating structures and sensors to identify and measure the magnetic field characteristics of the target object. There are two common applications of magnetic grating detection technology: magnetic grating sensors and magnetic grating scanning. A magnetic grating sensor is a device that integrates a magnetic grating structure and a sensor. When the target object approaches the sensor, the magnetic field changes the characteristics of the sensor's voltage output, and by measuring this change, the magnetic field information of the target object can be obtained. Magnetic grating sensors can be used in applications such as measuring magnetic field distribution and detecting the position and posture of target objects.

AB相增量曲线是指直流或交流电路中的两个相位(A相和B相或U相和V相)之间的相对相位差随时间变化的曲线。这种增量曲线通常用于分析和控制电力系统的运行。在直流电路中,AB相增量曲线表示了两个电压或电流信号之间的相对相位差随时间的变化。相位差可以通过测量或计算获得,并以图形方式表示。这种曲线在控制电路中常用于判断电路的稳定性和相位关系。在交流电路中,AB相增量曲线通常用于表示电压或电流的相对相位差随时间的变化。它是通过对相位差进行连续测量和记录来获得的,可以用于分析和调整电力系统的运行。在电力系统中,AB相增量曲线的变化可以指示电路的稳定性、分析电流和电压的相互影响,以及检测可能的故障。The AB phase incremental curve refers to a curve showing the relative phase difference between two phases (A phase and B phase or U phase and V phase) in a DC or AC circuit over time. This incremental curve is often used to analyze and control the operation of power systems. In a DC circuit, the AB phase incremental curve shows the change of the relative phase difference between two voltage or current signals over time. The phase difference can be obtained by measurement or calculation and represented graphically. This curve is often used in control circuits to determine the stability and phase relationship of the circuit. In an AC circuit, the AB phase incremental curve is often used to show the change of the relative phase difference of voltage or current over time. It is obtained by continuously measuring and recording the phase difference and can be used to analyze and adjust the operation of the power system. In a power system, the change of the AB phase incremental curve can indicate the stability of the circuit, analyze the mutual influence of current and voltage, and detect possible faults.

可编程逻辑控制器(Programmable Logic Controller,PLC)是一种专用的数字计算机,用于自动控制工业过程和机械设备。它通过输入输出模块与传感器、执行器和其他设备进行交互,实时监测和控制系统中的各种信号和参数。A programmable logic controller (PLC) is a special-purpose digital computer used to automatically control industrial processes and mechanical equipment. It interacts with sensors, actuators, and other devices through input and output modules to monitor and control various signals and parameters in the system in real time.

利用磁栅检测技术对动子位置进行实时检测在工业自动化领域有着较为广泛的应用,比如可用于输送物流线上进行物品的装配、包装以及精密电子元器件的SMT等。在这些应用中大都需要根据动子运行过程中的实时位置执行相应的操作,因此需要对动子的实时位置进行精准测量,以便于精准地执行相应的操作。The use of magnetic grating detection technology to detect the position of the mover in real time has a wide range of applications in the field of industrial automation, such as assembly and packaging of items on the conveying logistics line and SMT of precision electronic components. In most of these applications, it is necessary to perform corresponding operations based on the real-time position of the mover during operation, so it is necessary to accurately measure the real-time position of the mover in order to accurately perform the corresponding operations.

在相关技术中,通常利用读数头的设置位置和读数头对动子的运动位置进行实时检测,当确定运动位置达到目标位置时,则对动子执行相应的控制操作。但是在动子的尺寸规格固定的情况下,通过这种检测方法容易出现目标位置距离超过读数头的检测情况,以导致无法精准地在目标位置对动子执行对应的控制操作。In the related art, the setting position of the reading head and the reading head are usually used to detect the moving position of the mover in real time. When it is determined that the moving position reaches the target position, the corresponding control operation is performed on the mover. However, when the size specifications of the mover are fixed, it is easy for this detection method to cause the target position distance to exceed the detection of the reading head, resulting in the inability to accurately perform the corresponding control operation on the mover at the target position.

为了提高检测动子运动到目标位置的精准性,本申请实施例利用多个相邻设置的编码器读头对动子的运行的实时距离进行实时检测,避免单个读数头的有效识别范围无法满足较长的控制距离的距离要求,且逐一选取目标读头对动子运行进行检测,并利用实时距离是否达到读数距离作为目标读头的切换判断指标,避免多个相邻的读数头之间对动子的运行距离进行重复检测,从而有效地提高动子运动过程中的实时距离检测。同时利用当前目标读头精准检测的实时距离和之前的目标读头的读数距离之和实时判断是否达到了控制距离,能够更加精准地在控制距离对目标动子执行目标操作。In order to improve the accuracy of detecting the movement of the mover to the target position, the embodiment of the present application uses multiple adjacently arranged encoder heads to perform real-time detection of the real-time distance of the mover's operation, so as to avoid the effective recognition range of a single reading head being unable to meet the distance requirements of a longer control distance, and selects target reading heads one by one to detect the movement of the mover, and uses whether the real-time distance reaches the reading distance as a switching judgment indicator for the target reading head, so as to avoid repeated detection of the movement distance of the mover between multiple adjacent reading heads, thereby effectively improving the real-time distance detection during the movement of the mover. At the same time, the sum of the real-time distance accurately detected by the current target reading head and the reading distance of the previous target reading head is used to judge in real time whether the control distance has been reached, so that the target operation can be performed on the target mover more accurately at the control distance.

下面将进一步描述本申请实施例提供的动子控制方法、装置、电子设备及存储介质。本申请实施例中提供的动子控制方法可以应用于与磁浮输送系统相连接的智能终端、服务器、计算机等等。The following will further describe the mover control method, device, electronic device and storage medium provided in the embodiments of the present application. The mover control method provided in the embodiments of the present application can be applied to intelligent terminals, servers, computers, etc. connected to the magnetic levitation conveying system.

为了更好地阐述本申请实施例提供的动子控制方法,本实施例先描述应用动子控制方法的磁驱检测系统。参照图1所示,是本申请实施例提供的一种磁驱检测系统的结构示意图。在磁驱检测系统中包括集成了多种功能模块的检测处理模块、多个编码器读头、客户端以及功能模块,其中的检测处理模块与至少一个编码器读头、客户端以及功能模块相互连接。编码器读头设置于输送轨道上或者是设置于输送轨道旁边,用于实时检测输送轨道上的动子的运行数据,并将运行数据输入检测处理模块中,以便于检测处理模块对运行数据进行分析处理。若当判断动子的运行距离达到控制距离时,检测处理模块输送控制指令请求到客户端和功能模块以便于对动子执行相应的操作。编码器读头可以是磁栅读头、光栅读头以及电感式读头中的任意一种。另外,每个动子上均设置有磁栅尺,编码器读头通过与磁栅尺进行识别感应以对动子进行识别感应。In order to better illustrate the mover control method provided in the embodiment of the present application, the present embodiment first describes the magnetic drive detection system using the mover control method. Referring to FIG1, it is a schematic diagram of the structure of a magnetic drive detection system provided in the embodiment of the present application. The magnetic drive detection system includes a detection processing module integrating multiple functional modules, multiple encoder readers, a client and a functional module, wherein the detection processing module is interconnected with at least one encoder reader, a client and a functional module. The encoder reader is arranged on the conveying track or beside the conveying track, and is used to detect the operation data of the mover on the conveying track in real time, and input the operation data into the detection processing module, so that the detection processing module analyzes and processes the operation data. If it is judged that the running distance of the mover reaches the control distance, the detection processing module transmits the control instruction request to the client and the functional module so as to perform corresponding operations on the mover. The encoder reader can be any one of a magnetic grating reader, a grating reader and an inductive reader. In addition, a magnetic scale is arranged on each mover, and the encoder reader identifies and senses the mover by identifying and sensing the magnetic scale.

基于上述的磁驱检测系统,下面将具体描述本申请实施例中的动子控制方法。参照图2,为本申请实施例提供的动子控制方法的一个可选的流程图,图2中的方法可以包括但不限于包括步骤201至步骤204。同时可以理解的是,本实施例对图2中步骤201至步骤204的顺序不做具体限定,可以根据实际需求调整步骤顺序或者减少、增加某些步骤。Based on the above-mentioned magnetic drive detection system, the mover control method in the embodiment of the present application will be described in detail below. Referring to FIG. 2, an optional flow chart of the mover control method provided in the embodiment of the present application, the method in FIG. 2 may include but is not limited to steps 201 to 204. At the same time, it can be understood that this embodiment does not specifically limit the order of steps 201 to 204 in FIG. 2, and the order of steps can be adjusted or certain steps can be reduced or increased according to actual needs.

步骤201:获取目标操作对应的控制距离,并获取多个编码器读头的读数距离。Step 201: Obtain a control distance corresponding to a target operation, and obtain reading distances of multiple encoder reading heads.

以下对步骤201进行详细描述。The following is a detailed description of step 201.

在一些实施例中,在响应于目标操作的操作请求后,将首先获取目标操作对应的控制距离,从而便于磁驱检测系统基于控制距离,对动子的运行距离进行实时检测,当动子的运行距离达到控制距离时,则对动子执行相应的目标操作。In some embodiments, after responding to an operation request for a target operation, the control distance corresponding to the target operation will be obtained first, so that the magnetic drive detection system can perform real-time detection of the running distance of the mover based on the control distance. When the running distance of the mover reaches the control distance, the corresponding target operation will be performed on the mover.

在一些实施例中,目标操作可以是如图1中所示的客户端自定义执行的,也可以是如图1中所示的功能模块预先设置的,功能模块可以是飞拍相机功能、驱动器模块以及PLC模块等等。In some embodiments, the target operation can be customized by the client as shown in FIG. 1 , or can be pre-set by a functional module as shown in FIG. 1 . The functional module can be a flying camera function, a driver module, a PLC module, and the like.

飞拍相机是一种能够在空中进行拍摄的无人机相机或航拍相机,它结合了飞行器和摄影设备的功能。飞拍相机通常搭载在无人机上,通过遥控或预设航线进行飞行,并拍摄高空或特殊视角下的照片或视频。Aerial cameras are drone cameras or aerial cameras that can shoot in the air. They combine the functions of aircraft and photographic equipment. Aerial cameras are usually carried on drones, which fly by remote control or preset routes and take photos or videos from high altitudes or special perspectives.

驱动器是一种用于控制和驱动电动机或执行器的设备。它将电源提供的电能转化为适合电动机或执行器工作的信号和功率,并根据特定的控制算法来控制它们的运动或执行特定的动作。A driver is a device used to control and drive a motor or actuator. It converts the electrical energy provided by the power supply into signals and power suitable for the operation of the motor or actuator, and controls their movement or performs specific actions according to specific control algorithms.

在一些实施例中,编码器读头通常是通过检测动子上的磁栅尺以获取动子的运行数据。如图3所示,是本申请实施例提供的一种编码器读头的有效检测距离示意图。以一个编码器读头以及一个动子为示例,在动子上设置有一块磁栅尺,编码器读头通过检测磁场来测量和读取磁栅尺上的位置信息,并通过磁栅尺的编码以确定对应的动子,并且,当磁栅尺开始进入检测磁场以及完全离开检测磁场的过程中均为编码器读头的作用范围。因此,通过确定磁栅尺的尺寸长度可以确定编码器读头的作用范围,在如图1所示的动子上配备的磁栅尺是与动子尺寸一致,在这种情况下通过确定动子的尺寸同样可以确定编码器读头的作用范围。In some embodiments, the encoder reader usually obtains the operating data of the mover by detecting the magnetic scale on the mover. As shown in Figure 3, it is a schematic diagram of the effective detection distance of an encoder reader provided by an embodiment of the present application. Taking an encoder reader and a mover as an example, a magnetic scale is arranged on the mover, and the encoder reader measures and reads the position information on the magnetic scale by detecting the magnetic field, and determines the corresponding mover by encoding the magnetic scale, and the magnetic scale is within the range of action of the encoder reader when it begins to enter the detection magnetic field and completely leaves the detection magnetic field. Therefore, the range of action of the encoder reader can be determined by determining the size and length of the magnetic scale. The magnetic scale equipped on the mover as shown in Figure 1 is consistent with the size of the mover. In this case, the range of action of the encoder reader can also be determined by determining the size of the mover.

在一些实施例中,控制距离的起始点通常是针对于磁驱检测系统中设置的第一个编码器读头(如图1中所示的编码器读头1)开始检测到动子的位置,并基于此开始检测动子的运行距离是否达到了控制距离。由于存在磁栅尺与动子的长度尺寸不一致的情况,容易出现控制距离的误差,从而导致执行目标操作的位置发生偏差。因此,需要根据磁栅尺与动子的尺寸对控制距离进行调整。In some embodiments, the starting point of the control distance is usually the first encoder head (encoder head 1 shown in FIG. 1) set in the magnetic drive detection system to detect the position of the mover, and based on this, it starts to detect whether the running distance of the mover has reached the control distance. Due to the inconsistency between the length of the magnetic scale and the mover, errors in the control distance are prone to occur, resulting in deviations in the position of performing the target operation. Therefore, the control distance needs to be adjusted according to the size of the magnetic scale and the mover.

参照图4,获取目标操作对应的控制距离,包括以下步骤401至步骤403。4 , obtaining the control distance corresponding to the target operation includes the following steps 401 to 403 .

步骤401:获取动子与磁栅尺的相对位置。Step 401: Obtain the relative position between the mover and the magnetic scale.

步骤402:获取动子的动子长度,并基于动子长度、相对位置和磁栅尺长度的差值得到控制误差。Step 402: Obtain the mover length of the mover, and obtain the control error based on the difference between the mover length, the relative position and the magnetic scale length.

步骤403:利用控制误差更新控制距离。Step 403: Update the control distance using the control error.

以下对步骤401至步骤403进行详细描述。Steps 401 to 403 are described in detail below.

在一些实施例中,由于磁栅尺存在不放置在动子中心处的情况,因此动子与磁栅尺的中心位置可能不一致,因此需要先获取动子与磁栅尺的相对位置,然后获取动子的动子长度以及磁栅尺的磁栅尺长度,最后基于动子长度、相对位置和磁栅尺长度的差值得到控制误差,从而便于利用控制误差更新控制距离,以使得更加精准地对动子执行目标操作。In some embodiments, since the magnetic scale is not placed at the center of the mover, the center position of the mover and the magnetic scale may be inconsistent. Therefore, it is necessary to first obtain the relative position of the mover and the magnetic scale, and then obtain the mover length of the mover and the magnetic scale length of the magnetic scale. Finally, the control error is obtained based on the difference between the mover length, relative position and magnetic scale length, so as to facilitate the use of the control error to update the control distance, so that the target operation can be performed on the mover more accurately.

参照图5,是本申请实施例提供的动子控制误差的示意图。如图5中所示,动子1上配备的磁栅尺较长且位于动子1的偏前端。以编码器读头1的作用范围开始到编码器读头3的作用范围作为控制距离为示例,则动子应该运行到编码器读头3时才能对动子执行相应的目标操作。但由于磁栅尺较长,当磁栅尺开始进入编码器读头1的作用范围时,此时实际上动子1还没进入编码器读头1的作用范围,但编码器读头1已经开始对动子1进行运行检测;若仍保持原有的控制距离对动子进行控制的话,动子1将无法达到编码器读头3的作用范围(即当动子1的磁栅尺达到编码器读头3的作用范围时),则被认定为达到控制距离以执行相应的目标操作,这种情况下将发生距离误差。因此需要修正该误差,如图5中所示,将位于动子1前端的磁栅尺的相较长度作为控制误差(即利用动子长度、相对位置和磁栅尺长度的差值得到控制误差),然后在原有的控制距离的基础上加上该控制误差,即控制距离=控制距离+控制误差。从而可以满足当动子1实际上运行到编码器读头3的作用范围时,才被认定为达到控制距离以精准地执行相应的目标操作。Referring to FIG5 , it is a schematic diagram of the mover control error provided by an embodiment of the present application. As shown in FIG5 , the magnetic scale equipped on the mover 1 is relatively long and is located at the front end of the mover 1. Taking the range of action of the encoder head 1 to the range of action of the encoder head 3 as an example of the control distance, the mover should run to the encoder head 3 before the corresponding target operation can be performed on the mover. However, due to the long magnetic scale, when the magnetic scale begins to enter the range of action of the encoder head 1, the mover 1 has not actually entered the range of action of the encoder head 1 at this time, but the encoder head 1 has begun to perform operation detection on the mover 1; if the original control distance is still maintained to control the mover, the mover 1 will not be able to reach the range of action of the encoder head 3 (that is, when the magnetic scale of the mover 1 reaches the range of action of the encoder head 3), it will be deemed to have reached the control distance to perform the corresponding target operation, and a distance error will occur in this case. Therefore, the error needs to be corrected. As shown in FIG5 , the relative length of the magnetic scale at the front end of the mover 1 is used as the control error (i.e., the difference between the mover length, relative position and magnetic scale length is used to obtain the control error). Then, the control error is added to the original control distance, i.e., control distance = control distance + control error. Thus, when the mover 1 actually runs into the action range of the encoder head 3, it is considered to have reached the control distance to accurately perform the corresponding target operation.

参照图6,是本申请实施例提供的动子控制误差的又一示意图。如图6中所示,动子1上配备的磁栅尺较短且位于动子1的偏后端。以编码器读头1的作用范围开始到编码器读头3的作用范围作为控制距离为示例,则动子应该运行到编码器读头3时才能对动子执行相应的目标操作。但由于磁栅尺较短,当磁栅尺开始进入编码器读头1的作用范围时,此时实际上动子1已经有一截进入编码器读头1的作用范围,但编码器读头1才刚开始对动子1进行运行检测;若仍保持原有的控制距离对动子进行控制的话,动子1将超过编码器读头3的作用范围(即当动子1的磁栅尺达到编码器读头3的作用范围时),则被认定为达到控制距离以执行相应的目标操作,这种情况下将发生距离误差。因此需要修正该误差,如图5中所示,将位于动子1前端的磁栅尺的相较长度作为控制误差(即利用动子长度、相对位置和磁栅尺长度的差值得到控制误差),然后在原有的控制距离的基础上减去该控制误差,即控制距离=控制距离-控制误差。从而可以满足当动子1实际上运行到编码器读头3的作用范围时,既能被认定为达到控制距离以精准地执行相应的目标操作。Referring to FIG6 , it is another schematic diagram of the mover control error provided by the embodiment of the present application. As shown in FIG6 , the magnetic scale equipped on the mover 1 is relatively short and is located at the rear end of the mover 1. Taking the range of action of the encoder head 1 to the range of action of the encoder head 3 as an example of the control distance, the mover should run to the encoder head 3 before the corresponding target operation can be performed on the mover. However, since the magnetic scale is relatively short, when the magnetic scale begins to enter the range of action of the encoder head 1, at this time, in fact, a section of the mover 1 has already entered the range of action of the encoder head 1, but the encoder head 1 has just begun to perform operation detection on the mover 1; if the original control distance is still maintained to control the mover, the mover 1 will exceed the range of action of the encoder head 3 (that is, when the magnetic scale of the mover 1 reaches the range of action of the encoder head 3), it will be deemed to have reached the control distance to perform the corresponding target operation, and a distance error will occur in this case. Therefore, the error needs to be corrected. As shown in FIG5 , the relative length of the magnetic scale at the front end of the mover 1 is used as the control error (i.e., the difference between the mover length, relative position and magnetic scale length is used to obtain the control error), and then the control error is subtracted from the original control distance, i.e., control distance = control distance - control error. Thus, when the mover 1 actually runs into the action range of the encoder head 3, it can be identified as reaching the control distance to accurately perform the corresponding target operation.

通过上述步骤401至步骤402,基于编码器读头与磁栅尺的感应关系,利用动子与磁栅尺之间的相对位置以及动子与磁栅尺之间的长度关系,对控制距离进行修正,以得到实际针对于动子的控制距离,从而提高目标操作的精准性。Through the above steps 401 to 402, based on the inductive relationship between the encoder reader and the magnetic scale, the control distance is corrected by utilizing the relative position between the mover and the magnetic scale and the length relationship between the mover and the magnetic scale to obtain the actual control distance for the mover, thereby improving the accuracy of the target operation.

在一些实施例中,在对动子进行实时检测之前,还需要获取每个编码器读头的读数距离。由于磁驱检测系统中设置有多个编码器读头,且为了保证每两个相邻的编码器读头能够对同一个动子的运行进行连续检测,因此需要对每个编码器读头设置合适的探测位置。且为了进一步确保相邻的编码器读头不会对同一个动子的实时运行进行重复测量,需要对每个编码器读头在其作用距离内预先设置合适的读数距离。下面将进一步描述如何为每个动子设置合适的探测位置和读数距离。In some embodiments, before real-time detection of the mover is performed, the reading distance of each encoder head needs to be obtained. Since multiple encoder heads are provided in the magnetic drive detection system, and in order to ensure that every two adjacent encoder heads can continuously detect the operation of the same mover, it is necessary to set a suitable detection position for each encoder head. And in order to further ensure that adjacent encoder heads do not repeatedly measure the real-time operation of the same mover, it is necessary to pre-set a suitable reading distance for each encoder head within its working distance. The following will further describe how to set a suitable detection position and reading distance for each mover.

参照图7,获取多个编码器读头的读数距离之前,动子控制方法还包括以下步骤701至步骤703。7 , before obtaining the reading distances of the plurality of encoder reading heads, the mover control method further includes the following steps 701 to 703 .

步骤701:获取磁栅尺的磁栅尺长度,并基于磁栅尺长度获取编码器读头的作用距离。Step 701: Obtain the magnetic scale length of the magnetic scale, and obtain the working distance of the encoder reading head based on the magnetic scale length.

步骤702:依次设置编码器读头的探测位置,使得每一个编码器读头的终点位置至少在编码器读头的作用距离内。Step 702: sequentially set the detection positions of the encoder heads so that the end position of each encoder head is at least within the working distance of the encoder head.

步骤703:根据探测位置确定每个编码器读头的读数距离。Step 703: Determine the reading distance of each encoder reading head according to the detection position.

以下对步骤701至步骤703进行详细描述。Steps 701 to 703 are described in detail below.

在一些实施例中,参照图3的相关描述,通过获取磁栅尺的磁栅尺长度后,可以利用磁栅尺的磁栅尺长度可以进一步确定编码器读头的作用距离,其中,作用距离包括起点位置和终点位置。接下来基于作用距离对多个编码器读头的探测位置进行设置,以确保每两个相邻的编码器读头之间的设置距离不超过单个编码器读头的作用距离,以使得每一个编码器读头的作用距离的终点位置在下一个编码器读头的作用距离之间。从而保证每两个相邻的编码器读头能够对同一个动子的运行进行连续检测。接下来,为了确保相邻的编码器读头不会对同一个动子的实时运行进行重复测量,根据多个编码器读头设置的探测位置以确定每个编码器读头的读数距离,以确保相邻的编码器读头的读数距离是连续的,即前一个编码器读头的读数距离的终点位置即为后一个编码器读头的起点位置。下面将进一步描述如何确定每个编码器读头的读数距离。In some embodiments, referring to the relevant description of FIG. 3 , after obtaining the magnetic scale length of the magnetic scale, the magnetic scale length of the magnetic scale can be used to further determine the working distance of the encoder head, wherein the working distance includes a starting position and an end position. Next, the detection positions of multiple encoder heads are set based on the working distance to ensure that the setting distance between each two adjacent encoder heads does not exceed the working distance of a single encoder head, so that the end position of the working distance of each encoder head is between the working distances of the next encoder head. Thereby ensuring that every two adjacent encoder heads can continuously detect the operation of the same mover. Next, in order to ensure that adjacent encoder heads do not repeatedly measure the real-time operation of the same mover, the reading distance of each encoder head is determined according to the detection positions set by the multiple encoder heads to ensure that the reading distances of the adjacent encoder heads are continuous, that is, the end position of the reading distance of the previous encoder head is the starting position of the next encoder head. How to determine the reading distance of each encoder head will be further described below.

在一些实施例中,根据探测位置确定每个编码器读头的读数距离,包括以下步骤801至步骤802。In some embodiments, determining the reading distance of each encoder read head according to the detection position includes the following steps 801 to 802.

步骤801:根据编码器读头的位置顺序,选取相邻的编码器读头的作用距离的重叠区域得到候选范围,并从每个候选范围选取一个候选位置。Step 801: According to the position sequence of the encoder heads, the overlapping area of the working distances of adjacent encoder heads is selected to obtain a candidate range, and a candidate position is selected from each candidate range.

步骤802:依次根据第一个编码器读头的起点位置、候选位置、最后一个编码器读头的终点位置,基于每两个相邻的生成位置生成读数距离,并将读数距离与编码器读头进行关联。Step 802: Generate a reading distance based on every two adjacent generated positions according to the starting position, candidate position, and end position of the first encoder reader, and associate the reading distance with the encoder reader.

以下对步骤801至步骤802进行详细描述。Steps 801 to 802 are described in detail below.

在一些实施例中,在确定每个编码器读头的探测位置之后,将根据编码器读头的位置顺序,依次选取相邻的编码器读头的作用距离中的重叠区域作为候选范围,并从每个候选范围任意选取一个候选位置,即该候选位置可以是候选范围的任意一个点(包括候选范围的两个端点)。接下来在确定所有候选位置后,将依次根据第一个编码器读头的起点位置、候选位置、最后一个编码器读头的终点位置,得到生成位置,然后基于每两个相邻的生成位置生成每个编码器读头对应的读数距离,并将每个读数距离与所在的编码器读头进行一一关联。又由于每个编码器读头的设置距离不一样,以及每两个相邻编码器读头的重叠区域不一致,以及候选位置选取的任意性,因此不同编码器读头对应的读数距离也不一样。In some embodiments, after determining the detection position of each encoder head, the overlapping areas in the working distance of adjacent encoder heads are selected as candidate ranges according to the position sequence of the encoder heads, and a candidate position is arbitrarily selected from each candidate range, that is, the candidate position can be any point in the candidate range (including the two end points of the candidate range). Next, after determining all candidate positions, the generated position is obtained according to the starting position of the first encoder head, the candidate position, and the end position of the last encoder head, and then the reading distance corresponding to each encoder head is generated based on every two adjacent generated positions, and each reading distance is associated one by one with the encoder head where it is located. In addition, due to the different setting distances of each encoder head, the inconsistent overlapping areas of every two adjacent encoder heads, and the arbitrariness of the selection of candidate positions, the reading distances corresponding to different encoder heads are also different.

参照图9,是本申请实施例提供的一种读数距离确定示意图。如图9的五个编码器读头为示例,在确定五个编码器读头的探测位置以及作用距离后,将从每两个相邻的编码器读头的作用距离的重叠区域(包括编码器读头1与编码器读头2的重叠区域、编码器读头2与编码器读头3的重叠区域、编码器读头3与编码器读头4的重叠区域、编码器读头1与编码器读头2的重叠区域)中选取任意一个候选位置,然后将编码器读头1的起点位置以及第一个候选位置之间的距离作为编码器读头1的读数距离,将第一个候选位置到第二个候选位置之间的距离作为编码器读头2的读数距离,将第二个候选位置到第三个候选位置之间的距离作为编码器读头3的读数距离,将第三个候选位置到第四个候选位置之间的距离作为编码器读头4的读数距离,以及将第四个候选位置到编码器读头5的终点位置之间的距离作为编码器读头5的读数距离。Referring to Figure 9, it is a schematic diagram of determining a reading distance provided by an embodiment of the present application. Taking the five encoder heads shown in Figure 9 as an example, after determining the detection positions and action distances of the five encoder heads, any candidate position is selected from the overlapping area of the action distances of every two adjacent encoder heads (including the overlapping area of encoder head 1 and encoder head 2, the overlapping area of encoder head 2 and encoder head 3, the overlapping area of encoder head 3 and encoder head 4, and the overlapping area of encoder head 1 and encoder head 2), and then the distance between the starting position of encoder head 1 and the first candidate position is used as the reading distance of encoder head 1, the distance between the first candidate position and the second candidate position is used as the reading distance of encoder head 2, the distance between the second candidate position and the third candidate position is used as the reading distance of encoder head 3, the distance between the third candidate position and the fourth candidate position is used as the reading distance of encoder head 4, and the distance between the fourth candidate position and the end position of encoder head 5 is used as the reading distance of encoder head 5.

通过上述步骤801至步骤802,利用每两个编码器读头之间的重叠区域中选取候选位置,以确保相邻的编码器读头的读数距离是连续的,以利用多个连续的编码器读头及其读数距离有效地对动子的运行距离进行连续性且精准地检测,以克服控制距离超过单个编码器读头的检测区域后无法进行精准的检测情况,从而提高动子控制的可靠性。Through the above steps 801 to 802, candidate positions are selected in the overlapping area between every two encoder heads to ensure that the reading distances of adjacent encoder heads are continuous, so that multiple continuous encoder heads and their reading distances can be used to effectively and continuously and accurately detect the running distance of the mover, so as to overcome the situation where accurate detection cannot be performed after the control distance exceeds the detection area of a single encoder head, thereby improving the reliability of the mover control.

通过上述步骤701至步骤703,利用编码器读头的作用距离,确定每个编码器读头合适的探测位置,使得每两个相邻的编码器读头的作用区域存在重叠区域,以保证每两个相邻的编码器读头能够对同一个动子的运行进行连续检测;并基于编码器读头的探测位置,进一步确定每个编码器读头合适的读数距离,以确保相邻的编码器读头不会对同一个动子的实时运行进行重复测量,从而提高检测动子运行的精准性以及可靠性。Through the above steps 701 to 703, the effective distance of the encoder head is used to determine the appropriate detection position of each encoder head, so that there is an overlapping area between the effective areas of every two adjacent encoder heads, so as to ensure that every two adjacent encoder heads can continuously detect the operation of the same mover; and based on the detection position of the encoder head, the appropriate reading distance of each encoder head is further determined to ensure that adjacent encoder heads will not repeatedly measure the real-time operation of the same mover, thereby improving the accuracy and reliability of detecting the operation of the mover.

步骤202:控制动子在输送轨道上运动,并在运动过程中依次选取至少一个编码器读头作为目标读头。Step 202: Control the mover to move on the conveying track, and select at least one encoder reader in sequence as a target reader during the movement.

下面对步骤202进行详细描述。Step 202 is described in detail below.

在一些实施例中,在响应于目标操作的操作请求并获取了目标操作的控制距离以及多个编码器读头的读数距离之后,将控制动子上输送轨道上进行运动,并在动子的运动过程中根据动子的运行方向,依次选取至少一个编码器读头作为实时读取动子运行数据的目标读头。下面将进一步描述如何选取目标读头。In some embodiments, after responding to an operation request of a target operation and obtaining a control distance of the target operation and a reading distance of multiple encoder readers, the mover is controlled to move on the conveying track, and during the movement of the mover, at least one encoder reader is sequentially selected as a target reader for real-time reading the operation data of the mover according to the running direction of the mover. How to select a target reader will be further described below.

参照图10,在运动过程中依次选取至少一个编码器读头作为目标读头,包括以下步骤1001至步骤1002。10 , at least one encoder reader is selected in sequence as a target reader during the movement process, including the following steps 1001 to 1002 .

步骤1001:逐一将编码器读头的读数距离相加得到有效距离,直至有效距离至少大于或等于控制距离。Step 1001: Add the reading distances of the encoder reading head one by one to obtain the effective distance until the effective distance is at least greater than or equal to the control distance.

步骤1002:将获取有效距离对应的编码器读头依次作为目标读头。Step 1002: The encoder reader corresponding to the effective distance is used as the target reader in sequence.

以下对步骤1001至步骤1002进行详细描述。Steps 1001 to 1002 are described in detail below.

在一些实施例中,在获取控制距离之后,将根据动子的运行方向,从第一个编码器读头开始,逐一将编码器读头的读数距离相加以得到对动子进行检测的有效距离,直至有效距离至少大于或等于控制距离,即将该有效距离对应的至少一个编码器读头依次作为目标读头。In some embodiments, after obtaining the control distance, the reading distances of the encoder readers will be added one by one, starting from the first encoder reader, according to the running direction of the mover to obtain the effective distance for detecting the mover, until the effective distance is at least greater than or equal to the control distance, that is, at least one encoder reader corresponding to the effective distance will be used as the target reader in turn.

参照图11,是本申请实施例提供的一种目标读头的示意图。以图11中五个编码器读头为示例,其中编码器读头1的读数距离为第一距离、编码器读头2的读数距离为第二距离、编码器读头3的读数距离为第三距离、编码器读头4的读数距离为第四距离以及编码器读头5的读数距离为第五距离,且动子的运行方向为从编码器读头1往编码器读头5的方向,且控制距离大于任意两个读数距离之和时,将从编码器读头1的第一距离开始进行累加,直到累加到编码器读头3的第三距离时,才超过该控制距离,因此将编码器读头1、编码器读头2以及编码器读头3依次作为目标读头,以便于依次利用目标读头对动子进行运行距离检测。Referring to Figure 11, it is a schematic diagram of a target reader provided by an embodiment of the present application. Taking the five encoder readers in Figure 11 as an example, the reading distance of encoder reader 1 is the first distance, the reading distance of encoder reader 2 is the second distance, the reading distance of encoder reader 3 is the third distance, the reading distance of encoder reader 4 is the fourth distance, and the reading distance of encoder reader 5 is the fifth distance, and the running direction of the mover is from encoder reader 1 to encoder reader 5, and when the control distance is greater than the sum of any two reading distances, it will be accumulated from the first distance of encoder reader 1 until it is accumulated to the third distance of encoder reader 3, and then it exceeds the control distance, so encoder reader 1, encoder reader 2 and encoder reader 3 are used as target readers in turn, so as to detect the running distance of the mover in turn using the target readers.

步骤203:获取目标读头采集的动子的实时距离,并确定目标读头的实时距离与对应的读数距离一致,切换目标读头。Step 203: Acquire the real-time distance of the mover collected by the target reading head, determine whether the real-time distance of the target reading head is consistent with the corresponding reading distance, and switch the target reading head.

下面对步骤203进行详细描述。Step 203 is described in detail below.

在一些实施例中,在每个目标读头的读数距离内,获取该目标读头采集的动子的实时距离,当确定该目标读头读取的动子的实时距离达到目标读头对应的读数距离时,则切换到下一个目标读头。下面将进一步描述如何获取目标读头采集的动子的实时距离。In some embodiments, within the reading distance of each target reading head, the real-time distance of the moving element acquired by the target reading head is obtained, and when it is determined that the real-time distance of the moving element read by the target reading head reaches the reading distance corresponding to the target reading head, the next target reading head is switched. How to obtain the real-time distance of the moving element acquired by the target reading head will be further described below.

参照图12,获取目标读头采集的动子的实时距离,包括以下步骤1201至步骤1204。12 , obtaining the real-time distance of the mover collected by the target reader includes the following steps 1201 to 1204 .

步骤1201:获取目标读头实时采集的第一相增量和第二相增量。Step 1201: Acquire the first phase increment and the second phase increment collected in real time by the target reader.

步骤1202:基于第一相增量生成第一波形曲线,并基于第二相增量生成第二波形曲线。Step 1202: Generate a first waveform curve based on a first phase increment, and generate a second waveform curve based on a second phase increment.

步骤1203:基于第一波形曲线和第二波形曲线的波形对比结果,确定动子的运行方向。Step 1203: Determine the running direction of the mover based on the waveform comparison result between the first waveform curve and the second waveform curve.

下面对步骤1201至步骤1203进行详细描述。Steps 1201 to 1203 are described in detail below.

在一些实施例中,实时获取目标读头根据动子运行状态而实时采集的第一相增量和第二相增量,接下来基于连续采集的第一相增量生成第一波形曲线,以及基于连续采集的第二相增量生成第二波形曲线,然后基于第一波形曲线和第二波形曲线的波形对比结果可以进一步确定动子的运行方向。In some embodiments, the first phase increment and the second phase increment collected by the target reader in real time according to the running state of the mover are acquired in real time, and then a first waveform curve is generated based on the continuously collected first phase increment, and a second waveform curve is generated based on the continuously collected second phase increment. Then, the running direction of the mover can be further determined based on the waveform comparison result between the first waveform curve and the second waveform curve.

在一些实施例中,第一相增量和第二相增量可以为A相信号和B相信号,因此第一波形曲线为对应的A相增量曲线,第二波形曲线为B相增量曲线。当目标读头检测到运行中的动子时,输出的A相信号和B相信号的脉冲则开始发生变化,且根据检测到的不同的动子运行方向时,A相信号和B相信号的相位关系也不同。下面将进一步描述如何根据波形对比结果确定动子的运行方向。In some embodiments, the first phase increment and the second phase increment may be an A phase signal and a B phase signal, so the first waveform curve is the corresponding A phase increment curve, and the second waveform curve is the B phase increment curve. When the target reader detects the moving element in operation, the pulses of the output A phase signal and the B phase signal begin to change, and the phase relationship between the A phase signal and the B phase signal is different according to the different moving element running directions detected. The following will further describe how to determine the moving element running direction based on the waveform comparison results.

参照图13,基于第一波形曲线和第二波形曲线的波形对比结果,确定动子的运行方向,包括以下步骤1301至步骤1302。13 , based on the waveform comparison result of the first waveform curve and the second waveform curve, determining the running direction of the mover includes the following steps 1301 to 1302 .

步骤1301:确定第一波形曲线超过第二波形曲线第一预设角度时,确定运行方向为正向。Step 1301: When it is determined that the first waveform curve exceeds the first preset angle of the second waveform curve, the running direction is determined to be a forward direction.

步骤1302:或者,确定第二波形曲线超过第一波形曲线第二预设角度时,确定运行方向为反向。Step 1302: Alternatively, when it is determined that the second waveform curve exceeds the second preset angle of the first waveform curve, the running direction is determined to be reverse.

下面对步骤1301至步骤1302进行详细描述。Steps 1301 to 1302 are described in detail below.

在一些实施例中,在根据连续的第一相增量和第二相增量得到第一波形曲线和第二波形曲线后,将判断第一波形曲线和第二波形曲线的相位关系,当确定第一波形曲线的相位超过第二波形曲线的相位为第一预设角度时,确定动子的运行方向为正向;当确定第二波形曲线的相位超过第一波形曲线的相位为第二预设角度时,确定动子的运行方向为反向。在本实施例中,不对第一预设角度和第二预设角度的设置进行限制,即第一预设角度可以是根据用户需求所输入的,也可以是根据历史数据所得到的;类似的,第二预设角度也可以是根据用户需求所输入的,也可以是根据历史数据所得到的,第二预设角度可以等同于第一预设角度。In some embodiments, after obtaining the first waveform curve and the second waveform curve according to the continuous first phase increment and the second phase increment, the phase relationship between the first waveform curve and the second waveform curve is determined. When it is determined that the phase of the first waveform curve exceeds the phase of the second waveform curve by a first preset angle, the running direction of the mover is determined to be forward; when it is determined that the phase of the second waveform curve exceeds the phase of the first waveform curve by a second preset angle, the running direction of the mover is determined to be reverse. In this embodiment, there is no restriction on the setting of the first preset angle and the second preset angle, that is, the first preset angle can be input according to user needs or obtained according to historical data; similarly, the second preset angle can also be input according to user needs or obtained according to historical data, and the second preset angle can be equivalent to the first preset angle.

在一些实施例中,当第一相增量为A相信号和第二相增量为B相信号时,当判断第一波形曲线的相位超过第二波形曲线的相位90度时,则认定动子的运行方向为正向;当判断第二波形曲线的相位超过第一波形曲线的相位90度时,则认定动子的运行方向为反向。In some embodiments, when the first phase increment is an A-phase signal and the second phase increment is a B-phase signal, when it is determined that the phase of the first waveform curve exceeds the phase of the second waveform curve by 90 degrees, the running direction of the mover is determined to be forward; when it is determined that the phase of the second waveform curve exceeds the phase of the first waveform curve by 90 degrees, the running direction of the mover is determined to be reverse.

通过上述步骤1301至步骤1302,利用第一波形曲线和第二波形曲线的不同的相位关系,以精准地确定动子的运行方向,从而便于后续对动子运行过程的实时距离进行更加精准地测量。Through the above steps 1301 to 1302, the different phase relationships between the first waveform curve and the second waveform curve are utilized to accurately determine the running direction of the mover, thereby facilitating a more accurate measurement of the real-time distance of the mover during the running process.

步骤1204:获取预设单位动量,基于运行方向、第一波形曲线的曲线参数、第二波形曲线的曲线参数以及预设单位动量确定实时距离。Step 1204: Obtain a preset unit momentum, and determine the real-time distance based on the running direction, the curve parameters of the first waveform curve, the curve parameters of the second waveform curve, and the preset unit momentum.

下面对步骤1204进行详细描述。Step 1204 is described in detail below.

在一些实施例中,在确定第一波形曲线、第二波形曲线以及动子的运行方向之后,可以基于第一波形曲线的曲线参数和第二波形曲线的曲线参数以及动子的运行方向确定动子的运行增量。参照图14,是本申请实施例提供的运行增量示意图。如图14中所示,可以确定第一波形曲线的相位超过第二波形曲线的相位90度,因此可以确定动子的运行方向为正向,因此计数器输出为正增量,接下来根据第一波形曲线的曲线参数(包括电平和跳变沿)和第二波形的曲线参数(包括电平和跳变沿)以生成正向的增量,并基于正向的增量所得到的增量计数表图如图14中所示。接下来,通过获取预设单位动量,并将预设单位动量乘以正增量既可以得到动子在目标读头的读数距离内运行的实时距离。在本实施例中,不对预设单位动量的设置进行限制,即可以是根据用户需求所设置,也可以是根据编码器读头的参数进行设置的。In some embodiments, after determining the first waveform curve, the second waveform curve and the running direction of the mover, the running increment of the mover can be determined based on the curve parameters of the first waveform curve, the curve parameters of the second waveform curve and the running direction of the mover. Referring to Figure 14, it is a schematic diagram of the running increment provided in an embodiment of the present application. As shown in Figure 14, it can be determined that the phase of the first waveform curve exceeds the phase of the second waveform curve by 90 degrees, so it can be determined that the running direction of the mover is positive, so the counter output is a positive increment, and then the curve parameters of the first waveform curve (including level and jump edge) and the curve parameters of the second waveform (including level and jump edge) are used to generate a positive increment, and the increment count table diagram based on the positive increment is shown in Figure 14. Next, by obtaining a preset unit momentum and multiplying the preset unit momentum by the positive increment, the real-time distance of the mover running within the reading distance of the target reader can be obtained. In this embodiment, the setting of the preset unit momentum is not restricted, that is, it can be set according to user needs or according to the parameters of the encoder reader.

在一些实施例中,增量的具体生成规则为:1、正向的增量生成时机为:第一波形曲线上升沿且第二波形曲线逻辑低、第二波形曲线上升沿且第一波形曲线逻辑高、第二波形曲线下降沿且第一波形曲线逻辑低,以及第一波形曲线下降沿且第二波形曲线逻辑高。2、反向的增量生成时机为:第一波形曲线下降沿且第二波形曲线逻辑低、第二波形曲线下降沿且第一波形曲线逻辑高、第二波形曲线上升沿且第一波形曲线逻辑低,以及第一波形曲线上升沿且第二波形曲线逻辑高。In some embodiments, the specific generation rules of the increment are as follows: 1. The increment generation timing in the positive direction is: the rising edge of the first waveform and the logic low of the second waveform, the rising edge of the second waveform and the logic high of the first waveform, the falling edge of the second waveform and the logic low of the first waveform, and the falling edge of the first waveform and the logic high of the second waveform. 2. The increment generation timing in the reverse direction is: the falling edge of the first waveform and the logic low of the second waveform, the falling edge of the second waveform and the logic high of the first waveform, the rising edge of the second waveform and the logic low of the first waveform, and the rising edge of the first waveform and the logic high of the second waveform.

通过上述步骤1201至步骤1204,利用第一波形曲线和第二波形曲线的对比结果确定动子的运行方向,以便于利用运行方向、第一波形曲线的波形参数和第二波形曲线的波形参数精准地生成动子的运行增量并结合预设单位动量,可以精准地测量得到动子在目标读头的读数距离内运行的实时距离。Through the above steps 1201 to 1204, the running direction of the mover is determined by comparing the first waveform curve and the second waveform curve, so that the running increment of the mover can be accurately generated by using the running direction, the waveform parameters of the first waveform curve and the waveform parameters of the second waveform curve and combined with the preset unit momentum. The real-time distance of the mover running within the reading distance of the target reading head can be accurately measured.

步骤204:确定目标读头的实时距离与之前目标读头的读数距离之和为控制距离,执行目标操作。Step 204: Determine the sum of the real-time distance of the target reader and the previous reading distance of the target reader as the control distance, and perform the target operation.

下面对步骤204进行详细描述。Step 204 is described in detail below.

在一些实施例中,当任意一个目标读头在其对应的读数距离内测量动子的实时距离达到读数距离,且动子在前运行过的所有目标读头的读数距离累计未达到控制距离时,则切换到下一个目标读头进行动子的运行检测。In some embodiments, when any target reader measures the real-time distance of the mover within its corresponding reading distance and the accumulated reading distances of all target readers that the mover has run before do not reach the control distance, the next target reader is switched to perform operation detection of the mover.

在一些实施例中,在对动子进行运行距离检测时,可以将动子的运行轨迹曲线输出到客户端进行展示。如图15所示,是本申请实施例提供的一种多编码器读头切换的动子运行曲线展示图。如图15中的动子运行过编码器读头1的读数距离和编码器读头2的读数距离为示例,编码器读头1能获取到的动子的运行距离曲线为第一条斜线,其中前一部分为编码器读头1的读数距离,当动子运行到编码器读头1的读数距离的时刻(即图15中的两个斜线的圆点时刻),将切换为编码器读头2对动子进行实时距离检测。通过将多个编码器读头采集的动子运行过程中的实时距离展示到客户端,可以便于管理人员根据动子的运行数据进行实时控制等等。In some embodiments, when the running distance of the mover is detected, the running trajectory curve of the mover can be output to the client for display. As shown in Figure 15, it is a display diagram of the moving part running curve of a multi-encoder head switch provided in an embodiment of the present application. As shown in Figure 15, the moving part runs through the reading distance of encoder head 1 and the reading distance of encoder head 2 as an example. The running distance curve of the mover that can be obtained by encoder head 1 is the first oblique line, of which the first part is the reading distance of encoder head 1. When the moving part runs to the reading distance of encoder head 1 (that is, the dot moment of the two oblique lines in Figure 15), it will be switched to encoder head 2 to perform real-time distance detection on the moving part. By displaying the real-time distance of the moving part collected by multiple encoder heads during operation to the client, it is convenient for management personnel to perform real-time control according to the running data of the moving part, etc.

在一些实施例中,如图15所示的展示图中,由于多个编码器读头采集的运行距离数据均从0开始,且存在部分相邻两个编码器读头重复采集的部分,使得观看不够直观。因此,在本实施例中还提供了另一种展示图。参照图16所示,是本申请实施例提供的一种多编码器读头切换的动子运行曲线又一展示图。在图16中,将编码器读头2在读数距离内采集到的动子的实时距离拼接到编码器读头1的读数距离上,从而生成一条平滑的动子运行的实时距离曲线,以更加清晰明了地展示给管理人员观看,更便于管理人员根据动子的运行数据进行实时控制等等。In some embodiments, as shown in the display diagram of Figure 15, since the running distance data collected by multiple encoder heads all start from 0, and there are parts that are repeatedly collected by two adjacent encoder heads, the viewing is not intuitive enough. Therefore, another display diagram is also provided in this embodiment. Referring to Figure 16, it is another display diagram of the moving part running curve of a multi-encoder head switching provided in an embodiment of the present application. In Figure 16, the real-time distance of the moving part collected by encoder head 2 within the reading distance is spliced to the reading distance of encoder head 1, thereby generating a smooth real-time distance curve of the moving part running, so as to show it to the management personnel more clearly, making it easier for the management personnel to perform real-time control according to the running data of the moving part, etc.

在一些实施例中,当某一个目标读头测量动子运行的实时距离与在前的目标读头的读书距离之和达到控制距离时,则可以精准地对动子执行相应的目标操作。In some embodiments, when the sum of the real-time distance of the mover measured by a certain target reading head and the reading distance of the previous target reading head reaches the control distance, the corresponding target operation can be accurately performed on the mover.

参照图17所示,是本申请实施例提供的一种动子控制方法的又一流程图。当开始执行动子控制流程时,首先判断检测处理模块是否处于上电中,若检测处理模块不处于上电状态,则磁驱检测系统不进行工作;若检测处理模块处于上电状态,控制贴有磁栅尺的动子开始运动,并通过编码器读头1开始实时进行动子的位置反馈,当位置反馈动子运行的实时距离达到编码器读头1的读数距离时,切换到编码器读头2开始实时进行动子的位置反馈,当位置反馈动子运行的实时距离达到编码器读头2的读数距离时,将动子的运行数据以AB相脉冲的形式从输出端从到客户端,客户端判断动子的运行距离是否达到控制距离,若达到控制距离则执行相应的目标操作,并对其他运行的动子重复以上操作。Referring to FIG. 17 , another flow chart of a method for controlling a mover provided by an embodiment of the present application is shown. When the mover control process is started, it is first determined whether the detection and processing module is powered on. If the detection and processing module is not powered on, the magnetic drive detection system does not work; if the detection and processing module is powered on, the mover with the magnetic scale attached is controlled to start moving, and the position feedback of the mover is started in real time through the encoder reader 1. When the real-time distance of the position feedback mover reaches the reading distance of the encoder reader 1, the encoder reader 2 is switched to start real-time position feedback of the mover. When the real-time distance of the position feedback mover reaches the reading distance of the encoder reader 2, the operation data of the mover is transmitted from the output end to the client in the form of AB phase pulses. The client determines whether the running distance of the mover reaches the control distance. If the control distance is reached, the corresponding target operation is performed, and the above operation is repeated for other moving movers.

本申请实施例提出的动子控制方法、装置、电子设备及存储介质,该方法通过首先,获取目标操作对应的控制距离,然后获取动子与磁栅尺的相对位置,以及获取动子的动子长度,并基于动子长度、相对位置和磁栅尺长度的差值得到控制误差,并利用控制误差更新控制距离;此外,先基于磁栅尺长度获取编码器读头的作用距离,然后依次设置编码器读头的探测位置,使得每一个编码器读头的终点位置至少在编码器读头的作用距离内,并根据编码器读头的位置顺序,选取相邻的编码器读头的作用距离的重叠区域得到候选范围,并从每个候选范围选取一个候选位置,依次根据第一个编码器读头的起点位置、候选位置、最后一个编码器读头的终点位置,两两生成每个编码器读头的读数距离;然后基于多个编码器读头的读数距离,控制动子在输送轨道上运动,并逐一将编码器读头的读数距离相加得到有效距离,直至有效距离至少大于或等于控制距离,将获取有效距离对应的编码器读头依次作为目标读头;并在运行过程中,获取目标读头实时采集的第一相增量和第二相增量,基于第一相增量生成第一波形曲线,并基于第二相增量生成第二波形曲线,基于第一波形曲线和第二波形曲线的波形对比结果,确定动子的运行方向,获取预设单位动量,基于运行方向、第一波形曲线的曲线参数、第二波形曲线的曲线参数以及预设单位动量确定实时距离,并当确定目标读头的实时距离与对应的读数距离一致,切换目标读头;最后,确定目标读头的实时距离与之前目标读头的读数距离之和为控制距离,执行目标操作。The mover control method, device, electronic device and storage medium proposed in the embodiments of the present application, the method first obtains the control distance corresponding to the target operation, then obtains the relative position of the mover and the magnetic scale, and obtains the mover length of the mover, and obtains the control error based on the difference between the mover length, the relative position and the magnetic scale length, and uses the control error to update the control distance; in addition, first obtains the action distance of the encoder reader based on the length of the magnetic scale, and then sets the detection position of the encoder reader in sequence, so that the end position of each encoder reader is at least within the action distance of the encoder reader, and according to the position sequence of the encoder readers, selects the overlapping area of the action distances of adjacent encoder readers to obtain a candidate range, and selects a candidate position from each candidate range, and generates the reading distance of each encoder reader two by two according to the starting position of the first encoder reader, the candidate position, and the end position of the last encoder reader in sequence; then based on multiple The encoder reader reads the distance, controls the movement of the mover on the conveying track, and adds the reading distances of the encoder reader one by one to obtain the effective distance, until the effective distance is at least greater than or equal to the control distance, and sequentially uses the encoder reader corresponding to the effective distance as the target reader; and in the operation process, obtains the first phase increment and the second phase increment collected in real time by the target reader, generates a first waveform curve based on the first phase increment, and generates a second waveform curve based on the second phase increment, determines the running direction of the mover based on the waveform comparison result of the first waveform curve and the second waveform curve, obtains the preset unit momentum, determines the real-time distance based on the running direction, the curve parameters of the first waveform curve, the curve parameters of the second waveform curve and the preset unit momentum, and when it is determined that the real-time distance of the target reader is consistent with the corresponding reading distance, switches the target reader; finally, determines that the sum of the real-time distance of the target reader and the reading distance of the previous target reader is the control distance, and executes the target operation.

本申请实施例首先基于编码器读头与磁栅尺的感应关系,利用动子与磁栅尺之间的相对位置以及动子与磁栅尺之间的长度关系,对控制距离进行修正,以得到实际针对于动子的控制距离,从而提高目标操作的精准性。利用多个相邻设置的编码器读头对动子的运行的实时距离进行实时检测,避免单个读数头的有效识别范围无法满足较长的控制距离的距离要求,同时利用编码器读头的作用距离,确定每个编码器读头合适的探测位置,使得每两个相邻的编码器读头的作用区域存在重叠区域,以保证每两个相邻的编码器读头能够对同一个动子的运行进行连续检测;并基于编码器读头的探测位置,进一步确定每个编码器读头合适的读数距离,以确保相邻的编码器读头不会对同一个动子的实时运行进行重复测量,从而提高检测动子运行的精准性以及可靠性。并在实际检测中逐一选取目标读头对动子运行进行检测,并利用实时距离是否达到读数距离作为目标读头的切换判断指标,避免多个相邻的读数头之间对动子的运行距离进行重复检测,从而有效地提高动子运动过程中的实时距离检测。同时利用当前目标读头精准检测的实时距离和之前的目标读头的读数距离之和实时判断是否达到了控制距离,能够更加精准地在控制距离对目标动子执行目标操作。The embodiment of the present application firstly corrects the control distance based on the inductive relationship between the encoder head and the magnetic scale, and uses the relative position between the mover and the magnetic scale and the length relationship between the mover and the magnetic scale to obtain the actual control distance for the mover, thereby improving the accuracy of the target operation. The real-time distance of the mover's operation is detected in real time by using multiple adjacent encoder heads to avoid the effective recognition range of a single reading head being unable to meet the distance requirements of the longer control distance. At the same time, the action distance of the encoder head is used to determine the appropriate detection position of each encoder head, so that there is an overlapping area between the action areas of every two adjacent encoder heads, so as to ensure that every two adjacent encoder heads can continuously detect the operation of the same mover; and based on the detection position of the encoder head, the appropriate reading distance of each encoder head is further determined to ensure that adjacent encoder heads will not repeatedly measure the real-time operation of the same mover, thereby improving the accuracy and reliability of detecting the operation of the mover. In the actual detection, the target readers are selected one by one to detect the movement of the mover, and whether the real-time distance reaches the reading distance is used as the switching judgment indicator of the target reader, so as to avoid repeated detection of the moving distance of the mover between multiple adjacent reading heads, thereby effectively improving the real-time distance detection during the movement of the mover. At the same time, the sum of the real-time distance accurately detected by the current target reader and the reading distance of the previous target reader is used to judge in real time whether the control distance has been reached, so that the target operation can be performed on the target mover more accurately at the control distance.

本申请实施例还提供一种动子控制装置,可以实现上述动子控制方法,参照图13,该装置1800包括:The embodiment of the present application further provides a mover control device, which can implement the above mover control method. Referring to FIG. 13 , the device 1800 includes:

获取模块1810,用于获取目标操作对应的控制距离,并获取多个编码器读头的读数距离;An acquisition module 1810 is used to acquire a control distance corresponding to a target operation and to acquire reading distances of multiple encoder reading heads;

目标读头确定模块1820,用于控制动子在输送轨道上运动,并在运动过程中依次选取至少一个编码器读头作为目标读头;The target reader determination module 1820 is used to control the movement of the mover on the conveying track and sequentially select at least one encoder reader as the target reader during the movement;

切换模块1830,用于获取目标读头采集的动子的实时距离,并确定目标读头的实时距离与对应的读数距离一致,切换目标读头;The switching module 1830 is used to obtain the real-time distance of the mover collected by the target reading head, determine that the real-time distance of the target reading head is consistent with the corresponding reading distance, and switch the target reading head;

执行模块1840,用于确定目标读头的实时距离与之前目标读头的读数距离之和为控制距离,执行目标操作。The execution module 1840 is used to determine the sum of the real-time distance of the target reading head and the previous reading distance of the target reading head as the control distance, and execute the target operation.

在一些实施例中,获取模块1810还用于:In some embodiments, the acquisition module 1810 is further configured to:

获取动子与磁栅尺的相对位置;Get the relative position between the mover and the magnetic scale;

获取动子的动子长度,并基于动子长度、相对位置和磁栅尺长度的差值得到控制误差;The mover length of the mover is obtained, and the control error is obtained based on the difference between the mover length, the relative position and the magnetic scale length;

利用控制误差更新控制距离。The control distance is updated using the control error.

在一些实施例中,动子控制装置还包括读数距离确定模块1850,读数距离确定模块1850用于:In some embodiments, the mover control device further includes a reading distance determination module 1850, and the reading distance determination module 1850 is used to:

获取磁栅尺的磁栅尺长度,并基于磁栅尺长度获取编码器读头的作用距离;作用距离包括起点位置和终点位置;Obtain the magnetic scale length of the magnetic scale, and obtain the working distance of the encoder reader based on the magnetic scale length; the working distance includes the starting position and the end position;

依次设置编码器读头的探测位置,使得每一个编码器读头的终点位置至少在编码器读头的作用距离内;The detection positions of the encoder reading heads are sequentially set so that the end position of each encoder reading head is at least within the working distance of the encoder reading head;

根据探测位置确定每个编码器读头的读数距离。The reading distance of each encoder read head is determined based on the detection position.

在一些实施例中,读数距离确定模块1850还用于:In some embodiments, the reading distance determination module 1850 is further configured to:

根据编码器读头的位置顺序,选取相邻的编码器读头的作用距离的重叠区域得到候选范围,并从每个候选范围选取一个候选位置;According to the position sequence of the encoder heads, the overlapping area of the working distances of adjacent encoder heads is selected to obtain a candidate range, and a candidate position is selected from each candidate range;

依次根据第一个编码器读头的起点位置、候选位置、最后一个编码器读头的终点位置,基于每两个相邻的生成位置生成读数距离,并将读数距离与编码器读头进行关联,生成位置包括起点位置、候选位置以及终点位置。According to the starting position, candidate position and end position of the first encoder reader, a reading distance is generated based on every two adjacent generated positions, and the reading distance is associated with the encoder reader. The generated positions include the starting position, candidate position and end position.

在一些实施例中,目标读头确定模块1820还用于:In some embodiments, the target reader determination module 1820 is further configured to:

逐一将编码器读头的读数距离相加得到有效距离,直至有效距离至少大于或等于控制距离;Add the reading distances of the encoder readers one by one to obtain the effective distance until the effective distance is at least greater than or equal to the control distance;

将获取有效距离对应的编码器读头依次作为目标读头。The encoder reader corresponding to the effective distance is used as the target reader in turn.

在一些实施例中,切换模块1830还用于:In some embodiments, the switching module 1830 is further configured to:

获取目标读头实时采集的第一相增量和第二相增量;Obtain the first phase increment and the second phase increment collected by the target reader in real time;

基于第一相增量生成第一波形曲线,并基于第二相增量生成第二波形曲线;generating a first waveform curve based on the first phase increment, and generating a second waveform curve based on the second phase increment;

基于第一波形曲线和第二波形曲线的波形对比结果,确定动子的运行方向;Determining the running direction of the mover based on a waveform comparison result between the first waveform curve and the second waveform curve;

获取预设单位动量,基于运行方向、第一波形曲线的曲线参数、第二波形曲线的曲线参数以及预设单位动量确定实时距离。A preset unit momentum is obtained, and a real-time distance is determined based on the running direction, the curve parameters of the first waveform curve, the curve parameters of the second waveform curve, and the preset unit momentum.

在一些实施例中,切换模块1830还用于:In some embodiments, the switching module 1830 is further configured to:

确定第一波形曲线超过第二波形曲线第一预设角度时,确定运行方向为正向;When it is determined that the first waveform curve exceeds the first preset angle of the second waveform curve, the running direction is determined to be a forward direction;

或者,or,

确定第二波形曲线超过第一波形曲线第二预设角度时,确定运行方向为反向。When it is determined that the second waveform curve exceeds the second preset angle of the first waveform curve, it is determined that the running direction is reverse.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,动子控制装置的具体实施方式与上述动子控制方法的具体实施方式基本一致,此处不再赘述。In the above embodiments, the description of each embodiment has its own emphasis. For the part that is not described in detail in a certain embodiment, the specific implementation of the mover control device is basically the same as the specific implementation of the mover control method described above, and will not be repeated here.

本申请实施例中,动子控制装置首先基于编码器读头与磁栅尺的感应关系,利用动子与磁栅尺之间的相对位置以及动子与磁栅尺之间的长度关系,对控制距离进行修正,以得到实际针对于动子的控制距离,从而提高目标操作的精准性。利用多个相邻设置的编码器读头对动子的运行的实时距离进行实时检测,避免单个读数头的有效识别范围无法满足较长的控制距离的距离要求,同时利用编码器读头的作用距离,确定每个编码器读头合适的探测位置,使得每两个相邻的编码器读头的作用区域存在重叠区域,以保证每两个相邻的编码器读头能够对同一个动子的运行进行连续检测;并基于编码器读头的探测位置,进一步确定每个编码器读头合适的读数距离,以确保相邻的编码器读头不会对同一个动子的实时运行进行重复测量,从而提高检测动子运行的精准性以及可靠性。并在实际检测中逐一选取目标读头对动子运行进行检测,并利用实时距离是否达到读数距离作为目标读头的切换判断指标,避免多个相邻的读数头之间对动子的运行距离进行重复检测,从而有效地提高动子运动过程中的实时距离检测。同时利用当前目标读头精准检测的实时距离和之前的目标读头的读数距离之和实时判断是否达到了控制距离,能够更加精准地在控制距离对目标动子执行目标操作。In the embodiment of the present application, the mover control device first corrects the control distance based on the inductive relationship between the encoder head and the magnetic scale, using the relative position between the mover and the magnetic scale and the length relationship between the mover and the magnetic scale, so as to obtain the actual control distance for the mover, thereby improving the accuracy of the target operation. The real-time distance of the mover's operation is detected in real time by using multiple adjacent encoder heads to avoid the effective recognition range of a single head failing to meet the distance requirements of the longer control distance. At the same time, the action distance of the encoder head is used to determine the appropriate detection position of each encoder head, so that the action areas of every two adjacent encoder heads overlap, so as to ensure that every two adjacent encoder heads can continuously detect the operation of the same mover; and based on the detection position of the encoder head, the appropriate reading distance of each encoder head is further determined to ensure that adjacent encoder heads will not repeatedly measure the real-time operation of the same mover, thereby improving the accuracy and reliability of detecting the operation of the mover. In the actual detection, the target readers are selected one by one to detect the movement of the mover, and whether the real-time distance reaches the reading distance is used as the switching judgment indicator of the target reader, so as to avoid repeated detection of the moving distance of the mover between multiple adjacent reading heads, thereby effectively improving the real-time distance detection during the movement of the mover. At the same time, the sum of the real-time distance accurately detected by the current target reader and the reading distance of the previous target reader is used to judge in real time whether the control distance has been reached, so that the target operation can be performed on the target mover more accurately at the control distance.

本申请实施例还提供了一种电子设备,包括:The present application also provides an electronic device, including:

至少一个存储器;at least one memory;

至少一个处理器;at least one processor;

至少一个程序;at least one program;

所述程序被存储在存储器中,处理器执行所述至少一个程序以实现本申请实施上述的动子控制方法。该电子设备可以为包括手机、平板电脑、个人数字助理(PersonalDigital Assistant,简称PDA)、车载电脑等任意智能终端。The program is stored in the memory, and the processor executes the at least one program to implement the above-mentioned mover control method of the present application. The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.

请参阅图19,图19示意了另一实施例的电子设备的硬件结构,电子设备包括:Please refer to FIG. 19 , which schematically shows the hardware structure of an electronic device according to another embodiment. The electronic device includes:

处理器1901,可以采用通用的CPU(CentralProcessingUnit,中央处理器)、微处理器、应用专用集成电路(ApplicationSpecificIntegratedCircuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本申请实施例所提供的技术方案;The processor 1901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

存储器1902,可以采用ROM(ReadOnlyMemory,只读存储器)、静态存储设备、动态存储设备或者RAM(RandomAccessMemory,随机存取存储器)等形式实现。存储器1902可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器1902中,并由处理器1901来调用执行本申请实施例的动子控制方法;The memory 1902 can be implemented in the form of ROM (Read Only Memory), static storage device, dynamic storage device or RAM (Random Access Memory). The memory 1902 can store operating systems and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1902, and the processor 1901 is used to call and execute the mover control method of the embodiment of this application;

输入/输出接口1903,用于实现信息输入及输出;Input/output interface 1903, used to implement information input and output;

通信接口1904,用于实现本设备与其他设备的通信交互,可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信;Communication interface 1904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

总线1905,在设备的各个组件(例如处理器1901、存储器1902、输入/输出接口1903和通信接口1904)之间传输信息;A bus 1905 that transmits information between various components of the device (e.g., the processor 1901, the memory 1902, the input/output interface 1903, and the communication interface 1904);

其中处理器1901、存储器1902、输入/输出接口1903和通信接口1904通过总线1905实现彼此之间在设备内部的通信连接。The processor 1901 , the memory 1902 , the input/output interface 1903 and the communication interface 1904 are connected to each other in communication within the device via the bus 1905 .

本申请实施例还提供了一种存储介质,存储介质为计算机可读存储介质,该存储介质存储有计算机程序,该计算机程序被处理器执行时实现上述动子控制方法。An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the above-mentioned mover control method is implemented.

存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至该处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

本申请实施例描述的实施例是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域技术人员可知,随着技术的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

本领域技术人员可以理解的是,图中示出的技术方案并不构成对本申请实施例的限定,可以包括比图示更多或更少的步骤,或者组合某些步骤,或者不同的步骤。Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、设备中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules/units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

本申请的说明书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And/or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and/or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character "/" generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括多指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例的方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

以上参照附图说明了本申请实施例的优选实施例,并非因此局限本申请实施例的权利范围。本领域技术人员不脱离本申请实施例的范围和实质内所作的任何修改、等同替换和改进,均应在本申请实施例的权利范围之内。The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.

Claims (10)

1.一种动子控制方法,其特征在于,所述方法包括:1. A mover control method, characterized in that the method comprises: 获取目标操作对应的控制距离,并获取多个编码器读头的读数距离;Obtain the control distance corresponding to the target operation and obtain the reading distances of multiple encoder readers; 控制动子在输送轨道上运动,并在运动过程中依次选取至少一个所述编码器读头作为目标读头;Controlling the mover to move on the conveying track, and selecting at least one of the encoder reading heads as a target reading head in sequence during the movement; 获取所述目标读头采集的所述动子的实时距离,并确定所述目标读头的所述实时距离与对应的所述读数距离一致,切换所述目标读头;Acquire the real-time distance of the mover collected by the target reading head, determine that the real-time distance of the target reading head is consistent with the corresponding reading distance, and switch the target reading head; 确定所述目标读头的所述实时距离与之前所述目标读头的所述读数距离之和为所述控制距离,执行所述目标操作。The sum of the real-time distance of the target reading head and the previous reading distance of the target reading head is determined as the control distance, and the target operation is performed. 2.根据权利要求1所述的动子控制方法,其特征在于,所述动子上设置有磁栅尺,所述获取多个编码器读头的读数距离之前,所述方法还包括:2. The mover control method according to claim 1, characterized in that a magnetic scale is provided on the mover, and before obtaining the reading distances of the plurality of encoder reading heads, the method further comprises: 获取所述磁栅尺的磁栅尺长度,并基于所述磁栅尺长度获取所述编码器读头的作用距离;所述作用距离包括起点位置和终点位置;Acquire the magnetic scale length of the magnetic scale, and acquire the action distance of the encoder reading head based on the magnetic scale length; the action distance includes a starting position and an end position; 依次设置所述编码器读头的探测位置,使得每一个所述编码器读头的所述终点位置至少在所述编码器读头的所述作用距离内;sequentially setting the detection positions of the encoder heads so that the end position of each encoder head is at least within the working distance of the encoder head; 根据所述探测位置确定每个所述编码器读头的所述读数距离。The reading distance of each encoder reading head is determined according to the detection position. 3.根据权利要求2所述的动子控制方法,其特征在于,所述根据所述探测位置确定每个所述编码器读头的所述读数距离,包括:3. The mover control method according to claim 2, characterized in that the step of determining the reading distance of each encoder reading head according to the detection position comprises: 根据所述编码器读头的位置顺序,选取相邻的所述编码器读头的所述作用距离的重叠区域得到候选范围,并从每个所述候选范围选取一个候选位置;According to the position sequence of the encoder heads, the overlapping area of the working distances of adjacent encoder heads is selected to obtain a candidate range, and a candidate position is selected from each candidate range; 依次根据第一个所述编码器读头的所述起点位置、所述候选位置、最后一个所述编码器读头的所述终点位置,基于每两个相邻的生成位置生成所述读数距离,并将所述读数距离与所述编码器读头进行关联,所述生成位置包括所述起点位置、所述候选位置以及所述终点位置。The reading distance is generated based on every two adjacent generation positions according to the starting position of the first encoder reader, the candidate position, and the end position of the last encoder reader, and the reading distance is associated with the encoder reader. The generation position includes the starting position, the candidate position, and the end position. 4.根据权利要求1所述的动子控制方法,其特征在于,所述在运动过程中依次选取至少一个所述编码器读头作为目标读头,包括:4. The mover control method according to claim 1, characterized in that the step of sequentially selecting at least one encoder reader as a target reader during the movement process comprises: 逐一将所述编码器读头的所述读数距离相加得到有效距离,直至所述有效距离至少大于或等于所述控制距离;Adding the reading distances of the encoder reading heads one by one to obtain an effective distance until the effective distance is at least greater than or equal to the control distance; 将获取所述有效距离对应的所述编码器读头依次作为所述目标读头。The encoder reading heads corresponding to the effective distances are sequentially used as the target reading heads. 5.根据权利要求2所述的动子控制方法,其特征在于,所述获取目标操作对应的控制距离,包括:5. The mover control method according to claim 2, characterized in that the step of obtaining the control distance corresponding to the target operation comprises: 获取所述动子与所述磁栅尺的相对位置;Obtaining the relative position of the mover and the magnetic scale; 获取所述动子的动子长度,并基于所述动子长度、所述相对位置和所述磁栅尺长度的差值得到控制误差;Acquiring a mover length of the mover, and obtaining a control error based on a difference between the mover length, the relative position and the length of the magnetic scale; 利用所述控制误差更新所述控制距离。The control distance is updated using the control error. 6.根据权利要求2所述的动子控制方法,其特征在于,所述获取所述目标读头采集的所述动子的实时距离,包括:6. The mover control method according to claim 2, characterized in that the step of obtaining the real-time distance of the mover collected by the target reader comprises: 获取所述目标读头实时采集的第一相增量和第二相增量;Acquire the first phase increment and the second phase increment collected in real time by the target reader; 基于所述第一相增量生成第一波形曲线,并基于所述第二相增量生成第二波形曲线;generating a first waveform curve based on the first phase increment, and generating a second waveform curve based on the second phase increment; 基于所述第一波形曲线和所述第二波形曲线的波形对比结果,确定所述动子的运行方向;Determining a running direction of the mover based on a waveform comparison result of the first waveform curve and the second waveform curve; 获取预设单位动量,基于所述运行方向、所述第一波形曲线的曲线参数、所述第二波形曲线的曲线参数以及所述预设单位动量确定所述实时距离。A preset unit momentum is obtained, and the real-time distance is determined based on the running direction, the curve parameters of the first waveform curve, the curve parameters of the second waveform curve, and the preset unit momentum. 7.根据权利要求6所述的动子控制方法,其特征在于,所述基于所述第一波形曲线和所述第二波形曲线的波形对比结果,确定所述动子的运行方向,包括;7. The mover control method according to claim 6, characterized in that the determining the running direction of the mover based on the waveform comparison result of the first waveform curve and the second waveform curve comprises: 确定所述第一波形曲线超过所述第二波形曲线第一预设角度时,确定所述运行方向为正向;When it is determined that the first waveform curve exceeds the first preset angle of the second waveform curve, determining that the running direction is forward; 或者,or, 确定所述第二波形曲线超过所述第一波形曲线第二预设角度时,确定所述运行方向为反向。When it is determined that the second waveform curve exceeds the second preset angle of the first waveform curve, it is determined that the running direction is reverse. 8.一种动子控制装置,其特征在于,所述装置包括:8. A mover control device, characterized in that the device comprises: 获取模块,用于获取目标操作对应的控制距离,并获取多个编码器读头的读数距离;An acquisition module is used to acquire the control distance corresponding to the target operation and to acquire the reading distances of multiple encoder readers; 目标读头确定模块,用于控制动子在输送轨道上运动,并在运动过程中依次选取至少一个所述编码器读头作为目标读头;A target reader determination module is used to control the movement of the mover on the conveying track and sequentially select at least one of the encoder readers as a target reader during the movement; 切换模块,用于获取所述目标读头采集的所述动子的实时距离,并确定所述目标读头的所述实时距离与对应的所述读数距离一致,切换所述目标读头;A switching module, used to obtain the real-time distance of the mover collected by the target reading head, determine that the real-time distance of the target reading head is consistent with the corresponding reading distance, and switch the target reading head; 执行模块,用于确定所述目标读头的所述实时距离与之前所述目标读头的所述读数距离之和为所述控制距离,执行所述目标操作。An execution module is used to determine the sum of the real-time distance of the target reading head and the previous reading distance of the target reading head as the control distance, and execute the target operation. 9.一种电子设备,其特征在于,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7任一项所述的动子控制方法。9. An electronic device, characterized in that it comprises a memory and a processor, wherein the memory stores a computer program, and characterized in that the processor implements the mover control method according to any one of claims 1 to 7 when executing the computer program. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7任一项所述的动子控制方法。10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the mover control method according to any one of claims 1 to 7.
CN202410419065.3A 2024-04-09 2024-04-09 Rotor control method, device, electronic equipment and storage medium Active CN118009864B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410419065.3A CN118009864B (en) 2024-04-09 2024-04-09 Rotor control method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410419065.3A CN118009864B (en) 2024-04-09 2024-04-09 Rotor control method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN118009864A true CN118009864A (en) 2024-05-10
CN118009864B CN118009864B (en) 2024-06-18

Family

ID=90958228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410419065.3A Active CN118009864B (en) 2024-04-09 2024-04-09 Rotor control method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118009864B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101581796A (en) * 2008-05-12 2009-11-18 村田机械株式会社 Moving vehicle system and method of detecting position of moving vehicle
CN105723179A (en) * 2013-10-18 2016-06-29 上海交通大学 Active positioning encoder and operating method therefor
CN108957966A (en) * 2014-03-28 2018-12-07 株式会社尼康 Mobile body device
CN112671202A (en) * 2021-01-06 2021-04-16 上海交通大学 Linear motor
CN113432518A (en) * 2021-07-01 2021-09-24 苏州汇川控制技术有限公司 Calibration device, magnetic direct sensor and driving motor
CN115385033A (en) * 2022-09-29 2022-11-25 深圳市兰星琪科技有限公司 Double-feedback positioning movement module and annular production line
CN115727747A (en) * 2022-11-25 2023-03-03 广东盈动高科自动化有限公司 Absolute straight line position positioning device and method
CN117383189A (en) * 2023-09-11 2024-01-12 苏州纵苇科技有限公司 A mover motion planning method and system, electronic equipment and storage medium
CN117566383A (en) * 2023-11-21 2024-02-20 苏州纵苇科技有限公司 Control method and related equipment for moving components of magnetic drive system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101581796A (en) * 2008-05-12 2009-11-18 村田机械株式会社 Moving vehicle system and method of detecting position of moving vehicle
CN105723179A (en) * 2013-10-18 2016-06-29 上海交通大学 Active positioning encoder and operating method therefor
CN108957966A (en) * 2014-03-28 2018-12-07 株式会社尼康 Mobile body device
CN112671202A (en) * 2021-01-06 2021-04-16 上海交通大学 Linear motor
CN113432518A (en) * 2021-07-01 2021-09-24 苏州汇川控制技术有限公司 Calibration device, magnetic direct sensor and driving motor
CN115385033A (en) * 2022-09-29 2022-11-25 深圳市兰星琪科技有限公司 Double-feedback positioning movement module and annular production line
CN115727747A (en) * 2022-11-25 2023-03-03 广东盈动高科自动化有限公司 Absolute straight line position positioning device and method
CN117383189A (en) * 2023-09-11 2024-01-12 苏州纵苇科技有限公司 A mover motion planning method and system, electronic equipment and storage medium
CN117566383A (en) * 2023-11-21 2024-02-20 苏州纵苇科技有限公司 Control method and related equipment for moving components of magnetic drive system

Also Published As

Publication number Publication date
CN118009864B (en) 2024-06-18

Similar Documents

Publication Publication Date Title
US9607244B2 (en) Image processing device, system, image processing method, and image processing program
CN110216715B (en) Robot navigation performance test method, system, test terminal and storage medium
US10825193B2 (en) Position detecting apparatus and computer-readable recording medium
CN106679710A (en) Magnetic encoder calibrating method and system
US20240351205A1 (en) Command value generating device, method, and program
CN111168688B (en) Robot action playback method and device
JP7316134B2 (en) POSITION AND POSTURE IDENTIFICATION APPARATUS, POSITION AND POSTURE IDENTIFICATION METHOD, AND POSITION AND POSTURE IDENTIFICATION PROGRAM
US10775242B2 (en) Tracking and ranging system and method thereof
CN113269085B (en) A linear conveyor belt tracking control method, system, device and storage medium
CN109656130A (en) Transfer robot progress control method, device, robot and storage medium
KR20160120494A (en) Moving robot and method for recognizing a location of the same
Tajima et al. Robust bin-picking system using tactile sensor
CN118009864A (en) Rotor control method, device, electronic equipment and storage medium
US12030192B2 (en) Motion model calculation device, control device, joint mechanism, and motion model calculation method
CN119123947B (en) Rotor position detection method of magnetic drive conveying system and related equipment
CN118225139A (en) Method and related equipment for detecting position information of mover with multiple reading heads
JP2015179051A5 (en)
CN108548536A (en) Position calculation method of unmanned intelligent robot
KR20220070592A (en) Intelligent smart logistics automation information processing device
JP7110845B2 (en) Information processing device and information processing method
JP7213471B2 (en) Motor drive and transport system
CN120848481A (en) Single point positioning method and its device, equipment and medium
CN113028992A (en) Power distribution room measuring method, device, equipment and storage medium
CN117850347B (en) Two-dimensional position comparison method, system, equipment and storage medium for motion control
CN118671671B (en) Position measurement method based on multi-head magneto-resistance effect sensor and sensor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant