CN110750477A - Method for communication between servo motor and magnetoelectric encoder in SPI mode - Google Patents

Method for communication between servo motor and magnetoelectric encoder in SPI mode Download PDF

Info

Publication number
CN110750477A
CN110750477A CN201910844516.7A CN201910844516A CN110750477A CN 110750477 A CN110750477 A CN 110750477A CN 201910844516 A CN201910844516 A CN 201910844516A CN 110750477 A CN110750477 A CN 110750477A
Authority
CN
China
Prior art keywords
servo motor
spi
computer
communication
magnetoelectric encoder
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.)
Pending
Application number
CN201910844516.7A
Other languages
Chinese (zh)
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.)
Chongqing East Yuzhong Energy Industry Co Ltd
Original Assignee
Chongqing East Yuzhong Energy Industry 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 Chongqing East Yuzhong Energy Industry Co Ltd filed Critical Chongqing East Yuzhong Energy Industry Co Ltd
Priority to CN201910844516.7A priority Critical patent/CN110750477A/en
Publication of CN110750477A publication Critical patent/CN110750477A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02KDYNAMO-ELECTRIC MACHINES
    • H02K11/00Structural association of dynamo-electric machines with electric components or with devices for shielding, monitoring or protection
    • H02K11/20Structural association of dynamo-electric machines with electric components or with devices for shielding, monitoring or protection for measuring, monitoring, testing, protecting or switching
    • H02K11/21Devices for sensing speed or position, or actuated thereby
    • H02K11/215Magnetic effect devices, e.g. Hall-effect or magneto-resistive elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Power Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

The invention relates to a method for communicating a servo motor and a magnetoelectric encoder in an SPI (serial peripheral interface) mode, belonging to the field of computers. The method comprises the following steps: and the MCU sends an instruction, and a digital signal compatible with the SPI is accessed to the servo motor system through the SSC interface. When the position loop control of a servo motor is researched and developed, the communication mode based on the SPI is more stable, and the position feedback anti-interference performance is stronger.

Description

Method for communication between servo motor and magnetoelectric encoder in SPI mode
Technical Field
The invention belongs to the field of computers, and relates to a method for communicating a servo motor and a magnetoelectric encoder in an SPI (serial peripheral interface) mode.
Background
For servo motor systems with position feedback, photoelectric encoders, hall sensors or magneto-electric encoders can generally be used as sensor elements for the feedback of the position. The interface between the magnetoelectric encoder and the servo motor is usually a standard photoelectric encoder interface (such as QEI), i.e. composed of pulse signals of a phase, B phase and R phase, as shown in fig. 1. The interface has higher requirements on the quality of pulse signals, and meanwhile, the interference resistance is poorer.
Disclosure of Invention
In view of the above, the present invention provides a method for communicating a servo motor and a magnetoelectric encoder through an SPI.
In order to achieve the purpose, the invention provides the following technical scheme:
a method for communication between a servo motor and a magnetoelectric encoder in an SPI mode comprises the following steps:
and the MCU sends an instruction, and a digital signal compatible with the SPI is accessed to the servo motor system through the SSC interface.
Optionally, the command is a motor driving command.
An electronic device comprising a processor and a memory, the memory having stored therein at least one instruction that is loaded and executed by the processor to perform operations performed by the method.
A computer-readable storage medium having stored therein instructions which, when executed on a computer, cause the computer to perform the method.
The invention has the beneficial effects that: when the position loop control of a servo motor is researched and developed, the communication mode based on the SPI is more stable, and the position feedback anti-interference performance is stronger.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the means of the instrumentalities and combinations particularly pointed out hereinafter.
Drawings
For the purposes of promoting a better understanding of the objects, aspects and advantages of the invention, reference will now be made to the following detailed description taken in conjunction with the accompanying drawings in which:
FIG. 1 is a prior art schematic;
FIG. 2 is a diagram of an application scenario of the present invention;
FIG. 3 is a schematic diagram of the present invention;
FIG. 4 is a flow chart of the present invention;
fig. 5 is a diagram illustrating the effect of the present invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention in a schematic way, and the features in the following embodiments and examples may be combined with each other without conflict.
Wherein the showings are for the purpose of illustrating the invention only and not for the purpose of limiting the same, and in which there is shown by way of illustration only and not in the drawings in which there is no intention to limit the invention thereto; to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numerals in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if there is an orientation or positional relationship indicated by terms such as "upper", "lower", "left", "right", "front", "rear", etc., based on the orientation or positional relationship shown in the drawings, it is only for convenience of description and simplification of description, but it is not an indication or suggestion that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes, and are not to be construed as limiting the present invention, and the specific meaning of the terms may be understood by those skilled in the art according to specific situations.
Please refer to fig. 2 to 5, which illustrate a method for communicating a servo motor and a magnetoelectric encoder through an SPI.
And through an SSC interface, a digital signal compatible with the SPI is accessed into the servo motor system. Compared with a PWM wave mode, the SPI-based signal communication is more stable and has strong anti-interference performance.
When the position loop control of a servo motor is researched and developed, the communication mode based on the SPI is more stable, and the position feedback anti-interference performance is stronger.
It should be recognized that embodiments of the present invention can be realized and implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The methods may be implemented in a computer program using standard programming techniques, including a non-transitory computer-readable storage medium configured with the computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner, according to the methods and figures described in the detailed description. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
Further, the operations of processes described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) collectively executed on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Alternatively, the method may be implemented in any type of computing platform operatively connected to a suitable connection, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the invention may be embodied in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or write storage medium, RAM, ROM, or the like, such that it may be read by a programmable computer, which when read by the storage medium or device, is operative to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. When the servo motor and the magnetoelectric encoder are programmed according to the method and the technology of communicating in the SPI mode, the invention also comprises the computer. A computer program can be applied to input data to perform the functions described herein to transform the input data to generate output data that is stored to non-volatile memory. The output information may also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including particular visual depictions of physical and tangible objects produced on a display.
Finally, the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the present invention, and although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all of them should be covered by the claims of the present invention.

Claims (4)

1. A method for communication between a servo motor and a magnetoelectric encoder in a SPI mode is characterized in that: the method comprises the following steps:
and the MCU sends an instruction, and a digital signal compatible with the SPI is accessed to the servo motor system through the SSC interface.
2. The method for communication between the servo motor and the magnetoelectric encoder in the SPI mode according to claim 1 is characterized in that: the command is a motor driving command.
3. An electronic device, characterized in that: the electronic device comprises a processor and a memory, the memory having stored therein at least one instruction that is loaded and executed by the processor to perform operations performed by the method of claim 1 or 2.
4. A computer-readable storage medium characterized by: the computer-readable storage medium has stored therein instructions which, when run on a computer, cause the computer to perform the method of claim 1 or 2.
CN201910844516.7A 2019-09-06 2019-09-06 Method for communication between servo motor and magnetoelectric encoder in SPI mode Pending CN110750477A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910844516.7A CN110750477A (en) 2019-09-06 2019-09-06 Method for communication between servo motor and magnetoelectric encoder in SPI mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910844516.7A CN110750477A (en) 2019-09-06 2019-09-06 Method for communication between servo motor and magnetoelectric encoder in SPI mode

Publications (1)

Publication Number Publication Date
CN110750477A true CN110750477A (en) 2020-02-04

Family

ID=69276254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910844516.7A Pending CN110750477A (en) 2019-09-06 2019-09-06 Method for communication between servo motor and magnetoelectric encoder in SPI mode

Country Status (1)

Country Link
CN (1) CN110750477A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113922924A (en) * 2021-10-08 2022-01-11 中国兵器装备集团自动化研究所有限公司 Spi-based absolute value encoder communication method and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106712596A (en) * 2016-11-22 2017-05-24 上海航天控制技术研究所 Permanent magnet synchronous motor servo driver based on double-core MCU (Micro-programmed Control Unit)

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106712596A (en) * 2016-11-22 2017-05-24 上海航天控制技术研究所 Permanent magnet synchronous motor servo driver based on double-core MCU (Micro-programmed Control Unit)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴志红: "《英飞凌16位单片机XC164CS的原理与基础应用》", vol. 1, 同济大学出版社, pages: 233 - 234 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113922924A (en) * 2021-10-08 2022-01-11 中国兵器装备集团自动化研究所有限公司 Spi-based absolute value encoder communication method and system

Similar Documents

Publication Publication Date Title
US10852139B2 (en) Positioning method, positioning device, and robot
US10960552B2 (en) Footed robot landing control method and device
US11331806B2 (en) Robot control method and apparatus and robot using the same
US20190186954A1 (en) Angle detection device and method of multi-turn servo, and multi-turn servo
US20120159436A1 (en) Method of bypassing an autosar software component of an autosar software system
CN108508812B (en) AGV controller IO port multiplexing configuration system and method thereof
US10965236B2 (en) Motor control system and associated method to control motor speed
CN111190589A (en) Visual programming method and terminal equipment
CN110601617A (en) Stepping motor control method, device and system and storage medium
CN109976326B (en) Wheeled robot control method and device, terminal device and medium
CN110750477A (en) Method for communication between servo motor and magnetoelectric encoder in SPI mode
CN110690835A (en) Method for accelerating and decelerating motor by using S-shaped curve
CN111195909B (en) Steering engine control method and device for robot, terminal and computer storage medium
CN113601510B (en) Robot movement control method, device, system and equipment based on binocular vision
US20080059979A1 (en) Control Device and Development System Thereof
CN112585497A (en) Radar system, movable platform and signal processing method
CN112054741B (en) Motor control method and device, terminal equipment and storage medium
CN111380527A (en) Navigation method and navigation controller of indoor service robot
CN109831717B (en) Noise reduction processing method and system and terminal equipment
CN107053169B (en) Bus type intelligent servo driving system, robot and method
CN114211486B (en) Robot control method, robot and storage medium
CN110377272B (en) Method and device for realizing SDK based on TBOX
CN114665749B (en) Motor high-precision subdivision control method, system, terminal equipment and storage medium
CN103558927A (en) 3D gesture control method and device
CN112104292B (en) Motor control method, device, terminal equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200204