A single-line communication method between a laser marking card and a galvanometer
By combining data and clock signals with a single-line encoding method between the laser marking card and the galvanometer, the problems of inter-line interference and cable length limitation in the XY2-100 protocol are solved, and efficient and reliable single-line communication is achieved, suitable for short-term Distance coaxial cable and long-distance fiber optic communication.
Patent Information
- Application Number
- CN202211272281.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2042-10-18
AI Technical Summary
The XY2-100 protocol communication between the existing laser marking card and the galvanometer has electromagnetic interference between lines, resulting in unstable signal transmission, thick and easy to damage, and the protocol's high clock frequency limits the cable length, resulting in far-reaching galvanometer. Difficult to control distance.
The single-line encoding method is used to merge the data of the two channels of the galvanometer X and Y into a continuous data frame, and the clock signal is combined with the data signal, and the transmission is carried out through a single-core wire, and long-distance communication is achieved using optical fiber or coaxial cable to avoid wires. Interference and improve signal quality.
It realizes high-impact and high-speed single-wire communication, reduces the number of cables and connector volume, improves communication reliability and flexibility, reduces energy consumption, extends the cable length, and simplifies the plug-in and unplug process.
Smart Images

Figure CN115665062B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of communication, and in particular to a single-line communication method between a laser marking card and a galvanometer. Background Art
[0002] In order to realize the processing of complex patterns in laser processing, a marking card is usually used at the control end to decompose and optimize the trajectory of the processing graphics, generate a trajectory point set and send it to the galvanometer, drive the two motors in the galvanometer to drive the reflector to move, thereby realizing the control of the light beam.
[0003] At present, the XY2-100 protocol is widely used in the market for communication between the marking card and the galvanometer. This protocol is an extension of the SPI protocol. It adds one data channel based on the SPI protocol and changes the single-ended signal of SPI to a differential signal. Figure 1 As shown in the figure, the XY2-100 protocol uses four signals to transmit two channels of data, including the clock signal Clock, the synchronization signal SYNC, the galvanometer X signal Channel X, and the galvanometer Y signal Channel Y. The galvanometer X and Y signals include 20 bits of data, of which C2, C1, and C0 are operation bits used to control the galvanometer enable, disable, mode switching, and other operations, and are usually reserved; D15-D0 are position instructions, and the last bit P is the parity bit. The protocol sends 20 bits of data every 10 microseconds, that is, the position instruction refresh cycle is 100kHz.
[0004] In addition to the ground wire, at least four-core cables are required for communication. In order to avoid electromagnetic interference between the cores, differential signals are used for transmission in the project, such as Figure 2 As shown in the figure, 4 pairs of differential signals are used to transmit Clock, SYNC, Channel X and Channel Y respectively, and DB-type connectors are usually used at the end of the cable. Electromagnetic interference between multiple strands of wires leads to bit errors easily occurring during transmission, and the signal transmission bandwidth has an obvious bottleneck, so it is difficult to improve communication reliability. At the same time, due to the use of 4 pairs of shielded twisted pair cables, the cables are thicker and less flexible, which makes them easy to damage during use. In addition, the DB-type connectors that come with the cables are large in size and inconvenient to plug and unplug. Secondly, the higher clock frequency in the protocol means that the cable cannot be too long (usually less than 5 meters), otherwise the signal at the end will be severely distorted, and the cable length limit makes long-distance control of the galvanometer very difficult. Summary of the invention
[0005] In order to overcome the above shortcomings, the purpose of the present invention is to provide a single-line communication method between a laser marking card and a galvanometer. First, the X and Y channel data are merged into a continuous data frame, and then the clock signal and the data signal are fused together for encoding to achieve data transmission via one line, thus avoiding interference between lines.
[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is: a single-line communication method between a laser marking card and a galvanometer, after merging the instructions of the two channels X and Y of the galvanometer, sending them in the form of a continuous data frame, the continuous data frame is composed of two subframes, the two subframes are the X subframe and the Y subframe corresponding to the X channel and the Y channel, each of the subframes contains 25 data; the clock line and the data line are merged by a single-line encoding method, and the continuous data frame is sent by a single core line.
[0007] The present invention adopts the continuous data frame sending mode to merge and send the data of the two channels X and Y of the galvanometer, thereby avoiding the crosstalk between X and Y and improving the signal quality without sacrificing the transmission rate.
[0008] Further, the X subframe and the Y subframe each contain 25 data bits;
[0009] The first to third bits of each subframe do not send actual data. The six clock cycles occupied by these three bits are continuously maintained at a high level to trigger the receiving end to start receiving data. The galvanometer receiving end regards the level not being reversed for more than four clock cycles as a trigger signal for preparing to receive data (according to the single-line encoding rule, the level must be reversed once every two clock cycles. Not reversing the level for four consecutive clock cycles is a "violation" operation. Here, "violation" is used as a trigger signal), and is ready to receive in the fifth and sixth clock cycles, and starts receiving data in the seventh cycle.
[0010] The 4th and 5th bits are the galvanometer channel selection bits, which are used to indicate whether the subsequent position command data is assigned to the galvanometer X motor or Y motor;
[0011] Bits 6 to 8 are operation bits, used for enabling, disabling, mode conversion, and returning to origin operations;
[0012] Bits 9 to 24 are position command data, which are used to send 16-bit position commands to the galvanometer receiver. The galvanometer will move to the corresponding position according to this data.
[0013] The 25th bit is the parity bit, which is used to ensure the validity of the data.
[0014] Further, the clock line and the data line are merged by using a single-line encoding method. Specifically, a clock frequency twice the transmission bit rate is used as a reference to split the original one bit of data into two parts, that is, one bit of data is transmitted in two clock cycles;
[0015] When the data is 1, two clock cycles are used for encoding, and the potential is reversed once in the second clock cycle during transmission, that is, high becomes low or low becomes high; when the data is 0, two clock cycles are also used for encoding, and the potentials of the two clock cycles are the same during transmission, but after each data bit is transmitted, the potential is changed once in the next clock cycle, that is, the starting potential of each transmitted data is different from the previous bit, so that the receiving end can distinguish each data bit.
[0016] With this method, the data line and the clock line are combined into one, avoiding mutual interference and improving signal quality.
[0017] Specifically, the single-core wire includes an optical fiber, a coaxial cable or a twisted pair. Coaxial cable can realize short-distance single-wire communication, and optical fiber can realize long-distance single-wire communication, meeting various communication requirements.
[0018] The present invention adopts this method to achieve high-speed, high-interference-resistant communication with the least wire cores, and uses a single-core wire to replace the traditional 4 pairs of shielded twisted pair wires and DB connectors, which not only makes the cables thinner and softer, but also makes the cable connectors lighter and easier to plug and unplug. It also significantly improves the reliability of communication and reduces energy consumption during transmission, thereby achieving cost reduction and efficiency improvement. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a timing diagram of XY2-100 galvanometer communication protocol in the prior art;
[0020] Figure 2 It is the electrical diagram of XY2-100 galvanometer communication in the prior art;
[0021] Figure 3 A diagram showing the composition of a data frame described in the present invention;
[0022] Figure 4 It is a principle timing diagram of the single-line encoding method described in the present invention;
[0023] Figure 5 This is a circuit diagram of coaxial cable communication in Embodiment 1 of the present invention;
[0024] Figure 6 This is a circuit diagram of coaxial cable communication in Example 2 of the present invention. DETAILED DESCRIPTION
[0025] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0026] Example
[0027] The present invention provides a single-line communication method between a laser marking card and a galvanometer, which combines the instructions of the two channels X and Y of the galvanometer and sends them in the form of a continuous data frame. Figure 3 As shown, a continuous data frame is sent every 10 microseconds, and each continuous data frame is composed of two subframes, the two subframes are X subframe X and Y subframe, which correspond to the two channels of mirror X and Y respectively. X subframe X and Y subframe each contain 25 data bits.
[0028] The 1st to 3rd bits of each subframe do not send actual data. The six clock cycles occupied by these three bits continue to maintain a high level, which is used to trigger the receiving end to start receiving data. The 4th and 5th bits are the galvanometer channel selection bits, which are used to indicate that the subsequent position command data is assigned to the galvanometer X motor or Y motor; the 6th to 8th bits are operation bits, which are used for operations such as enabling, disabling, mode conversion, and returning to the origin; the 9th to 24th bits are position command data, which are used to send 16-bit position commands to the galvanometer, and the galvanometer end will move to the corresponding position according to this segment of data; the 25th bit is the parity bit, which is used to ensure the validity of the data.
[0029] After the above encoding, the original XY two-way signal is merged into one, avoiding the mutual interference between the two channels, but this is still not enough, there is still mutual interference between the clock line and the data line, because if the Figure 2 In the structure shown in which the clock line and the data line are separated, interference between the lines may easily lead to bit errors at the receiving end. Therefore, the present invention adopts a single-line encoding method to merge the clock line and the data line to achieve data transmission with one cable, thus avoiding interference between the lines.
[0030] The single-line encoding method specifically includes using a clock frequency that is twice the transmission code rate as a reference to split the original one bit of data into two parts, that is, using two clock cycles to transmit one bit of data; when the data is 1, two clock cycles are used for encoding, and the potential is reversed once in the second clock cycle during transmission, that is, high becomes low or low becomes high; when the data is 0, two clock cycles are also used for encoding, and the potentials of the two clock cycles are the same during transmission, but each time a data bit is transmitted, the potential is changed once in the next clock cycle, that is, the starting potential of each transmitted data is different from the previous bit, so that the receiving end can distinguish each data bit.
[0031] In order to explain the single-line encoding method described in the claims in detail, Figure 3An example shown explains the coding principle in detail. If the single-line coding method is used to send the data "100110", if the initial level is low, sending the first bit "1" requires reversing the potential once within two clock cycles, that is, from high to low; sending the second bit "0" does not require reversing the potential, but in order to allow the receiving end to distinguish it, a different potential from the previous bit is required, so the overall potential is high; the third bit "0" does not require reversing the potential, but the overall potential is different from the previous bit, and the overall potential is low; and so on, the potential of the fourth bit "1" changes from high to low, the potential of the fifth bit "1" changes from high to low, and the potential of the sixth bit "0" is high as a whole.
[0032] In order to realize single-line communication, the present invention adopts two methods to realize short-distance and long-distance communication respectively. The single-core line adopts coaxial cable to realize short-distance single-line communication, and the single-core line adopts optical fiber to realize long-distance single-line communication, meeting various communication needs. The single-core line can be selected according to the actual transmission distance.
[0033] like Figure 5 As shown, when the distance is short (for example, less than 5 meters), coaxial cable is used for signal transmission. When coaxial cable communication is used, the transmitting end uses the signal encoded by the single-line encoding method as the input signal of the circuit. After the signal is processed by the high-pass filter circuit composed of R2 and C1 and the R1 pull-up resistor, the voltage follower transmits the signal to the coaxial cable; the receiving end processes the signal through the termination circuit R3, and inputs it into the decoding chip DAC through two filter capacitors C2 and C3, thereby realizing signal transmission.
[0034] like Figure 6 As shown, at a long distance (for example, 10-100 meters), the transmitting end uses the signal encoded by the single-line encoding method as the input signal of the circuit. After the signal is processed by the high-pass filter circuit composed of R6 and C4 and the R4 pull-up resistor, the light-emitting diode LD is driven by the voltage follower, and R6 is used to limit the current of LD. LD is connected to the optical fiber to send the signal to the remote end; the receiving end uses a photocell PD to capture the change of light intensity, and the optical signal is converted into a weak current signal. The current signal is converted into a voltage signal through the IV conversion circuit composed of C5, R7, and Amp2, and then connected to the decoding chip DAC through C6 and C7 to realize the long-distance transmission of the signal.
[0035] The above implementation modes are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with this technology to understand the content of the present invention and implement it, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A single-line communication method between a laser marking card and a galvanometer, characterized in that: The following steps are included: After merging the instructions of the two channels of the galvanometer X and Y, the instructions are sent in the form of a continuous data frame, wherein the continuous data frame is composed of two subframes, and each subframe contains 25 data; The clock line and the data line are combined by using a single-line encoding method, and the continuous data frames are sent by using a single-core line; The two subframes include an X subframe and a Y subframe corresponding to two channels X and Y of the galvanometer; The encoding method of the 25 data of each subframe is as follows: The first to third bits of each subframe do not send actual data, and the six clock cycles occupied by the first to third bits continue to maintain a high level, which is used to trigger the receiving end to start receiving data. The galvanometer receiving end regards the level not being reversed for more than four clock cycles as a trigger signal for preparing to receive data, and is ready to receive in the fifth and sixth clock cycles, and starts receiving data in the seventh cycle; The 6th to 8th bits of each subframe are operation bits, which are used to perform operations of enabling, disabling, mode conversion, and returning to the origin; The 9th to 24th bits of each subframe are position instruction data, which are used to send a 16-bit position instruction to the galvanometer. The galvanometer receiving end will move to the corresponding position according to the 9th to 24th bits of data; The 25th bit of each subframe is the parity bit, which is used to ensure the validity of the data; The method of combining the clock line and the data line by using a single-line encoding method includes: Using a clock frequency twice the transmission bit rate as a benchmark, one bit of data is split into two parts, that is, one bit of data is transmitted in two clock cycles; When the transmitted data is 1, two clock cycles are used for encoding, and the potential is reversed once in the second clock cycle during transmission; When the transmitted data is 0, two clock cycles are used for encoding. The potentials of the two clock cycles are the same during transmission, but each time a data bit is transmitted, the potential is changed once in the next clock cycle. The starting potential of each transmitted data is different from the previous bit.
2. The single-line communication method between the laser marking card and the galvanometer according to claim 1, characterized in that: The single core wire includes an optical fiber, a coaxial cable or a twisted pair wire.
Citation Information
Patent Citations
Optical fiber communication device of laser marking control system and coding method
CN102571209A
Two-dimensional galvanometric laser scanning teaching demonstration device and implementing method thereof
CN104464483A
