Encoder protocol multiplexing circuit, communication method, and servo driver
By setting up a gating circuit and detection channel in the servo driver, the data channel of the encoder protocol is automatically identified and activated, solving the cost and size issues of supporting multiple encoder protocols in the servo driver, and realizing automatic identification and compatibility of encoder protocols.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU GAOCHUANG MOTION CONTROL TECHNOLOGY CO LTD
- Filing Date
- 2024-05-29
- Publication Date
- 2026-07-07
Smart Images

Figure CN121050299B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of servo motor control technology, and in particular to an encoder protocol multiplexing circuit, communication method and servo driver. Background Technology
[0002] With the rapid development of science and technology and the continuous improvement of industrial demands, servo drives are widely used in CNC machining, industrial production, robotics, and other fields. Servo drives use encoders to provide real-time feedback on the motor's position, thus enabling closed-loop control of the servo drive and precise control of its movements.
[0003] Currently, servo drive encoders have different communication interface protocols, such as the common incremental ABZ encoder protocol and the absolute BISS-C protocol. Usually, a servo drive's encoding interface can only support encoders with a single protocol. If multiple encoder protocols are to be supported, corresponding interfaces and circuits need to be added, or an additional servo drive needs to be added to support different encoder protocols. These solutions all increase the cost and size of the drive, which is not conducive to practical applications. Summary of the Invention
[0004] This application provides an encoder protocol multiplexing circuit, a communication method, and a servo driver, which can automatically select the data channel according to the identified encoder protocol without the need for manual setting of the encoder protocol.
[0005] In a first aspect, embodiments of this application provide an encoder protocol multiplexing circuit, including an encoder interface and a signal processor, the encoder protocol multiplexing circuit further including:
[0006] The gating circuit includes N data channels, one end of which is connected to the encoder interface and the other end is connected to the data pin of the signal processor. The data channel also includes a gating port, which is connected to the enable pin of the signal processor to receive a gating signal. N is an integer greater than or equal to 2.
[0007] The detection circuit includes N detection channels, each of which is connected to a data channel in a one-to-one correspondence, to send a level signal to the detection pin of the signal processor. The level of the signal corresponds to the presence or absence of a line connection on the data channel.
[0008] The signal processor is used to identify the current encoder protocol based on the level signals of the N detection channels, and output strobe signals to the data channels required by the current encoder protocol.
[0009] In some embodiments, the data channel includes a transceiver control chip, wherein the transmit pin of the transceiver control chip is connected to the data receive pin of the signal processor, the receive pin of the transceiver control chip is connected to the data transmit pin of the signal processor, and the gating pin of the transceiver control chip is connected to the gating port, for controlling the transceiver control chip to enter a transmit state or a receive state according to the gating signal received by the gating pin.
[0010] In some embodiments, the data channel further includes a level conversion chip, the input of which is connected to the transmit pin of the transceiver control chip, and the output of which is connected to the data receive pin of the signal processor.
[0011] In some embodiments, the data channel transmits data via differential signal lines; the detection channel includes a comparator circuit, the two detection terminals of the comparator circuit are respectively connected to the differential signal lines of the data channel, and the output terminal of the comparator circuit is connected to the detection pin of the signal processor to output the level signal according to the signals from the two detection terminals.
[0012] In some embodiments, the comparator circuit further includes a comparator and a rectifier module, the two detection terminals are connected to the input terminals of the rectifier module, the positive output terminal of the rectifier module is connected to the non-inverting input terminal of the comparator, the negative output terminal of the rectifier module is connected to the inverting input terminal of the comparator, and the output terminal of the comparator is connected to the detection pin of the signal processor.
[0013] In some embodiments, the comparator circuit further includes a voltage bias module, which includes a first impedance element, a second impedance element, and a third impedance element connected in series from a high potential to a low potential. The connection point of the first impedance element and the second impedance element is connected to the inverting input terminal of the comparator, and the connection point of the second impedance element and the third impedance element is connected to the non-inverting input terminal of the comparator.
[0014] In some embodiments, the encoder protocol multiplexing circuit further includes a signal filtering circuit, which includes N filtering channels, each of which is connected to a data channel in a one-to-one correspondence, to filter the signal input to the data channel from the encoder interface.
[0015] In some embodiments, the detection channel is connected to the connection line between the filter circuit and the data channel.
[0016] Secondly, embodiments of this application also provide a communication method applied to the encoder protocol multiplexing circuit as described in the first aspect, the communication method comprising:
[0017] The current encoder protocol is identified based on the level signals of the N detection channels;
[0018] Output a strobe signal to the data channel required by the current encoder protocol.
[0019] In some embodiments, the gating circuit includes three data channels, namely a first data channel, a second data channel, and a third data channel; the step of identifying the current encoder protocol based on the level signals of the N detection channels includes:
[0020] If all three detection channels corresponding to the first data channel, the second data channel, and the third data channel output a high level, then the current encoder protocol is identified as the first protocol.
[0021] If both detection channels corresponding to the first data channel and the second data channel output a high level, then the current encoder protocol is identified as the second protocol.
[0022] If the detection channel corresponding to the third data channel outputs a high level, then the current encoder protocol is identified as the third protocol.
[0023] In some embodiments, outputting a strobe signal to the data channel required by the current encoder protocol includes:
[0024] If the current encoder protocol is identified as the first protocol, the strobe signal is sent to the first data channel, the second data channel, and the third data channel to open the first data channel, the second data channel, and the third data channel;
[0025] If the current encoder protocol is identified as the second protocol, the strobe signal is sent to the first data channel and the second data channel to open the first data channel and the second data channel;
[0026] If the current encoder protocol is identified as the third protocol, the strobe signal is sent to the third data channel to open the third data channel.
[0027] Thirdly, embodiments of this application provide a servo driver, including at least one processor and a memory for communicatively connecting to the at least one processor; the memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to perform the communication method as described in the second aspect.
[0028] The encoder protocol multiplexing circuit, communication method, and servo driver of this application embodiment have at least the following beneficial effects: A gating circuit is set between the encoder interface and the signal processor. The gating circuit sets multiple data channels to be compatible with the data channel usage requirements of different types of encoder protocols. In order to identify which protocol the encoder connected to the encoder interface uses, the detection circuit sets multiple detection channels connected to the corresponding data channels. The detection channels are used to detect whether these data channels have line connections, thereby outputting corresponding level signals to the signal processor. The signal processor can know which data channels have data based on these level signals, thereby identifying the currently used encoder protocol, determining which data channels the encoder protocol uses, and then sending gating signals to the corresponding data channels to open the data channels to be used by the currently used encoder protocol. Therefore, this application embodiment, through the cooperation of the detection circuit and the gating circuit, uses the level signals of different data channels to identify the encoder protocol, thereby opening the data channels of the encoder protocol. This achieves automatic identification of the encoder protocol without the need for manual setting of the encoder protocol, and can reuse the data channels of the gating circuit to be compatible with different encoder protocols. Therefore, no additional interface or servo driver is needed, saving the cost and size of the driver.
[0029] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description and the accompanying drawings. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of the encoder protocol multiplexing circuit provided in an embodiment of this application;
[0031] Figure 2 A circuit diagram of the encoder interface provided in an embodiment of this application;
[0032] Figure 3 A circuit diagram of the gating circuit provided in an embodiment of this application;
[0033] Figure 4 A circuit diagram of the detection circuit provided in the embodiments of this application;
[0034] Figure 5 A circuit diagram of the signal filtering circuit provided in an embodiment of this application;
[0035] Figure 6 This is a flowchart of a communication method provided in one embodiment of this application;
[0036] Figure 7This is a flowchart illustrating the identification of the current encoder protocol provided in one embodiment of this application;
[0037] Figure 8 This is a flowchart illustrating the output of a strobe signal to the data channel required by the current encoder protocol, provided in one embodiment of this application.
[0038] Figure 9 This is a schematic diagram of the structure of a servo driver provided in one embodiment of this application. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various implementations. Simultaneously, the steps or actions described in the method description can be rearranged or adjusted in a manner readily apparent to those skilled in the art. Therefore, the various orders in the specification and drawings are merely for the clear description of a particular embodiment and do not imply a mandatory order, unless otherwise stated that a particular order must be followed.
[0040] In the description of this application, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0041] The serial numbers assigned to components in this document, such as "first" and "second," are used only to distinguish the described objects and have no sequential or technical meaning. The terms "connection" and "linkage" used in this application, unless otherwise specified, include both direct and indirect connections (linkages).
[0042] With the rapid development of science and technology and the continuous improvement of industrial demands, servo drives are widely used in CNC machining, industrial production, robotics, and other fields. Servo drives use encoders to provide real-time feedback on the motor's position, thus enabling closed-loop control of the servo drive and precise control of its movements.
[0043] Currently, servo drive encoders have different communication interface protocols, such as the common incremental ABZ encoder protocol and the absolute BISS-C protocol. Usually, a servo drive's encoding interface can only support encoders with a single protocol. If multiple encoder protocols are to be supported, corresponding interfaces and circuits need to be added, or an additional servo drive needs to be added to support different encoder protocols. These solutions all increase the cost and size of the drive, which is not conducive to practical applications.
[0044] Based on this, this application provides an encoder protocol multiplexing circuit, a communication method, and a servo driver. A gating circuit is set between the encoder interface and the signal processor. This gating circuit has multiple data channels to accommodate the data channel usage requirements of different encoder protocols. To identify which protocol the encoder connected to the encoder interface uses, a detection circuit has multiple detection channels connected to the corresponding data channels. These detection channels detect whether there is data on these data channels, thereby outputting corresponding level signals to the signal processor. The signal processor, based on these level signals, can determine which data channels have data, thus identifying the currently used encoder protocol, determining which data channels the encoder protocol uses, and then sending gating signals to the corresponding data channels to activate the data channels required by the currently used encoder protocol. Therefore, this application, through the cooperation of the detection circuit and the gating circuit, uses the level signals of different data channels to identify the encoder protocol and then activates the data channels of that encoder protocol. This achieves automatic encoder protocol identification without manual setting of the encoder protocol. Furthermore, the data channels of the gating circuit can be reused to accommodate different encoder protocols, thus eliminating the need for additional interfaces or servo drivers, saving on driver cost and size.
[0045] The encoder protocol multiplexing circuit, communication method, and servo driver are described below with reference to the accompanying drawings.
[0046] Reference Figure 1-2 As shown, Figure 1 This is a schematic diagram of the encoder protocol multiplexing circuit provided in an embodiment of this application.
[0047] Figure 2 This is a circuit diagram of the encoder interface 100 provided in an embodiment of this application.
[0048] In some embodiments, the encoder protocol multiplexing circuit includes an encoder interface 100, a signal processor 200, a gating circuit 300, and a detection circuit 400.
[0049] It should be noted that the encoder interface 100 includes N sets of differential signals. Figure 2 The following diagram illustrates the use of three sets of differential signals as an example: Figure 2The encoder interface 100 includes A+ / CLK+ and A- / CLK-, B+ / DATA+ and B- / DATA-, and Z+ and Z-. Each differential signal group conforms to the RS485 / RS422 protocol. The encoder interface 100 also includes a transient voltage suppression diode D11 for the encoder power supply, thereby increasing electrostatic discharge protection.
[0050] Reference Figure 3 As shown, Figure 3 This is a circuit diagram of the gating circuit 300 provided in an embodiment of this application.
[0051] In some embodiments, the gating circuit 300 includes N data channels 310, one end of which is connected to the encoder interface 100 and the other end is connected to the data pin of the signal processor 200. The data channel 310 also includes a gating port, which is connected to the enable pin of the signal processor 200 to receive a gating signal. This allows the data channel 310 required by the currently used encoder protocol to be opened according to the gating signal, thereby enabling the data channel 310 corresponding to the encoder protocol to be opened.
[0052] It is worth noting that N in this application embodiment is an integer greater than or equal to 2, that is, the gating circuit 300 includes at least two data channels 310, so that different encoder protocols can be compatible by multiplexing the data channels 310. This application embodiment takes N as 3 as an example for specific description, that is, the encoder protocol multiplexing circuit includes three data channels 310, three detection channels and three filtering channels.
[0053] In some embodiments, the data channel 310 includes a transceiver control chip ( Figure 3 The transceiver control chip (U2, U4, and U6) has its transmit pins connected to the data receive pins of the signal processor 200 to send signals corresponding to the current encoder protocol to the signal processor 200. The receive pins of the transceiver control chip are connected to the data transmit pins of the signal processor 200, so that they can receive the gating signals sent by the signal processor 200. The gating pins of the transceiver control chip are connected to the gating port, which are used to control the transceiver control chip to enter the transmit or receive state according to the gating signals received by the gating pins, thereby realizing the switching of the state of the transceiver control chip.
[0054] Understandably, the transceiver control chip can enter different states based on the high or low level of the strobe signal. For example, when the strobe signal is low, the transceiver control chip is in receive mode; when the strobe signal is high, the transceiver control chip is in transmit mode. When the transceiver control chip is in transmit mode, it can send signals to the signal processor 200 through the transmit pin; when the transceiver control chip is in receive mode, it can receive the strobe signal sent by the signal processor 200 through the receive pin, thus entering different states.
[0055] In some embodiments, the data channel 310 further includes a level conversion chip ( Figure 3 The input terminals of the level conversion chip (U1, U3, and U5) are connected to the transmit pins of the transceiver control chip, and the output terminals of the level conversion chip are connected to the data receive pins of the signal processor 200. This enables the conversion of a signal at one voltage level to a signal at another voltage level, ensuring the correct transmission of signals between circuits at different voltage levels and improving the reliability of the encoder protocol multiplexing circuit.
[0056] It should be noted that the level conversion chip in this application embodiment can be a signal level conversion level-shifter chip or a buffer chip.
[0057] Reference Figure 4 As shown, Figure 4 This is a circuit diagram of the detection circuit 400 provided in an embodiment of this application.
[0058] In some embodiments, the detection circuit 400 includes N detection channels, that is, the number of detection channels is the same as the number of data channels 310, and the detection channels are connected one-to-one with the data channels 310 to send level signals to the detection pins of the signal processor 200. The high or low level of the level signal corresponds to the presence or absence of line links on the data channel 310, so that the signal processor 200 can determine whether there are line links on the corresponding data channel 310 according to the specific situation of the level signal, and thus be able to identify the encoder protocol currently being used. For example, when the level signal is high, there are line links on the data channel 310; when the level signal is low, there are no line links on the data channel 310.
[0059] Understandable, Figure 4 Taking one detection channel of the detection circuit 400 as an example for demonstration, the other detection channels are the same as... Figure 4 The circuit shown is the same, and will not be shown in detail in this application.
[0060] In some embodiments, data channel 310 transmits data via differential signal lines. The number of differential signal lines is the same as the number of data channels 310. Unlike the traditional approach of one signal line and one ground line, differential transmission transmits signals on both lines of the differential signal line. These two signals have the same amplitude but opposite phase; the signals transmitted on these two lines are the differential signals. The detection channel includes a comparator circuit. The two detection terminals of the comparator circuit are respectively connected to the differential signal lines of data channel 310, facilitating subsequent comparison of the voltage difference between the two differential signal lines of data channel 310 to determine the encoder's state. The output terminal of the comparator circuit is connected to the detection pin of the signal processor 200 to output a level signal based on the signals from the two detection terminals, enabling real-time detection of data channel 310 and accurately detecting whether data is present in data channel 310.
[0061] In some embodiments, the comparator circuit further includes a comparator 410 and a rectifier module 420. Two detection terminals are connected to the input terminals of the rectifier module 420. The positive output terminal of the rectifier module 420 is connected to the non-inverting input terminal of the comparator 410, and the negative output terminal of the rectifier module 420 is connected to the inverting input terminal of the comparator 410. This allows the rectifier module 420 to convert the input AC signal into a DC signal, ensuring that the non-inverting input terminal of the comparator 410 receives a positive signal and the inverting input terminal receives a negative signal. This facilitates the comparator 410 in detecting changes in signal polarity and allows it to ignore the influence of signal polarity. The output terminal of the comparator 410 is connected to the detection pin of the signal processor 200, thereby amplifying the rectified signal to meet the requirements of the signal processor 200.
[0062] It is worth noting that the differential signals on the differential signal lines in this embodiment conform to the RS485 or RS422 protocol, and there is a voltage difference between the differential signals on the differential signal lines. Therefore, after the rectifier module 420 performs full-bridge rectification on the signal input to the detection end in this embodiment, the influence of signal polarity can be ignored.
[0063] It should be noted that the rectifier module 420 in this embodiment includes a first rectifier bridge arm and a second rectifier bridge arm, and the detection end includes a first detection end and a second detection end. Specifically, the first rectifier bridge arm includes a first diode D1 and a second diode D2, and the second rectifier bridge arm includes a third diode D3 and a fourth diode D4. The cathode of the first diode D1 is connected to the anode of the second diode D2. The input end of the first rectifier bridge arm is connected to the first detection end, the cathode of the third diode D3 is connected to the anode of the fourth diode D4, the input end of the second rectifier bridge arm is connected to the second detection end, and the positive output end of the rectifier module 420 is connected to the non-inverting input end of the comparator 410, and the negative output end of the rectifier module 420 is connected to the inverting input end of the comparator 410.
[0064] In some embodiments, the comparator circuit further includes a voltage bias module 430, which includes a first impedance element, a second impedance element, and a third impedance element connected in series from a high potential to a low potential. The connection point of the first and second impedance elements is connected to the inverting input terminal of the comparator 410, and the connection point of the second and third impedance elements is connected to the non-inverting input terminal of the comparator 410. The first impedance element provides a pull-up bias voltage for the signal, and the third impedance element provides a pull-down bias voltage for the signal. The second impedance element provides a signal filtering function, thereby filtering out interference from noise signals, reducing fluctuations in the input signal, and providing a stable signal to the comparator 410, thereby improving the stability of the entire circuit.
[0065] It should be noted that the first impedance element, the second impedance element, and the third impedance element in the embodiments of this application can be a resistor, a capacitor, an inductor, etc. Specifically, in the embodiments of this application, the first impedance element and the third impedance element are resistors, and the second impedance element is a capacitor. Taking the first impedance element as the first resistor R1, the second impedance element as the first capacitor C1, and the third impedance element as the second resistor R2 as an example, in the embodiments of this application, one end of the first resistor R1 is connected to a constant voltage source, and the other end is connected to the first capacitor C1. One end of the second resistor R2 is connected to the first capacitor C1, and the other end is connected to ground. That is, the first capacitor C1 is placed between the first resistor R1 and the second resistor R2, so that noise can be filtered out through the first capacitor C1, thereby improving the accuracy and reliability of the comparator 410 measurement.
[0066] It is worth noting that the data channel 310 transmits data through differential signal lines, and the detection channel of the detection circuit 400 receives the signal sent by the data channel 310 through differential signal lines. The two detection terminals of the comparator circuit are respectively connected to the differential signal lines of the data channel 310, and the two detection terminals are respectively connected to the first rectifier bridge arm and the second rectifier bridge arm of the rectifier module 420. This allows the rectifier module 420 to rectify the input signal, and then filter out the interference of noise signals through the first impedance element, the second impedance element and the third impedance element connected in series. The rectified signal is then input to the comparator 410, so that the comparator 410 can output a corresponding level signal according to the high and low potential of the non-inverting input terminal and the inverting input terminal. For example, when the voltage of the non-inverting input terminal is higher than the voltage of the inverting input terminal, a high-level signal is output; when the voltage of the non-inverting input terminal is lower than the voltage of the inverting input terminal, a low-level signal is output.
[0067] In some embodiments, when the encoder is normally connected, the output voltage of the positive output terminal of the rectifier module 420 at point A is higher than the output voltage of the negative output terminal at point B. At this time, the voltage of the non-inverting input terminal of the comparator 410 is higher than the voltage of the inverting input terminal, and a high-level signal is output. When the encoder is not connected or disconnected, the rectifier module 420 has no input drive. Under the action of the first impedance element and the third impedance element in the voltage bias module 430, the output voltage of the positive output terminal of the rectifier module 420 at point A is lower than the output voltage of the negative output terminal at point B. At this time, the voltage of the non-inverting input terminal of the comparator 410 is lower than the voltage of the inverting input terminal, and a low-level signal is output. This determines that the encoder is not connected or the encoder is in a disconnected state, thus realizing real-time monitoring of the encoder connection status.
[0068] It is understood that the detection circuit 400 in this embodiment of the application is provided with multiple detection channels connected to the corresponding data channel 310, so that it can detect whether there is data in the data channel 310 connected to it through the detection channels, and can detect the access status of the encoder through the detection channels, thereby determining whether there is a situation where the encoder is not connected or the encoder is disconnected.
[0069] In some embodiments, the signal processor 200 is used to identify the current encoder protocol based on the level signals of N detection channels, and output a strobe signal to the data channel 310 required by the current encoder protocol. Specifically, the signal processor 200 can determine whether there is a line connection between the data channel 310 corresponding to the detection channel based on the level signal of the detection channel, thereby identifying the currently used encoder protocol, determining the data channel 310 required by the current encoder protocol, and outputting a strobe signal to the required data channel 310, thereby enabling the data channel 310 to be used by the current encoder protocol without manual setting of the encoder protocol.
[0070] It should be noted that the signal processor 200 in this embodiment can be an ARM (Advanced RISC Machine) processor, an FPGA (Field Programmable Gate Array) processor, a CPLD (Complex Programmable Logic Device) processor, or a DSP (Digital Signal Processor) processor. This embodiment does not impose specific limitations.
[0071] Reference Figure 5 As shown, Figure 5 This is a circuit diagram of the signal filtering circuit 500 provided in an embodiment of this application.
[0072] In some embodiments, the encoder protocol multiplexing circuit further includes a signal filtering circuit 500, which includes N filtering channels. The filtering channels are connected one-to-one with the data channels 310 to filter the signals input to the data channels 310 of the encoder interface 100, thereby improving signal quality, protecting the circuit from interference, and ensuring the stable operation of the system.
[0073] Specifically, the signal filtering circuit 500 in this embodiment includes a diode group 510, a common-mode inductor group 520, and a resistor group 530. The common-mode inductor group 520 is disposed between the diode group 510 and the resistor group 530, and the diode group 510 is disposed between the encoder output terminal and ground. Specifically, the resistor group 530 includes a terminating resistor group and a termination resistor group. The detection circuit 400 is disposed between the terminating resistor group and the termination resistor group. This embodiment uses an encoder protocol multiplexing circuit including three data channels 310, three detection channels, and three filtering channels as an example for illustration.
[0074] In the case where the encoder protocol multiplexing circuit includes three data channels 310, there are three filtering channels. Each filtering channel includes two branches: the first filtering channel includes the first and second branches, the second filtering channel includes the third and fourth branches, and the third filtering channel includes the fifth and sixth branches. The terminating resistor group includes the first terminating resistor R5, the second terminating resistor R9, and the third terminating resistor R13. The terminating resistor group includes the first terminating resistor R4, the second terminating resistor R7, the third terminating resistor R8, the fourth terminating resistor R10, the fifth terminating resistor R12, and the sixth terminating resistor R14. The diode group 510 includes the fifth diode D5, the sixth diode D6, the seventh diode D7, the eighth diode D8, the ninth diode D9, and the tenth diode D10. The common mode inductor group 520 includes the first common mode inductor L1, the second common mode inductor L2, and the third common mode inductor L3.
[0075] In some embodiments, the fifth diode D5 is disposed in the first branch of the first filter channel, the sixth diode D6 is disposed in the second branch of the first filter channel, the seventh diode D7 is disposed in the third branch of the second filter channel, the eighth diode D8 is disposed in the fourth branch of the second filter channel, the ninth diode D9 is disposed in the fifth branch of the third filter channel, the tenth diode D10 is disposed in the sixth branch of the third filter channel, the first common-mode inductor L1 is disposed in the first and second branches of the first filter channel, the second common-mode inductor L2 is disposed in the third and fourth branches of the second filter channel, and the third common-mode inductor L3 is disposed in the fifth branch of the third filter channel. The first terminating resistor R5 is connected to the first and second branches respectively, the second terminating resistor R9 is connected to the third and fourth branches respectively, the third terminating resistor R13 is connected to the fifth and sixth branches respectively, the first terminating resistor R4 is set in the first branch of the first filter channel, the second terminating resistor R7 is set in the second branch of the first filter channel, the third terminating resistor R8 is set in the third branch of the second filter channel, the fourth terminating resistor R10 is set in the fourth branch of the second filter channel, the fifth terminating resistor R12 is set in the fifth branch of the third filter channel, and the sixth terminating resistor R14 is set in the sixth branch of the third filter channel.
[0076] Specifically, the connection relationship of all components on the first filter channel is described below. The first filter channel is provided with a fifth diode D5, a sixth diode D6, a first common-mode inductor L1, a first terminating resistor R5, a first terminating resistor R4, and a second terminating resistor R7. The fifth diode D5 is set on the first branch between the output terminal of the encoder interface 100 and ground. The sixth diode D6 is set on the second branch between the output terminal of the encoder interface 100 and ground. The first common-mode inductor L1 includes a first terminal, a second terminal, a third terminal, and a fourth terminal. The first terminal is connected to the second terminal and the resistor R7. The second terminal is connected to the sixth diode D6. The third terminal is connected to the fifth diode D5. The fourth terminal is connected to the first terminating resistor R4. One end of the first terminating resistor R5 is connected between the fourth terminal and the first terminating resistor R4, and the other end is connected between the first terminal and the second terminating resistor R7.
[0077] It should be noted that the component connection relationships on the second and third filter channels in this embodiment are consistent with the component connection relationships on the first filter channel. Please refer to the description of the first filter channel. This embodiment will not repeat the details here.
[0078] It is worth noting that the diodes in the diode group 510 in this embodiment are transient voltage suppression diodes. The diode group 510 is connected to the common-mode inductor group 520, thereby enabling the transient voltage suppression diodes to absorb and suppress high-energy transient pulses generated by electrostatic discharge, protecting the encoder protocol multiplexing circuit from ESD (Electro-Static Discharge) damage. Furthermore, the common-mode inductor group 520 has high impedance to common-mode current, which helps filter out common-mode noise, thereby improving signal quality and reliability. The signal filtering circuit 500 in this embodiment can increase the electrostatic protection of the encoder protocol multiplexing circuit and avoid interference from common-mode noise.
[0079] In some embodiments, the detection channel is connected to the connection line between the filter circuit and the data channel 310, which can avoid common-mode noise interference during signal transmission and improve signal transmission quality.
[0080] It will be understood by those skilled in the art that Figure 1-5 The schematic diagrams shown do not constitute a limitation on the embodiments of this application. They may include more or fewer components than shown, or combine certain components, or have different component arrangements. The communication method in this embodiment will be described in detail below.
[0081] Reference Figure 6 As shown, Figure 6 This is a flowchart of a communication method provided in one embodiment of this application. Its applications are not limited to... Figure 1 The encoder protocol multiplexing circuit includes, but is not limited to, steps S101 to S102.
[0082] Step S101: Identify the current encoder protocol based on the level signals of the N detection channels.
[0083] In some embodiments, the detection circuit 400 includes N detection channels that correspond one-to-one with the data channels 310. In this embodiment, the detection channels are used to detect whether there is a line connection in the corresponding data channels 310. The data receiving pin of the signal processor 200 is connected to the transmitting pin of the transceiver control chip in the data channel 310. Therefore, the signal processor 200 can identify the current encoder protocol based on the level signals of the N detection channels, and thus determine whether there is a line connection in the data channel 310 based on the level signal conditions.
[0084] Step S102: Output a strobe signal to the data channel 310 required by the current encoder protocol.
[0085] In some embodiments, after identifying the current encoder protocol, it can be determined which data channels 310 have line connections, thereby identifying the currently used encoder protocol and determining which data channels 310 the encoder protocol needs to use. A strobe signal is output to the data channels 310 that the current encoder protocol needs to use, thereby opening the data channels 310 that the current encoder protocol needs to use. This realizes the automatic identification of the encoder protocol and can automatically open the corresponding data channels 310 of the encoder protocol without the need for manual setting of the encoder protocol.
[0086] Reference Figure 7 As shown, Figure 7 This is a flowchart of an embodiment of the present application for identifying the current encoder protocol, and the method includes, but is not limited to, steps S201 to S203.
[0087] It should be noted that the gating circuit 300 includes three data channels 310, namely the first data channel, the second data channel and the third data channel.
[0088] Step S201: If the three detection channels corresponding to the first data channel, the second data channel and the third data channel all output a high level, then the current encoder protocol is identified as the first protocol.
[0089] In some embodiments, if the three detection channels corresponding to the first data channel, the second data channel, and the third data channel all output a high level, it indicates that the three detection channels are all connected normally. Then, the current encoder protocol is identified as the first protocol. In this embodiment, the first protocol can be the incremental ABZ encoder protocol.
[0090] Step S202: If both detection channels corresponding to the first data channel and the second data channel output a high level, then the current encoder protocol is identified as the second protocol.
[0091] In some embodiments, if both detection channels corresponding to the first data channel and the second data channel output a high level, indicating that the two detection channels corresponding to the first data channel and the second data channel are normal, then the current encoder protocol is identified as the second protocol. In this embodiment, the second protocol can be the absolute BISS-C encoder protocol.
[0092] It should be noted that, in this embodiment, the output level of the detection channel corresponding to the third data channel is not considered. If the detection channel corresponding to the third data channel outputs a low level or no level, the encoder of the detection channel corresponding to the third data channel may be disconnected or not connected.
[0093] Step S203: If the detection channel corresponding to the third data channel outputs a high level, then the current encoder protocol is identified as the third protocol.
[0094] In some embodiments, if the detection channel corresponding to the third data channel outputs a high level, it indicates that the detection channel corresponding to the third data channel is normal, and the current encoder protocol is identified as the third protocol. In this embodiment, the third protocol can be the Tamagawa encoder protocol.
[0095] It should be noted that, in this embodiment, the output levels of the two detection channels corresponding to the first and second data channels are not considered. If the two detection channels corresponding to the first and second data channels output a low level or no level at all, for example, if both detection channels output a low level, the encoder of the two detection channels is abnormally disconnected; if the two detection channels do not output a level, the two detection channels are not connected; if the detection channel corresponding to the first data channel outputs a low level and the detection channel corresponding to the second data channel does not output a level, the encoder of the detection channel corresponding to the first data channel is abnormally disconnected and the encoder of the detection channel corresponding to the second data channel is not connected; if the detection channel corresponding to the first data channel does not output a level and the detection channel corresponding to the second data channel outputs a low level, the encoder of the detection channel corresponding to the first data channel is not connected and the encoder of the detection channel corresponding to the second data channel is abnormally disconnected.
[0096] Reference Figure 8 As shown, Figure 8 This is a flowchart of an embodiment of the present application providing a strobe signal output to the data channel 310 required by the current encoder protocol, the method including but not limited to steps S301 to S303.
[0097] Step S301: If the current encoder protocol is identified as the first protocol, send a strobe signal to the first data channel, the second data channel and the third data channel to open the first data channel, the second data channel and the third data channel.
[0098] In some embodiments, if the current encoder protocol is identified as the first protocol, taking the incremental ABZ encoder protocol as an example, a strobe signal is sent to the first data channel, the second data channel, and the third data channel. Specifically, in this embodiment, a low level is sent to the first data channel, the second data channel, and the third data channel. At this time, the transceiver control chips of the first data channel, the second data channel, and the third data channel all enter the receiving state. The signal received by the transceiver control chip is converted by the level conversion chip to obtain the quadrature ABZ signal. At this time, the signal processor 200 receives the quadrature ABZ signal to open the first data channel, the second data channel, and the third data channel.
[0099] Step S302: If the current encoder protocol is identified as the second protocol, a strobe signal is sent to the first data channel and the second data channel to open the first data channel and the second data channel.
[0100] In some embodiments, if the current encoder protocol is identified as the second protocol, taking the absolute BISS-C encoder protocol as an example, a strobe signal is sent to the first data channel and the second data channel. Specifically, in this embodiment, a high level is sent to the first data channel and a low level is sent to the second data channel. At this time, the transceiver control chip of the first data channel enters the transmitting state, and the transceiver control chip of the second data channel enters the receiving state. The transceiver control chip of the first data channel directly sends the protocol clock signal. The signal received by the transceiver control chip of the second data channel is converted by the level conversion chip and then output to the signal processor 200 to open the first data channel and the second data channel.
[0101] It should be noted that if the current encoder protocol is the absolute BISS-C encoder protocol, it is independent of the state of the third data channel. In this case, a high level or a low level can be sent to the third data channel. This application embodiment does not impose specific restrictions.
[0102] Step S303: If the current encoder protocol is identified as the third protocol, a strobe signal is sent to the third data channel to open the third data channel.
[0103] In some embodiments, if the current encoder protocol is identified as a third protocol, taking the Tamagawa encoder protocol as an example, a strobe signal is sent to the third data channel. Specifically, the strobe signal can be set according to the data transmission and reception status. For example, when the transceiver control chip of the third data channel needs to send data, a high level is sent to the third data channel, and the transceiver control chip of the third data channel directly sends a signal; when the transceiver control chip of the third data channel needs to receive data, a low level is sent to the third data channel, and the transceiver control chip of the third data channel is in the receiving state. The signal received by the transceiver control chip of the third data channel is converted by the level conversion chip and then output to the signal processor 200 to open the third data channel.
[0104] It should be noted that if the current encoder protocol is the Tamagawa encoder protocol, it is unrelated to the state of the first data channel and the second data channel. In this case, a high level or a low level can be sent to the first data channel and the second data channel. This application embodiment does not impose specific restrictions.
[0105] like Figure 9 As shown, Figure 9 This is a schematic diagram of a servo driver 1000 provided in one embodiment of this application.
[0106] The servo driver 1000 in this embodiment includes one or more processors 1001 and a memory 1002. Figure 9 The example uses a processor 1001 and a memory 1002.
[0107] Processor 1001 and memory 1002 can be connected via a bus or other means. Figure 9 Taking the example of a connection between China and Israel via a bus.
[0108] Memory 1002, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 1002 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 1002 may optionally include memory 1002 remotely located relative to processor 1001, and these remote memories can be connected to the servo drive 1000 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0109] Those skilled in the art will understand that Figure 9 The device structure shown does not constitute a limitation on the servo drive 1000 and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0110] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0111] The non-transitory software program and instructions required to implement the communication method of the air conditioning system in the above embodiments are stored in the memory and are executed by the processor to execute the above embodiments.
[0112] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network nodes. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0113] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0114] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0115] In the several embodiments provided in this application, it should be understood that the disclosed systems, instruments, and methods can be implemented in other ways. For example, the instrument embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between instruments or units may be electrical, mechanical, or other forms. Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0116] It should also be understood that the various implementation methods provided in this application can be combined arbitrarily to achieve different technical effects.
[0117] The above is a detailed description of the preferred embodiments of this application. However, this application is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. An encoder protocol multiplexing circuit, characterized in that, The encoder protocol multiplexing circuit includes an encoder interface and a signal processor, and further includes: The gating circuit includes N data channels, one end of which is connected to the encoder interface and the other end is connected to the data pin of the signal processor. The data channel also includes a gating port, which is connected to the enable pin of the signal processor to receive a gating signal. N is an integer greater than or equal to 2. The detection circuit includes N detection channels, each of which is connected to a data channel in a one-to-one correspondence, to send a level signal to the detection pin of the signal processor. The level of the signal corresponds to the presence or absence of a line connection on the data channel. The signal processor is used to identify the current encoder protocol based on the level signals of the N detection channels, and output strobe signals to the data channels required by the current encoder protocol.
2. The encoder protocol multiplexing circuit according to claim 1, characterized in that, The data channel includes a transceiver control chip. The transmit pin of the transceiver control chip is connected to the data receive pin of the signal processor, the receive pin of the transceiver control chip is connected to the data transmit pin of the signal processor, and the gating pin of the transceiver control chip is connected to the gating port. The transceiver control chip is used to control the transceiver control chip to enter the transmit state or the receive state according to the gating signal received by the gating pin.
3. The encoder protocol multiplexing circuit according to claim 2, characterized in that, The data channel also includes a level conversion chip, the input of which is connected to the transmit pin of the transceiver control chip, and the output of which is connected to the data receive pin of the signal processor.
4. The encoder protocol multiplexing circuit according to claim 1, characterized in that, The data channel transmits data via differential signal lines; the detection channel includes a comparator circuit, with two detection terminals of the comparator circuit respectively connected to the differential signal lines of the data channel, and the output terminal of the comparator circuit connected to the detection pin of the signal processor to output the level signal based on the signals from the two detection terminals.
5. The encoder protocol multiplexing circuit according to claim 4, characterized in that, The comparator circuit further includes a comparator and a rectifier module. The two detection terminals are connected to the input terminals of the rectifier module. The positive output terminal of the rectifier module is connected to the non-inverting input terminal of the comparator. The negative output terminal of the rectifier module is connected to the inverting input terminal of the comparator. The output terminal of the comparator is connected to the detection pin of the signal processor.
6. The encoder protocol multiplexing circuit according to claim 5, characterized in that, The comparator circuit further includes a voltage bias module, which includes a first impedance element, a second impedance element, and a third impedance element connected in series from high potential to low potential. The connection point of the first impedance element and the second impedance element is connected to the inverting input terminal of the comparator, and the connection point of the second impedance element and the third impedance element is connected to the non-inverting input terminal of the comparator.
7. The encoder protocol multiplexing circuit according to claim 1, characterized in that, The encoder protocol multiplexing circuit further includes a signal filtering circuit, which includes N filtering channels. Each filtering channel is connected to a corresponding data channel to filter the signal input to the data channel from the encoder interface.
8. The encoder protocol multiplexing circuit according to claim 7, characterized in that, The detection channel is connected to the connection line between the filter circuit and the data channel.
9. A communication method, characterized in that, The communication method, applied to the encoder protocol multiplexing circuit as described in any one of claims 1 to 8, comprises: The current encoder protocol is identified based on the level signals of the N detection channels; Output a strobe signal to the data channel required by the current encoder protocol.
10. The communication method according to claim 9, characterized in that, The gating circuit includes three data channels, namely a first data channel, a second data channel, and a third data channel; the step of identifying the current encoder protocol based on the level signals of the N detection channels includes: If all three detection channels corresponding to the first data channel, the second data channel, and the third data channel output a high level, then the current encoder protocol is identified as the first protocol. If both detection channels corresponding to the first data channel and the second data channel output a high level, then the current encoder protocol is identified as the second protocol. If the detection channel corresponding to the third data channel outputs a high level, then the current encoder protocol is identified as the third protocol.
11. The communication method according to claim 10, characterized in that, The step of outputting a strobe signal to the data channel required by the current encoder protocol includes: If the current encoder protocol is identified as the first protocol, the strobe signal is sent to the first data channel, the second data channel, and the third data channel to open the first data channel, the second data channel, and the third data channel; If the current encoder protocol is identified as the second protocol, the strobe signal is sent to the first data channel and the second data channel to open the first data channel and the second data channel; If the current encoder protocol is identified as the third protocol, the strobe signal is sent to the third data channel to open the third data channel.
12. A servo driver, characterized in that, It includes at least one processor and a memory for communicatively connecting to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the communication method as described in any one of claims 9 to 11.