CN116886105A - Transmission circuit and transmission method of orthogonal coded signals - Google Patents
Transmission circuit and transmission method of orthogonal coded signals Download PDFInfo
- Publication number
- CN116886105A CN116886105A CN202310712144.9A CN202310712144A CN116886105A CN 116886105 A CN116886105 A CN 116886105A CN 202310712144 A CN202310712144 A CN 202310712144A CN 116886105 A CN116886105 A CN 116886105A
- Authority
- CN
- China
- Prior art keywords
- acquisition
- signals
- transmission
- module
- orthogonal coded
- 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
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 57
- 238000000034 method Methods 0.000 title claims abstract description 24
- 230000000630 rising effect Effects 0.000 claims description 24
- 238000004891 communication Methods 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000008054 signal transmission Effects 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 230000002045 lasting effect Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Landscapes
- Arrangements For Transmission Of Measured Signals (AREA)
Abstract
The invention discloses a transmission circuit of orthogonal coded signals and a transmission method thereof, wherein the transmission circuit comprises an encoder, a collection generating module for collecting the orthogonal coded signals of the encoder and a plurality of collection modules, wherein the collection generating module for collecting the orthogonal coded signals simultaneously transmits signals AB through an IO port to the collection modules, each collection module respectively analyzes the received AB signals, the circuit transmits the analog orthogonal coded signals through the IO port, and the collection generating module directly collects the orthogonal coded signals to the encoder after setting IO default level or IO default state through an up/down resistor, and generates IO time sequence to be transmitted to other collection modules, and the other collection modules decode the orthogonal coded signals according to appointed time sequence; the invention not only can avoid interference when a plurality of modules collect orthogonal coded signals, but also can effectively change the condition that the number of the conductive slip ring ports is not enough.
Description
Technical Field
The invention relates to the technical field of signal transmission, in particular to a transmission circuit and a transmission method of orthogonal coded signals.
Background
In the technical field of signal transmission, under the condition that a Z signal (zero crossing signal) is not used, a general encoder comprises 2 (A, B two phases) output signal lines, a differential encoder comprises 4 (A+, A-, B+ and B-) signal lines, and the differential signal is usually converted into a single-ended signal by a corresponding circuit for acquisition. The phase difference of the two phases of the quadrature code signal A, B is always 90 degrees, and the rotation direction and the displacement of the quadrature code signal are determined by the phase difference of the two phases of A, B and the pulse number. However, in some product applications, there are multiple modules that need to collect the orthogonal code signals, and these modules are connected to the orthogonal code signals at the same time, which may generate some interference (such as wiring or hardware difference from differential to single-ended, etc.), so that collection of one or some modules is inaccurate; in addition, in some turntable products, some modules are connected through specific devices such as conductive slip rings, four (one for each of the horizontal and vertical directions of a general turntable, one for each of A, B two phases of signals) ports are required for a general encoder, eight (four pairs of differential signals) ports are required for a differential encoder, the number of ports of the conductive slip rings is generally fixed along with the design of the product, and the number of ports of the conductive slip rings is insufficient due to the factors such as the increase of subsequent functions or the upgrade of the product, so that the replacement of devices at this time increases the cost and the time period.
Disclosure of Invention
In order to solve the technical defects, the invention aims to provide a transmission circuit of orthogonal coded signals, which not only can prevent interference from being generated and the acquisition of certain modules from being inaccurate when a plurality of modules acquire the orthogonal coded signals at the same time, but also can effectively change the situation that the number of ports of a conductive slip ring is not enough, and avoid the increase of cost and time period caused by replacing devices.
Another object of the present invention is to provide a transmission method of a transmission circuit of an orthogonal coded signal.
In order to achieve the above purpose, the invention adopts the following technical scheme: the utility model provides a transmission circuit of quadrature code signal, includes encoder, gathers encoder quadrature code signal's collection and takes place module and a plurality of collection module, gathers the collection that takes place module of quadrature code signal and passes through the IO time sequence transmission signal AB that produces, transmits simultaneously to a plurality of collection modules through the IO port promptly, and each collection module decodes respectively the AB signal that receives.
Further, the acquisition generation module which acquires the orthogonal code signals transmits the signals AB through generating IO time sequence transmission signals, namely, the signals AB are transmitted to one acquisition module through one IO port, the acquisition modules are directly connected to the other IO port through the IO port and are transmitted to the other acquisition module, the signals are sequentially transmitted to the plurality of acquisition modules, and each acquisition module decodes the received AB signals simultaneously in the transmission process.
According to the transmission method of the transmission circuit of the orthogonal coded signals, the orthogonal coded signals are simulated through the IO port for transmission, the acquisition generation module directly acquires the orthogonal coded signals to the encoder after the IO default level is configured or the IO default state is set through the pull-up/pull-down resistor, IO time sequences are generated and transmitted to other acquisition modules, and the other acquisition modules decode the orthogonal coded signals according to the appointed time sequences; in the method, an IO default state, a communication appointed rising edge/falling edge acquisition mode and the duration time of a related time sequence are set in actual work of an IO time sequence, and the transmission can be carried out after the IO time sequence is prepared, and the method comprises the following specific steps of:
s1, when an acquisition generation module for acquiring orthogonal coded signals acquires up-counting, generating a rising edge, sending the rising edge to other acquisition modules through an IO port, adding 1 to pulse counting up when the other acquisition modules acquire the rising edge, and continuously detecting high-level duration time T1 after detecting the rising edge;
s2, when the IO port level at a certain moment is low, the orthogonal code signal is counted downwards at the moment, the acquisition generation module for acquiring the orthogonal code signal firstly pulls high IO level and then pulls low IO level, when the pulling high level starts, the duration of the high level is kept to be T2, other acquisition modules are added with 1 after the rising edge is detected, the duration of the high level is detected, and if the duration is T2, the duration is reduced by 2 when the falling edge is detected, so that continuous counting in the same direction is met.
Further, under the condition of T2, each acquisition module generates or acquires the duration of the corresponding signal for at least two clock cycles, so that the time that T2 is at least longer than the minimum frequency in the acquisition clocks in each acquisition module for one clock can be realized; the setting of T2 here can generate a corresponding rising/falling edge, satisfying continuous counting in the same direction.
In the invention, if the duration time T1 acquired by other modules is smaller than the value of T2, the communication signal and the burr are considered as burrs generated by interference, but the communication signal and the burr do not influence counting (the burrs generate rising/falling edges and have corresponding edges, and if the duration time does not meet the value of T2, the addition and the subtraction are exactly counteracted), the method can effectively solve the burr interference generated by a certain reason. Here, the module for acquiring the orthogonal code signal generates a normal communication timing with T1 greater than T2, which is used to distinguish between the communication timing and the glitch generated by the interference (typically, there is no or very little glitch, but there is a distinguishing method).
The invention sets the encoder as N bits when in work, the acquisition mode adopted by the acquisition generation module is N times frequency count, the product rotates for one circle at maximum speed for S seconds, and the maximum frequency output by the encoder of the product is N x 2 n The frequency of each acquisition module for generating and acquiring IO signals is larger than N x 2 n /S, and the duration (T1+T2) is less than S/N2 n Avoiding the situation that one count is incomplete and the other count is already coming, selecting proper frequency and duration according to the actual situation is an important condition for transmission by using the method.
The beneficial effects of the invention are as follows: the simulation orthogonal coding signal of one IO port is transmitted, so that the problem that when a plurality of modules read the coder simultaneously, one or a plurality of modules are not accurately acquired due to interference or hardware reasons and the like can be effectively solved; the invention has only one signal wire during transmission, is convenient for connection and wiring, has fewer ports in special devices (such as a turntable conductive slip ring), and can save more ports;
the circuit hardware in the invention has the advantages of convenient connection, simple time sequence, easy realization and convenient engineering application.
Drawings
The technical features of the present invention will be further described with reference to the drawings and examples.
Fig. 1 is an embodiment of a transmission circuit in the present invention.
Fig. 2 is another embodiment of the transmission circuit of the present invention.
Fig. 3 is a timing diagram of four IOs for the transmission method of the present invention.
Fig. 4 is a schematic diagram of an online verification circuit connection for collecting effects of an embodiment of the present invention.
Fig. 5 is a schematic diagram of the number of pulses counter value followed by the number of pulses counter value of the encoder acquired in the prior verification circuit of fig. 4.
Fig. 6 is a partial enlarged view of fig. 5.
Description of the embodiments
Referring to fig. 1, an embodiment of a transmission circuit in the present invention discloses a transmission circuit for orthogonal coded signals, which includes an encoder, a collection generating module for collecting orthogonal coded signals of the encoder, a collection module 1 and a collection module 2, wherein the collection generating module for collecting orthogonal coded signals transmits signals AB through generating IO time sequences, that is, transmitting signals AB to the collection module 1 and the collection module 2 through IO ports, and the collection module 1 and the collection module 2 decode received AB signals respectively.
Referring to fig. 2, another embodiment of a transmission circuit in the present invention discloses a transmission circuit for orthogonal code signals, which includes an encoder, a collection generating module for collecting orthogonal code signals of the encoder, a collection module 1 stage and a collection module 2, wherein the collection generating module for collecting orthogonal code signals generates an IO time sequence transmission signal AB, that is, the IO time sequence transmission signal AB is transmitted to the collection module 1 through an IO port, the collection module 1 is directly connected to another IO port through the IO port and transmits the IO time sequence transmission signal to the collection module 2, the collection module 1 and the collection module 2 sequentially transmit signals to subsequent collection modules, and the received AB signals are simultaneously decoded.
The transmission method of the transmission circuit of the two orthogonal coded signals specifically comprises the steps of simulating the orthogonal coded signals through an IO port, setting an IO default state through configuration of IO default level or through an up/down pull resistor, directly acquiring the orthogonal coded signals to an encoder by an acquisition generation module, generating IO time sequences, transmitting the IO time sequences to other acquisition modules, and decoding the orthogonal coded signals by the other acquisition modules according to appointed time sequences.
Referring to fig. 3, which is a diagram of four IO timing diagrams of the transmission method of the present invention, the IO timing sets an IO default state, a rising edge/falling edge acquisition mode of a communication protocol and a duration of a related timing in actual operation, and the transmission can be performed after the IO timing diagrams are ready, which specifically includes the following steps: (As illustrated in FIG. 3a, the other transmissions in FIGS. 3b, 3c and 3d are the same except that the IO initial state and the up/down count of the corresponding acquisition pulses are different)
S1, when an acquisition generation module for acquiring orthogonal coded signals acquires up-counting, generating a rising edge, sending the rising edge to other acquisition modules through an IO port, adding 1 to pulse counting up when the other acquisition modules acquire the rising edge, and continuously detecting high-level duration time T1 after detecting the rising edge;
s2, when the IO port level at a certain moment is low, the orthogonal code signal is counted downwards at the moment, the acquisition generation module for acquiring the orthogonal code signal firstly pulls high IO level and then pulls low IO level, when the pulling high level starts, the duration of the high level is kept to be T2, other acquisition modules are added with 1 after the rising edge is detected, the duration of the high level is detected, and if the duration is T2, the duration is reduced by 2 when the falling edge is detected, so that continuous counting in the same direction is met.
Under the condition of T2, each acquisition module generates or acquires corresponding signals for at least two clock cycles, so that the time that T2 is at least longer than the minimum frequency in the acquisition clocks in each acquisition module for one clock can be realized; the setting of T2 here can generate a corresponding rising/falling edge, satisfying continuous counting in the same direction.
In the transmission process, the encoder is set to be N bits, the acquisition mode adopted by the acquisition generation module is N times frequency count, the product rotates one round at maximum speed for S seconds, and the encoder outputs the productMaximum frequency is N.times.2 n The frequency of each acquisition module for generating and acquiring IO signals is larger than N x 2 n /S, and the duration (T1+T2) is less than S/N2 n Avoiding the situation that one count is incomplete and the other count is already arriving, selecting the proper frequency and duration according to the actual situation is an important condition for transmission using the present invention.
In order to verify the acquisition effect in the transmission method of the present invention, referring to fig. 4, the acquisition module 2 directly acquires the orthogonal coded signals of the encoder itself and decodes the orthogonal coded signals while acquiring the signal AB from the IO port, in this embodiment, a 16-bit encoder is used, the acquisition mode is 4 times of frequency, the maximum output frequency of the encoder in the product is 43.7KHZ when the product rotates one round with maximum speed, the acquisition generation module uses a clock of 20MHZ when transmitting the AB signal, the agreed duration T1 is 1us, T2 is 0.2us, the default is low level, the product scans within a certain range with maximum speed, the two decoding modes of the acquisition module 2 perform online data acquisition, the frequency adopted by the acquisition module 2 for decoding the AB signal is 10MHZ (the frequencies adopted by the AB signal transmission module and the receiving module may be different, the communication uses the pulse duration as a reference), and the generation and acquisition frequencies of the acquisition generation module 2 are both far greater than the maximum output frequency of the encoder in the product, thereby meeting the transmission conditions required in the present invention.
Referring to fig. 5, a diagram of the number of pulses counter value collected in the prior verification circuit of fig. 4 following the number of pulses counter value of the encoder is shown, map_cnt is the number of pulses counter of the method, map_cnt_r is the number of pulses counter of the method, rx_a and rx_b are two-phase inputs after the differential signals of the encoder are converted into single-ended, rx_ab is an AB signal input generated by the collection generating module of the method, cnt is the duration counter of pulses T1 and T2 of the method.
FIG. 6 is a diagram of signal mapan_cnt [17 ] of FIG. 5: 0 is between 3dd14 and 3dd13, i.e., the expanded view of the square frame position in fig. 5. When the cnt count is 2 (10 MHZ acquisition, two clocks lasting 0.2us for a duration of T2, shown in the figure as 16), this indicates that the product is continuously counted in the same direction, after the rising edge is detected, the count is incremented by 1 and decremented by 2 on the falling edge (corresponding to step S2). If the cnt count is 14 (corresponding to decimal 20, T1 duration of the present transmission contract), it indicates that one count is completed. When the count cnt between the two rising/falling edges is 14, which indicates that the product is turning at this time, the first marking pulse T1 as shown in 1a in fig. 3, by the present invention, it can be known whether the product is continuously turning in the same direction or the product is turning, the implementation manner is simple, and engineering application is convenient.
Claims (5)
1. A transmission circuit for quadrature encoded signals, characterized by: the system comprises an encoder, a collection generating module for collecting orthogonal coded signals of the encoder and a plurality of collection modules, wherein the collection generating module for collecting the orthogonal coded signals is used for simultaneously transmitting IO time sequence transmission signals AB to the collection modules through IO ports, and each collection module is used for respectively decoding the received AB signals.
2. The transmission circuit of quadrature encoded signals of claim 1, wherein: the acquisition generating module acquires the orthogonal coding signals by generating IO time sequence transmission signals AB, namely, transmitting the IO time sequence transmission signals AB to one of the acquisition modules through an IO port, wherein the acquisition module is directly connected to the other IO port through the IO port and transmits the IO time sequence transmission signals to the other acquisition module, and each acquisition module decodes the received AB signals in the transmission process.
3. The transmission method of a transmission circuit of an orthogonal coded signal according to claim 1 or 2, characterized in that: simulating orthogonal coded signals through an IO port for transmission, configuring an IO default level or setting an IO default state through an up/down pull resistor, directly acquiring the orthogonal coded signals to an encoder by an acquisition generation module, generating IO time sequences, transmitting the IO time sequences to other acquisition modules, and decoding the orthogonal coded signals by the other acquisition modules according to the appointed time sequences; in the method, an IO default state, a communication appointed rising edge/falling edge acquisition mode and the duration time of a related time sequence are set in actual work of an IO time sequence, and the transmission can be carried out after the IO time sequence is prepared, and the method comprises the following specific steps of:
s1, when an acquisition generation module for acquiring orthogonal coded signals acquires up-counting, generating a rising edge, sending the rising edge to other acquisition modules through an IO port, adding 1 to pulse counting up when the other acquisition modules acquire the rising edge, and continuously detecting high-level duration time T1 after detecting the rising edge;
s2, when the IO port level at a certain moment is low, the orthogonal code signal is counted downwards at the moment, the acquisition generation module for acquiring the orthogonal code signal firstly pulls high IO level and then pulls low IO level, when the pulling high level starts, the duration of the high level is kept to be T2, other acquisition modules are added with 1 after the rising edge is detected, the duration of the high level is detected, and if the duration is T2, the duration is reduced by 2 when the falling edge is detected, so that continuous counting in the same direction is met.
4. A transmission method of a transmission circuit of an orthogonal coded signal according to claim 3, characterized in that: under the condition of T2, each acquisition module generates or acquires corresponding signals for at least two clock cycles, so that the time that T2 is at least longer than the minimum frequency in the acquisition clocks in each acquisition module for one clock can be realized; the setting of T2 here can generate a corresponding rising/falling edge, satisfying continuous counting in the same direction.
5. The transmission method of the transmission circuit of the orthogonal coded signal according to claim 4, wherein: the invention sets the encoder as N bits when in work, the acquisition mode adopted by the acquisition generation module is N times frequency count, the product rotates for one circle at maximum speed for S seconds, and the maximum frequency output by the encoder of the product is N x 2 n The frequency of each acquisition module for generating and acquiring IO signals is larger than N x 2 n /S, and the duration (T1+T2) is less than S/N2 n 。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310712144.9A CN116886105A (en) | 2023-06-15 | 2023-06-15 | Transmission circuit and transmission method of orthogonal coded signals |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310712144.9A CN116886105A (en) | 2023-06-15 | 2023-06-15 | Transmission circuit and transmission method of orthogonal coded signals |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116886105A true CN116886105A (en) | 2023-10-13 |
Family
ID=88255771
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310712144.9A Pending CN116886105A (en) | 2023-06-15 | 2023-06-15 | Transmission circuit and transmission method of orthogonal coded signals |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116886105A (en) |
-
2023
- 2023-06-15 CN CN202310712144.9A patent/CN116886105A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111726115B (en) | Frequency division and counting system and method for pulse signals of rotary pulse encoder | |
US10547437B2 (en) | Synchronization signal transmitting device, method thereof and power electronic apparatus having the device | |
CN104954096B (en) | A kind of high-speed synchronous serial communication data transmission method of one master and multiple slaves | |
CN102619501B (en) | A kind of data transmission system in oil logging tool | |
CN102611447B (en) | Noise adding signal synchronization clock extraction device based on FPGA (field programmable gate array) | |
CN102575945B (en) | Inverter apparatus and inverter system | |
CN101576610A (en) | Device and method for improving data sampling precision in oscillograph | |
US4086587A (en) | Apparatus and method for generating a high-accuracy 7-level correlative signal | |
CN116886105A (en) | Transmission circuit and transmission method of orthogonal coded signals | |
US4675545A (en) | Wave shaping apparatus for eliminating pulse width distortion | |
CN202586998U (en) | Synchronous clock extraction device for noise-added signal based on FPGA (field programmable gate array) | |
CN202500555U (en) | Data transmission system in petroleum logger | |
CN117309014A (en) | Method for synchronously collecting photoelectric encoders based on turntable multi-channel | |
CN112729311B (en) | Inertial navigation system sampling method and sampling system | |
CN104677395A (en) | Compatible coded disc angle measuring device | |
CN114342311B (en) | Apparatus and method for synchronous serial data transmission | |
JP3168861B2 (en) | Rotary encoder receiving circuit | |
CN114460882A (en) | Incremental encoder pulse detection circuit based on programmable logic array | |
CN103001901A (en) | Integrated circuit high-speed digital interface module based on modified difference pulse code modulation (MDPCM) | |
CN103870414B (en) | The data acquisition device and method of asynchronous communication are carried out based on PLD | |
CN110971341B (en) | DBPL code hardware decoding method and system | |
CN107402026B (en) | A method of it improving orthogonal encoder and exports pulse | |
CN103475344B (en) | A kind of phase demodulating, frequency doubling logic circuit with the anti-mechanism of makeing mistakes | |
CN109737995A (en) | The acquisition system and method for incremental encoder based on distributed timing device | |
JPH02274139A (en) | Data transmission system |
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 |