CN114593755A - Data transmission method, system and computer readable storage medium - Google Patents

Data transmission method, system and computer readable storage medium Download PDF

Info

Publication number
CN114593755A
CN114593755A CN202011428685.1A CN202011428685A CN114593755A CN 114593755 A CN114593755 A CN 114593755A CN 202011428685 A CN202011428685 A CN 202011428685A CN 114593755 A CN114593755 A CN 114593755A
Authority
CN
China
Prior art keywords
encoder
data
command
eeprom
data transmission
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
CN202011428685.1A
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.)
Shandong Siasun Industrial Software Research Institute Co Ltd
Original Assignee
Shandong Siasun Industrial Software Research Institute 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 Shandong Siasun Industrial Software Research Institute Co Ltd filed Critical Shandong Siasun Industrial Software Research Institute Co Ltd
Priority to CN202011428685.1A priority Critical patent/CN114593755A/en
Publication of CN114593755A publication Critical patent/CN114593755A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/244Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
    • G01D5/249Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains using pulse code
    • G01D5/2497Absolute encoders
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

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

Abstract

The invention discloses a data transmission method, a system and a computer readable storage medium, comprising the following steps: s1, receiving a control command of data transmission sent by the driver chip; s2, completing the command response of the control command, locking the position data of the current encoder, and calculating a CRC check value according to the position data; s3, feeding back the response frame to the driver chip; wherein the response frame includes the control command, the command response, the location data, and the CRC check data. The invention can lead the driver chip to directly read the position information fed back by the absolute value encoder without adding a separate decoding chip or FPGA, thereby reducing the complexity of the hardware circuit of the servo driver, reducing the overall cost of the servo driving system, reducing the feedback delay of the position information and improving the anti-interference capability of the servo driving system.

Description

Data transmission method, system and computer readable storage medium
Technical Field
The present invention relates to the field of sensor technologies, and in particular, to a data transmission method, a data transmission system, and a computer-readable storage medium.
Background
The rapid development of modern industrial equipment such as precision numerical control machine tools and industrial robots puts forward higher and higher requirements on servo drive systems. In the servo drive system, an angle encoder as a position detection device has an important influence on the accuracy and reliability of the servo drive system.
Each position of the absolute value encoder corresponds to a determined digital code, the absolute value of the angle coordinate can be directly read, no accumulated error exists, the position information cannot be lost after the power supply is cut off, and the indication value of the absolute value encoder is only related to the starting position and the ending position of the measurement and is not related to the middle process of the measurement. Therefore, the absolute photoelectric encoder is more suitable for being applied to a high-speed and high-precision servo driving system. Absolute value angle encoder divide into multiple forms such as photoelectric encoder, magnetic encoder, induction type encoder according to the principle, no matter what kind of principle is used, absolute value angle encoder all need give servo driver with the position value transmission that the measurement obtained.
The existing communication methods of the absolute value encoder and the servo driver have two types:
the servo driver communicates with the corresponding type of encoder using a decoding chip provided by the encoder manufacturer.
The servo driver uses the FPGA to load an IP core provided by a manufacturer and communicates with the encoder of a corresponding model.
Both of these approaches have the following disadvantages:
a dedicated decoding chip or IP core is required, so that the driver must use a corresponding encoder, and it is difficult to replace the encoder model. The main control chip needs to read the absolute position value of the encoder through a decoding chip or an IP core, and the delay time of the servo driving system is increased. The main control chip indirectly reads the encoder, so that the complexity of the transmission process is increased, and the anti-interference capability of the system is reduced. Increasing the circuit complexity and hardware cost of the driver.
Disclosure of Invention
The invention aims to provide a data transmission method, a data transmission system and a computer readable storage medium, which are used for solving the problems that a special decoding chip or an IP core is required to be used, the time delay of a servo driving system is long, the complexity of the transmission process is high, the anti-interference capability of the system is reduced, and the circuit complexity and the hardware cost are high in the prior art.
The invention provides a data transmission method based on an absolute value encoder, which comprises the following steps: s1, receiving a control command of data transmission sent by the driver chip; s2, completing the command response of the control command, locking the position data of the current encoder, and calculating a CRC check value according to the position data; s3, feeding back the response frame to the driver chip; wherein the response frame includes the control command, the command response, the location data, and the CRC check data.
In an embodiment of the present invention, the step S1 includes the steps of: and receiving a read encoder position command, a read encoder EEPROM command and a write encoder EEPROM command in the control commands for multiple times.
In an embodiment of the present invention, the step S2 includes the steps of: s21, receiving the reading encoder position command; s22, locking the encoder position value of the absolute value encoder at present, and acquiring the encoder position data; and S23, calculating the CRC value according to the encoder position data and a preset algorithm.
In an embodiment of the present invention, the step S2 further includes the steps of: the encoder position command is sent completely in each data transmission.
In an embodiment of the present invention, the step S2 further includes the steps of: transmitting a part of the read encoder EEPROM command in each data transmission process for a plurality of times; the EEPROM data responses in the absolute value encoder and in the command response are combined into a complete read encoder EEPROM command.
In an embodiment of the present invention, the read encoder command includes a start address and a read data length of the EEPROM; the step S3 includes the steps of: and forming a complete EEPROM read data by the returned multiple response data, wherein the EEPROM read data comprises the starting address, the read data length and the read data content of the EEPROM.
In an embodiment of the present invention, the step S2 further includes the steps of: transmitting a part of the writing encoder EEPROM command in each data transmission process for a plurality of times; the EEPROM data responses in the absolute value encoder and in the command response are combined into a complete write encoder EEPROM command.
In an embodiment of the present invention, the write encoder command includes a start address, a write data length, and a write data content of the EEPROM; the step S3 further includes the steps of: and forming a complete EEPROM write data by the returned multiple response data, wherein the EEPROM write data comprises the initial address, the write data length and the write data content of the EEPROM, and the EEPROM write data and the write encoder command contain the same data.
In an embodiment of the present invention, a pair of differential lines is used as a transmission line for the transmission of the control command and the feedback of the response frame.
The invention also provides a data transmission system based on an absolute value encoder, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps of the method.
The invention also provides a computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method as described above.
The data transmission method, the data transmission system and the computer readable storage medium have the following advantages that:
the serial communication interface of the driver chip can be used for transmitting data, a decoding chip does not need to be specially designed or an FPGA is used for decoding, and the hardware cost of the driver is reduced. Because an additional decoding chip is not needed, the absolute value encoder data is directly transmitted to the driver main control chip, and the transmission delay is low; the transmission is direct, the transmission speed is high, and the maximum transmission speed can reach 10 Mbps. The EERPOM storage space of the absolute value encoder can be read and written, the information such as the motor and the encoder model can be obtained, and the interference to the transmission of position data is not generated in the process of reading and writing the EERPOM.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a block diagram illustrating a data transmission method of an absolute value encoder according to the present invention.
Fig. 2 is a schematic diagram illustrating a physical layer for data transmission according to the present invention.
Fig. 3 is a diagram illustrating an application layer data frame structure according to the present invention.
FIG. 4 is a block diagram of a read encoder position data frame structure according to the present invention.
FIG. 5 is a diagram illustrating a read EEPROM data frame structure according to the present invention.
FIG. 6 is a diagram illustrating a structure of a frame for writing EEPROM data according to the present invention.
Fig. 7 is a block diagram of a data transmission system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
As shown in fig. 1 to 6, fig. 1 is a block diagram illustrating a data transmission method of an absolute value encoder according to the present invention. Fig. 2 is a schematic diagram illustrating a physical layer for data transmission according to the present invention. Fig. 3 is a diagram illustrating an application layer data frame structure according to the present invention. FIG. 4 is a block diagram of a read encoder position data frame structure according to the present invention. FIG. 5 is a diagram illustrating a read EEPROM data frame structure according to the present invention. FIG. 6 is a diagram illustrating a structure of a frame for writing EEPROM data according to the present invention. The invention provides a data transmission method based on an absolute value encoder, which comprises the following steps:
s1, receiving a control command of data transmission sent by the driver chip; in a preferred embodiment, the step S1 includes the steps of: and receiving a read encoder position command, a read encoder EEPROM command and a write encoder EEPROM command in the control commands for multiple times.
S2, completing the command response of the control command, locking the position data of the current encoder, and calculating a CRC check value according to the position data;
s3, feeding the response frame back to the driver chip; wherein the response frame includes the control command, the command response, the location data, and the CRC check data.
In one embodiment, a pair of differential lines is used as the transmission line for the transmission of the control command and the feedback of the response frame. Generally, the physical layer uses a full-duplex RS422 protocol, and the default serial communication baud rate is 5MHz, a start bit 1bit, a stop bit 1bit, and a data bit 8 bit. As shown in fig. 2, a pair of differential transmission lines defining a transmission direction from the driver to the encoder are command transmission lines, and a pair of differential transmission lines defining a transmission direction from the encoder to the driver are data transmission lines.
In an embodiment of the present invention, the step S2 includes the steps of: s21, receiving the reading encoder position command; s22, locking the encoder position value of the absolute value encoder at present, and acquiring the encoder position data; and S23, calculating the CRC value according to the encoder position data and a preset algorithm.
Further, the step S2 further includes the steps of: the encoder position command is sent completely in each data transmission. When reading the encoder position, a control command "read encoder position" is sent by the driver chip through a command transmission line, and the data frame format is as shown in fig. 3. And after receiving the instruction, the encoder immediately latches the current encoder position value and calculates the CRC check value according to a set algorithm. The control command, command response, position data, CRC check value of the encoder are transmitted to the drive through the data transmission line in a designated format, and the data frame format is as shown in fig. 3.
Further, the step S2 further includes the steps of: transmitting a part of the read encoder EEPROM command in each data transmission process for a plurality of times; the EEPROM data responses in the absolute value encoder and in the command response are combined into a complete read encoder EEPROM command. Preferably, the read encoder command includes a start address and a read data length of the EEPROM; the step S3 includes the steps of: and forming a complete EEPROM read data by the returned multiple response data, wherein the EEPROM read data comprises the starting address, the read data length and the read data content of the EEPROM. And combining the encoder EEPROM command in the control commands in the transmission process with the EEPROM data response in the command response to obtain a complete communication frame for reading and writing the encoder EEPROM. When reading the EERPOM, the encoder EEPROM command in a plurality of control commands sent by the driver chip is combined into a data frame, and the content of the data frame comprises the starting address and the reading data length of the encoder EEPROM. And combining a plurality of EEPROM data response parts returned by the encoder into a data frame, wherein the data frame comprises the starting address of the EEPROM of the encoder, the length of the read data and the content of the read data.
Further, the step S2 further includes the steps of: transmitting a part of the writing encoder EEPROM command in each data transmission process for a plurality of times; the EEPROM data responses in the absolute value encoder and in the command response are combined into a complete write encoder EEPROM command. Preferably, the write encoder command includes a start address, a write data length, and a write data content of the EEPROM; the step S3 further includes the steps of: and forming a complete EEPROM write data by the returned multiple response data, wherein the EEPROM write data comprises the initial address, the write data length and the write data content of the EEPROM, and the EEPROM write data and the write encoder command contain the same data. The principle of acquiring the EEPROM communication frame when writing the EEPROM is the same as that when reading the EEPROM, and the description thereof is omitted. When writing the EEPROM, the data frame returned by the encoder is identical to the data frame sent by the driver, and the combined data frame is as shown in fig. 6.
The invention also provides a data transmission system based on the absolute value encoder, which is realized by adopting the data transmission method based on the absolute value encoder.
Fig. 7 is a block diagram of a data transmission system according to an embodiment of the present invention. As shown in fig. 7, the terminal device of this embodiment includes: a processor, a memory, and a computer program, such as a software development program, stored in the memory and executable on the processor. The processor implements the steps in the above-described respective software development method embodiments when executing the computer program. Alternatively, the processor implements the functions of the modules/units in the above device embodiments when executing the computer program.
The data transmission method, the data transmission system and the computer readable storage medium provided by the invention can use the serial communication interface of the driver chip to transmit data, and a decoding chip does not need to be specially designed or an FPGA (field programmable gate array) is used for decoding, so that the hardware cost of the driver is reduced. Because an additional decoding chip is not needed, the absolute value encoder data is directly transmitted to the driver main control chip, and the transmission delay is low; the transmission is direct, the transmission speed is high, and the maximum transmission speed can reach 10 Mbps. The EERPOM storage space of the absolute value encoder can be read and written, the information such as the motor and the encoder model can be obtained, and the interference to the transmission of position data is not generated in the process of reading and writing the EERPOM.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered as the technical solutions and the inventive concepts of the present invention within the technical scope of the present invention.

Claims (10)

1. A data transmission method based on an absolute value encoder, comprising the steps of:
s1, receiving a control command of data transmission sent by the driver chip;
s2, completing the command response of the control command, locking the position data of the current encoder, and calculating a CRC check value according to the position data;
s3, feeding back the response frame to the driver chip; wherein the response frame includes the control command, the command response, the position data, and the CRC check data.
2. The absolute value encoder based data transmission method according to claim 1, wherein the step S1 includes the steps of:
and receiving a read encoder position command, a read encoder EEPROM command and a write encoder EEPROM command in the control commands for multiple times.
3. The absolute value encoder based data transmission method according to claim 2, wherein the step S2 includes the steps of:
s21, receiving the reading encoder position command;
s22, locking the encoder position value of the absolute value encoder at present, and acquiring the encoder position data;
and S23, calculating the CRC value according to the encoder position data and a preset algorithm.
4. The absolute value encoder based data transmission method according to claim 2, wherein the step S2 further comprises the steps of:
the encoder position command is sent completely in each data transmission.
5. The absolute value encoder based data transmission method according to claim 2, wherein the step S2 further comprises the steps of:
transmitting a part of the read encoder EEPROM command in each data transmission process for a plurality of times;
the EEPROM data responses in the absolute value encoder and in the command response are combined into a complete read encoder EEPROM command.
6. The absolute value encoder based data transmission method of claim 5, wherein the read encoder command includes a start address of an EEPROM and a read data length;
the step S3 includes the steps of:
and forming a complete EEPROM read data by the returned multiple response data, wherein the EEPROM read data comprises the starting address, the read data length and the read data content of the EEPROM.
7. The absolute value encoder based data transmission method according to claim 2, wherein the step S2 further comprises the steps of:
transmitting a part of the writing encoder EEPROM command in each data transmission process for a plurality of times;
the EEPROM data responses in the absolute value encoder and in the command response are combined into a complete write encoder EEPROM command.
8. The absolute value encoder based data transmission method of claim 7, wherein the write encoder command includes a start address, a write data length, and a write data content of the EEPROM;
the step S3 further includes the steps of:
and forming a complete EEPROM write data by the returned multiple response data, wherein the EEPROM write data comprises the initial address, the write data length and the write data content of the EEPROM, and the EEPROM write data and the write encoder command contain the same data.
9. An absolute value encoder based data transmission system comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements the steps of the method according to any of claims 1 to 8 when executing said computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of a method according to any one of claims 1 to 8.
CN202011428685.1A 2020-12-07 2020-12-07 Data transmission method, system and computer readable storage medium Pending CN114593755A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011428685.1A CN114593755A (en) 2020-12-07 2020-12-07 Data transmission method, system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011428685.1A CN114593755A (en) 2020-12-07 2020-12-07 Data transmission method, system and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114593755A true CN114593755A (en) 2022-06-07

Family

ID=81802266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011428685.1A Pending CN114593755A (en) 2020-12-07 2020-12-07 Data transmission method, system and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114593755A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744351A (en) * 2014-01-09 2014-04-23 广州数控设备有限公司 Communication method of absolute type encoder
CN108646617A (en) * 2018-04-26 2018-10-12 浙江大学 A kind of absolute encoder angle reading circuit and method based on FPGA

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744351A (en) * 2014-01-09 2014-04-23 广州数控设备有限公司 Communication method of absolute type encoder
CN108646617A (en) * 2018-04-26 2018-10-12 浙江大学 A kind of absolute encoder angle reading circuit and method based on FPGA

Similar Documents

Publication Publication Date Title
US10833805B2 (en) BISS protocol data decoding method and interface system
US10948710B2 (en) Laser scanning device and laser scanning system
CN102170326B (en) Serial communication method of position measuring equipment and device thereof
CN101276219A (en) Motor control system
CN103765760A (en) Integrated servo system, motor system, and motor control method
US11366444B2 (en) PLC device and control device
CN104570944A (en) Numerical control device acquiring alarm information from connected io unit
US10069641B2 (en) Method for operating a communication network and communication network
US20110004817A1 (en) Crc management method performed in sata interface and data storage device using crc management method
CN114593755A (en) Data transmission method, system and computer readable storage medium
CN102915209A (en) Storage control chip, storage equipment and system data writing method
CN110557080A (en) Servo motor control method and device and computer readable medium
CN107942839B (en) Pulse output card
CN102402200A (en) Servo control system
CN104238420A (en) Servosystem high-speed data interactive communication unit based on USB
JP7514860B2 (en) Method for communication within a machine tool system and communication system therefor - Patents.com
CN103317513A (en) Networked robot control system based on CPUs
US20180254854A1 (en) Communications system and communication method for communications system
CN210867555U (en) Control equipment and control system of servo motor
CN107053169B (en) Bus type intelligent servo driving system, robot and method
US8554966B2 (en) Method for data exchange
CN103092127A (en) Method for machine tool to return reference point and control device
CN208299796U (en) The device of data communication is carried using Sensor output
CN111796569A (en) Method and device for communication between machine tool and external equipment and industrial personal computer
CN111819039A (en) Robot control method, device and readable 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

Application publication date: 20220607

RJ01 Rejection of invention patent application after publication