[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN117309014A - Method for synchronously collecting photoelectric encoders based on turntable multi-channel - Google Patents

Method for synchronously collecting photoelectric encoders based on turntable multi-channel Download PDF

Info

Publication number
CN117309014A
CN117309014A CN202311176695.4A CN202311176695A CN117309014A CN 117309014 A CN117309014 A CN 117309014A CN 202311176695 A CN202311176695 A CN 202311176695A CN 117309014 A CN117309014 A CN 117309014A
Authority
CN
China
Prior art keywords
signals
modules
turntable
counting
duration
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
CN202311176695.4A
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.)
Henan Costar Group Co Ltd
Original Assignee
Henan Costar Group 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 Henan Costar Group Co Ltd filed Critical Henan Costar Group Co Ltd
Priority to CN202311176695.4A priority Critical patent/CN117309014A/en
Publication of CN117309014A publication Critical patent/CN117309014A/en
Pending legal-status Critical Current

Links

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/26Mechanical 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 characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light
    • G01D5/32Mechanical 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 characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light
    • G01D5/34Mechanical 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 characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light the beams of light being detected by photocells
    • G01D5/36Forming the light into pulses

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Optical Transform (AREA)

Abstract

The invention relates to the technical field of information acquisition of photoelectric encoders, and discloses a method for synchronously acquiring photoelectric encoders based on multiple paths of rotary tables, which is characterized in that two IO signals A ', B' simulate orthogonal encoding signals to transmit, IO default level is configured or IO default state is configured through a pull-up/pull-down resistor, one module is taken as a leading mode (generally a rotary table control unit) to acquire orthogonal encoding signals in real time and generate A ', B' analog signals to transmit to other modules, and the transmission time sequence comprises the following steps: and (3) powering up the system for initialization, returning the position of the turntable to an absolute zero position, simultaneously generating pulse signals with duration time T1 by A ', B', and simultaneously clearing the counts of all modules. The invention simulates the photoelectric encoder transmission signals through two IO ports and has absolute position calibration, so that the counting starting points of all modules are ensured to be the same, a certain delay is caused when the modules are input into and output from the modules, and the synchronous signals can inform the modules in advance to latch the pulse signal quantity value at a certain moment so as to ensure that the information output by processing is correct.

Description

Method for synchronously collecting photoelectric encoders based on turntable multi-channel
Technical Field
The invention relates to the technical field of information acquisition of photoelectric encoders, in particular to a method for synchronously acquiring photoelectric encoders based on multiple paths of turntable types.
Background
The photoelectric encoder converts the displacement of the motor into pulse or digital quantity through photoelectric conversion, and determines the rotation direction and displacement of the motor through the quadrature signals output by two phases. When the Z signal (zero crossing signal) is not used, the general photoelectric encoder comprises 2 (A, B two phases) output signal lines, while the differential encoder comprises 4 (A+, A-, B+, B-) signal lines, and the differential signal needs to be converted into a single-ended signal for collection by corresponding circuit conversion. The two phases of the orthogonal code signal A, B are always 90 degrees different, the rotation direction is judged through the advance and the retard of A relative to B, and the speed and the displacement are measured through the pulse signal number of the two phases.
In some large and medium-sized turntable products with more functions, circuit modules with different functions are often installed at the bottom, two sides and the middle part of the turntable products, generally, the products only need corresponding photoelectric encoders in the horizontal and vertical directions and are provided with corresponding acquisition and control circuits for controlling the functions of rotation, stop, scanning and the like of the products, the circuit modules with different functions are often installed in different turntable parts, the circuit modules cannot be directly connected, the connection between the circuit modules needs to be performed through a special device such as a conductive slip ring, many products use differential encoders, 4 pairs (8 signal lines) of devices such as the conductive slip ring are required to enter the horizontal and vertical directions of the products, a large number of ports are occupied, in addition, orthogonal signals output by the photoelectric encoders can only be used for recording the rotation direction and rotation displacement of the products, calibration signals and synchronous signals are not required for the simultaneous acquisition of a plurality of modules, the processing delay time of the functional modules is different, and the count values of the photoelectric encoders acquired by the modules are different in the turntable rotation process when the synchronous signals are not needed, so that the deviation of some information is caused, and the speed of the turntable is influenced.
Disclosure of Invention
Aiming at the problems, the invention aims to provide a method for synchronously collecting photoelectric encoders based on multiple paths of turntable types, which can realize that the counting start points of all modules are the same, and although a certain delay exists between the input and the output of some modules, a synchronous signal can inform the modules in advance to latch the number of pulse signals at a certain moment so as to ensure that the information of processing and output is correct.
In order to solve the technical scheme, the invention adopts the following technical scheme: a method for synchronously collecting photoelectric encoder based on turntable multipath includes such steps as transmitting analog orthogonal code signals by two IO signals A ', B', configuring IO default level or configuring IO default state by pull-up/pull-down resistor, taking one module as master (generally turntable control unit), real-time collecting orthogonal code signals and generating analog signals A ', B' for transmitting to other modules, and the transmission time sequence includes the following steps:
s1, powering up and initializing a system, returning the position of a turntable to an absolute zero position, simultaneously generating pulse signals with duration time of T1 by A ', B', and simultaneously clearing the counts of all modules; or the position of the turntable is unchanged, the absolute position of the encoder is informed to other modules in other modes, and the absolute position is used as a relative zero position, so that the counting starting points of all the modules are the same;
s2, A ', B' simultaneously generate a first double pulse signal with duration of T1 as a reference point for alignment, and then the double pulse signals of A ', B' are used for other modules to latch the current code disc value for other processing and are used as synchronous signals;
s3, two signals A ', B', one for up-counting and one for down-counting, wherein when the turntable rotates forwards as shown in FIG. 1a, A 'generates a high pulse signal with the duration of T2, and B' keeps low level and counts up; when the turntable rotates reversely, B 'generates a high pulse signal with the duration of T2, A' keeps low level and counts downwards;
s4, for an N-bit encoder, using an N-frequency multiplication acquisition mode, the maximum speed of the turntable rotates for one circle for S (unit seconds), and the maximum output frequency of the turntable encoder is T= (N is 2) n ) The frequency T ' of the signals of the modules A ', B ' is required to be greater than T, so as to ensure that no down-counting pulse is generated during up-counting or no up-counting pulse is generated during down-counting, and the duration T2 is less than S/(N2) n ) The continuous clock number m=t2×t 'of T2 at the frequency T', and selecting a proper m value to eliminate the possible glitch phenomenon in the signal transmission process of a ', B', wherein m is at least greater than 1;
s5, when the synchronous signal is sent out, the up or down counting pulse is generated, and the up or down counting times are not missed, so that the duration time T2 is required to be longer than T1; as can be seen from step S4, the duration of T2-T1 is greater than 1, and the duration of T2+T1 is less than S/(N.times.2) n )。
Further, in the steps S4 and S5, the selection of the sampling frequency T ' of the signals A ' and B ' is more than twice the maximum output frequency T of the rotary table encoder, so that the accuracy of the acquired data is ensured; t1 lasts at least 2 clock counts, T2 lasts at least 4 clock counts, and interference in the transmission process is reduced.
In actual use, the acquisition frequencies of the signals A and B' in different circuit modules can be different, the sampling frequencies are selected according to the actual conditions of the turntable, and the duration time of the T1 and the T2 is determined, so that synchronous transmission can be performed by the method.
The beneficial effects of the invention are as follows: the invention simulates the photoelectric encoder transmission signals through two IO ports and has absolute position calibration, so that the counting starting points of all modules are ensured to be the same, a certain delay is caused when the modules are input into and output from the modules, and the synchronous signals can inform the modules in advance to latch the pulse signal quantity value at a certain moment so as to ensure that the information output by processing is correct. The method has the advantages of simple time sequence, easy realization and convenient engineering application.
Drawings
The invention will be further described with reference to the drawings and examples.
Fig. 1 is a timing diagram of four embodiments of the present invention.
FIG. 2 is a schematic diagram showing the coincidence of the count up/down pulse and the synchronous signal pulse in the transmission timing according to the present invention.
Fig. 3 is a schematic diagram of an embodiment verification device of the present invention.
Fig. 4 is a schematic diagram of an embodiment of the present invention as verified online by fig. 3.
Detailed description of the preferred embodiments
Referring to fig. 1 and 2, four embodiments of the present invention disclose a method for synchronously collecting photoelectric encoders based on multiple paths of turntable, which is implemented by transmitting analog orthogonal encoding signals of two IO signals a ', B', configuring an IO default level or configuring an IO default state through a pull-up/pull-down resistor, taking one module as a master (generally, using a turntable control unit), collecting the orthogonal encoding signals in real time and generating analog signals a ', B' to transmit to other modules, wherein the transmission timing is as shown in fig. 1, and the description of fig. 1a is as follows:
s1, powering up and initializing a system, returning the position of the turntable to an absolute zero position, simultaneously generating pulse signals with duration time T1 by A ', B', and simultaneously clearing the counts of all modules. Or the position of the turntable is unchanged, the absolute position of the encoder is informed to other modules in other modes, and the absolute position is used as a relative zero position, so that the counting starting points of all the modules are the same;
s2, A ', B' simultaneously generate a first double pulse signal with duration of T1 as a reference point for alignment, and then the double pulse signals of A ', B' are used for other modules to latch the current code disc value for other processing and are used as synchronous signals;
s3, two signals A ', B', one for up-counting and one for down-counting, wherein when the turntable rotates forwards as shown in FIG. 1a, A 'generates a high pulse signal with the duration of T2, and B' keeps low level and counts up; when the turntable rotates reversely, B 'generates a high pulse signal with the duration of T2, A' keeps low level and counts downwards;
s4, for an N-bit encoder, an N-frequency multiplication acquisition mode is used, the turntable rotates for one circle at the maximum speed for S (unit second), the maximum output frequency of the turntable encoder is T= (N x 2N)/S, the frequency T ' of each module for acquiring A ', B ' signals needs to be larger than T, in order to ensure that downward counting pulses are not generated when upward counting or downward counting pulses are not generated when downward counting is performed, the duration T2 is smaller than S/(N x 2N), the continuous clock number m of T2 at the frequency T ' is m=T2 x T ', and a proper m value is selected to eliminate possible burr phenomena in the signal transmission process of the A ', B ', and m is at least larger than 1;
s5, when the up or down count is performed, there may be a synchronous signal generated at the same time, or when the synchronous signal is sent out, there may be an up or down count pulse, as shown in FIG. 2, and in order to ensure that the up/down count number is not missed when the synchronous signal pulse is coincident with the up/down count pulse, the duration T2 must be greater than T1. As shown in step S4, the number of clocks for T2-T1 should be greater than 1, and the duration of t2+t1 is less than S/(n×2n) in the 1 st and 5 th overlapping modes;
s6, selecting proper A ', B' signal sampling frequency T 'by the steps S4 and S5, wherein in order to ensure the accuracy of acquired data, the general T' is more than twice the maximum output frequency T of the rotary table encoder; t1 lasts at least 2 clock counts, T2 lasts at least 4 clock counts, and interference in the transmission process is reduced. The acquisition frequencies of the signals A 'and B' in different circuit modules can be different, the sampling frequency is selected according to the actual condition of the turntable, and the duration time of the T1 and the T2 is determined, so that synchronous transmission can be performed through the invention.
As shown in fig. 3, the servo control module collects the signals of the photoelectric encoder, generates signals of the method a 'and B', sends the signals to the image processing module through two IO ports, and decodes the signals of the method a 'and B', so as to verify the collection effect of the method. In this embodiment, a 16-bit photoelectric encoder is used, the acquisition mode is 4 times of frequency, the maximum output frequency of the encoder in the turntable is 43.7KHZ when the turntable rotates for one turn at maximum speed, a clock of 8MHZ is used when the servo control module transmits the a ', B' signals, the clock is default low level, the pulse duration of the synchronous signal is 0.5us, the pulse duration of the up/down count is 1us, the synchronous signal is 125ms once (8 HZ), the turntable scans within a certain range at maximum speed, on-line data acquisition is performed on two decoding transmission modes of the image processing module, the frequency adopted by the image processing module for decoding the a ', B' signals is 27MHZ (the frequency adopted by the a ', B' signal transmitting module and the receiving module can be different, and the communication is based on the pulse duration).
As shown in fig. 4, rx_a and rx_b are two-phase inputs of the photoelectric encoder, rx_a_r and rx_b_r are a' signal inputs generated by the servo control module of the method, cnt is a pulse T2 duration counter of the method, cnt_r is a pulse T1 duration counter of the method, map_cnt is a pulse signal number counter of the photoelectric encoder, map_cnt_r is a pulse signal number counter of the method, and map_cnt_d is a latch value of the pulse signal number when the method is synchronous. In the method shown in fig. 4a, the value of the map_cnt_r can follow the value of the map_cnt of the photoelectric encoder in real time, and fig. 4b is a partial amplified value thereof, wherein the cnt count is effectively 0-1a (16 scale in the figure), the 27MHZ acquisition clock is exactly 1us, and the value of the map_cnt_r lags behind the value of the map_cnt by 1us; as shown in fig. 4c, when the synchronization signal comes in, the value of map_cnt_d is changed from 3e0b7 to the current value of map_cnt_r 3dea8, and fig. 4d is a partial enlargement of 4c, and the count of cnt_r is effectively 1-d/e (0.5 us, possibly d and e when the 27MHZ is counted, so that the map_cnt_d is changed at d position), and the value of map_cnt_d lags behind the value of map_cnt_r by 0.5us, which delay does not affect the performance (ignorance) in the product of the embodiment, and of course, the method can also be implemented without delay, which is as follows:
s1, when the pulses are counted upwards/downwards, firstly changing the count value of the pulse signal quantity (namely the position of 0 when cnt is valid in the figure 4 a), and then counting the cnt value of the pulse duration time T2;
s2, if T2 meets the condition, the current count value is kept, and if not, the original value is changed (the count value of the pulse signal number is changed firstly, and the statistics is judged to be T2);
s3, when the synchronous signals come, firstly changing the count value of the pulse signal quantity (namely the position of 1 when cnt_r is valid in FIG. 4 c), firstly latching the count value according to the steps, and then carrying out statistics and judgment on T1; of course, the synchronization signal may not be counted to determine whether the current latch value satisfies the condition, because if the current latch value is a glitch, other modules of the latched value are not used, if the latch is the synchronization signal, the latch is changed in advance before counting T1, and the other modules cannot use the previous value.
Through the steps, the signals A and B' in the invention can completely synchronize the signals of the photoelectric encoder, thereby realizing delay-free transmission.

Claims (2)

1. A method for synchronously collecting photoelectric encoders based on turntable multi-channel is characterized in that: the method comprises the steps of transmitting analog orthogonal coding signals of two IO signals A ', B', configuring IO default level or configuring IO default state through pull-up/pull-down resistors, taking one module as a master (generally using a turntable control unit), collecting the orthogonal coding signals in real time, generating analog signals of A ', B', transmitting the analog signals to other modules, and transmitting time sequence, wherein the method comprises the following steps:
s1, powering up and initializing a system, returning the position of a turntable to an absolute zero position, simultaneously generating pulse signals with duration time of T1 by A ', B', and simultaneously clearing the counts of all modules; or the position of the turntable is unchanged, the absolute position of the encoder is informed to other modules in other modes, and the absolute position is used as a relative zero position, so that the counting starting points of all the modules are the same;
s2, A ', B' simultaneously generate a first double pulse signal with duration of T1 as a reference point for alignment, and then the double pulse signals of A ', B' are used for other modules to latch the current code disc value for other processing and are used as synchronous signals;
s3, two signals A 'and B', one is used for up counting and the other is used for down counting, when the turntable rotates forward, A 'generates a high pulse signal with the duration of T2, and B' keeps low level and up counts; when the turntable rotates reversely, B 'generates a high pulse signal with the duration of T2, A' keeps low level and counts downwards;
s4, for an N-bit encoder, using an N-frequency multiplication acquisition mode, the maximum speed of the turntable rotates for one circle for S (unit seconds), and the maximum output frequency of the turntable encoder is T= (N is 2) n ) The frequency T ' of the signals of the modules A ', B ' is required to be greater than T, so as to ensure that no down-counting pulse is generated during up-counting or no up-counting pulse is generated during down-counting, and the duration T2 is less than S/(N2) n ) The continuous clock number m=t2×t 'of T2 at the frequency T', and selecting a proper m value to eliminate the possible glitch phenomenon in the signal transmission process of a ', B', wherein m is at least greater than 1;
s5, when the synchronous signal is sent out, the up or down counting pulse is generated, and the up or down counting times are not missed, so that the duration time T2 is required to be longer than T1; as can be seen from step S4, the duration of T2-T1 is greater than 1, and the duration of T2+T1 is less than S/(N.times.2) n )。
2. The turntable-based multi-channel synchronous acquisition photoelectric encoder method as claimed in claim 1, wherein: in the steps S4 and S5, the signal sampling frequency T ' of the A ' and the B ' is more than twice of the maximum output frequency T of the rotary table encoder, so that the accuracy of collected data is ensured; t1 lasts at least 2 clock counts, T2 lasts at least 4 clock counts, and interference in the transmission process is reduced.
CN202311176695.4A 2023-09-13 2023-09-13 Method for synchronously collecting photoelectric encoders based on turntable multi-channel Pending CN117309014A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311176695.4A CN117309014A (en) 2023-09-13 2023-09-13 Method for synchronously collecting photoelectric encoders based on turntable multi-channel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311176695.4A CN117309014A (en) 2023-09-13 2023-09-13 Method for synchronously collecting photoelectric encoders based on turntable multi-channel

Publications (1)

Publication Number Publication Date
CN117309014A true CN117309014A (en) 2023-12-29

Family

ID=89249054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311176695.4A Pending CN117309014A (en) 2023-09-13 2023-09-13 Method for synchronously collecting photoelectric encoders based on turntable multi-channel

Country Status (1)

Country Link
CN (1) CN117309014A (en)

Similar Documents

Publication Publication Date Title
CN111726115B (en) Frequency division and counting system and method for pulse signals of rotary pulse encoder
CN103575312B (en) A kind of fluttering method that disappears of the incremental optical-electricity encoder for photoelectric turntable
CN101646986A (en) USB based synchronization and timing system
JP4184466B2 (en) Method and apparatus for varying interpolation coefficient
JPH0775343B2 (en) Synchronization detection circuit and method
CN102575945A (en) Interface circuit, inverter apparatus, inverter system and transmission/reception method
US5594241A (en) Apparatus and method for jitter attenuation in rotary encoders
CN117309014A (en) Method for synchronously collecting photoelectric encoders based on turntable multi-channel
JP3168861B2 (en) Rotary encoder receiving circuit
CN116886105A (en) Transmission circuit and transmission method of orthogonal coded signals
CN114342311B (en) Apparatus and method for synchronous serial data transmission
JPH074990A (en) Method for detecting absolute position in encoder apparatus
US5222107A (en) Transmission and reception synchronization device for a communication network station particularly for automotive vehicles
US6285184B1 (en) Speed and position signal generator
CN111506120A (en) Design method of ABZ pulse of regenerative encoder in servo control
JP3719413B2 (en) Data transmission system, data transmission / reception apparatus used therefor, and method thereof
JP2559237Y2 (en) Serial data sampling signal generator
JP3371913B2 (en) Waveform distortion correction device
JPH0644756B2 (en) Synchronous clock generation circuit
CN215416357U (en) Multi-channel encoder control system based on microcontroller
CN117666444B (en) Decoding device and decoding method of BISS-C protocol with wire delay compensation based on domestic singlechip
CN115956341A (en) Method for synchronizing an analog-to-digital converter or a digital-to-analog converter and corresponding system
JPH05259911A (en) Rotary encoder
JP2892932B2 (en) Signal transmission device for position detector
JPS59207410A (en) Magnetic recording and reproducing device

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