Cable fault automatic detection circuit and method for PROFIBUS communication
By designing a cable fault automatic detection circuit combining terminal resistance matrix module and switch tube in the PROFIBUS communication system, the problem that the existing technology cannot automatically detect communication cable faults is solved, and the stability and reliability of communication are improved.
Patent Information
- Application Number
- CN202411863647.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-17
AI Technical Summary
The existing PROFIBUS communication technology cannot automatically detect communication cable failures, resulting in communication instability and reliability problems.
A PROFIBUS communication cable fault automatic detection circuit is designed, and a terminal resistance matrix module and a switch tube are combined to determine whether the cable has a fault by detecting the difference in voltage values.
Automatic detection of communication cable failures in PROFIBUS communication site is realized, which significantly improves the stability and reliability of communication.
Smart Images

Figure CN119727786A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of PROFIBUS communication, and in particular relates to a PROFIBUS communication cable fault automatic detection circuit and method. Background Art
[0002] PROFIBUS (Process Field Bus) is a fieldbus standard widely used in the field of industrial automation. It was developed by PROFIBUS International (PI) to achieve efficient communication and interoperability between devices. PROFIBUS communication technology occupies an important position in the field of industrial automation due to its high efficiency, flexibility and wide compatibility, supporting the reliable operation of various complex systems. However, the reliability of its cable connection has always been the focus of industry applications.
[0003] The PROFIBUS physical layer supports two media: shielded twisted pair and optical fiber. RS485 transmission is the most widely used. Terminal resistors should be connected at both ends of the PROFIBUS cable. The terminal resistors are used to eliminate signal reflections caused by impedance discontinuity or impedance mismatch at both ends of the communication cable.
[0004] Furthermore, the PROFIBUS communication bus usually needs to be configured with terminal resistors and bias resistors to achieve: 1. Reduce signal reflection and improve signal quality; 2. Provide a stable idle voltage to help maintain signal integrity during long-distance transmission; the terminal resistor and bias resistor together form a terminal equivalent resistor that matches the characteristic impedance of the communication cable. Under the action of the terminal equivalent resistor, the quality and stability of PROFIBUS communication are effectively improved.
[0005] Specifically, in the prior art, please refer to Figure 1 As shown in the figure, the terminal equivalent resistance of PROFIBUS is a combination of three resistors, which are bias resistor R U , R D and terminal resistance R T The functions of the terminal equivalent resistance include providing a specific voltage when the network is idle, matching the characteristic impedance of the PROFIBUS communication cable, and preventing signal reflection.
[0006] As mentioned above, the terminal equivalent resistance design of PROFIBUS is to solve the signal reflection problem that may occur during the communication process. Signal reflection is mainly caused by impedance discontinuity and impedance mismatch. When the signal is transmitted to the terminal in the transmission line, if the terminal impedance is different from the characteristic impedance of the transmission line, it will cause reflection and distort the signal waveform. This distortion phenomenon may not be obvious when the transmission line is short, but as the transmission line becomes longer, the distortion will become more serious, and eventually lead to the inability to transmit data correctly. In order to solve this problem, a terminal equivalent resistance of the same size as the characteristic impedance of the cable needs to be connected across the end of the cable to make the impedance of the cable continuous, thereby eliminating signal reflection.
[0007] In addition, the PROFIBUS terminal equivalent resistance also provides a specific voltage when the network is idle. This voltage value is calculated based on the combination of the terminal equivalent resistance, where the terminal resistance is composed of three resistors R U , R D and R T They provide a voltage U when the network is idle 空闲 , the voltage value is calculated as follows: ; Among them, U P It is the voltage applied to the terminal equivalent resistance. This specific voltage provides higher interference suppression capability and a certain state, which is essential to ensure the stability and reliability of communication.
[0008] However, in actual engineering applications, the terminal equivalent resistance of PROFIBUS, that is, the bias resistance R U , R D and terminal resistance R T It only plays the function of matching terminal impedance, and in particular cannot automatically detect communication cable faults at the PROFIBUS communication site, which brings certain risks to the reliability and stability of PROFIBUS communication.
[0009] Therefore, the applicant hopes to seek technical solutions to improve the above technical problems. Summary of the invention
[0010] In view of this, the purpose of the present invention is to propose a PROFIBUS communication cable fault automatic detection circuit and method, which can realize the automatic detection of communication cable faults in the PROFIBUS communication site, and significantly improve the stability and reliability of PROFIBUS communication; and the terminal resistance matrix module proposed in the present invention has a simple structure, and the automatic fault detection method is simple and efficient, which is very suitable for large-scale promotion and application.
[0011] To this end, the technical solution adopted in the present invention is as follows: A PROFIBUS communication cable fault automatic detection circuit, the PROFIBUS communication cable includes a cable A and a cable B arranged between a first terminal device and a second terminal device; the first terminal device is provided with a terminal resistance matrix module, the first terminal resistance matrix module includes a first switch tube QU, a first resistor RU (as a bias resistor), a second resistor RT (as a bias resistor), a second switch tube QT, a third switch tube QD and a third resistor RD (as a terminal resistor) connected in sequence; the first switch tube QU is connected to the first terminal device input voltage UP, and the third resistor RD is grounded GND; wherein, The connecting branch between the first resistor RU and the second resistor RT is connected to the cable A, and is used to realize the transmission of the PROFIBUS communication signal RXD / TXD_P; The connecting branch between the second switch tube QT and the third switch tube QD is connected to the cable B to realize the transmission of the PROFIBUS communication signal RXD / TXD_N.
[0012] Preferably, the second terminal device is provided with a terminal resistance module, and the terminal resistance module includes a fourth resistor RU2, a fifth resistor RT2 and a sixth resistor RD2 connected in sequence; the fourth resistor RU2 is connected to the first terminal device input voltage UP2, and the sixth resistor RD2 is grounded GND; wherein, the connecting branch between the fourth resistor RU2 and the fifth resistor RT2 is connected to cable A; and the connecting branch between the fifth resistor RT2 and the sixth resistor RD2 is connected to cable B.
[0013] Preferably, the connecting branch between the first resistor RU and the second resistor RT, and the connecting branch between the second switch tube QT and the third switch tube QD are respectively connected to the communication interface; through the communication interface, the PROFIBUS communication signal RXD / TXD_P and the PROFIBUS communication signal RXD / TXD_N are respectively converted into RXD signal and TXD signal, and the RXD signal and TXD signal are sent to the MCU control module.
[0014] Preferably, the connecting branch between the first resistor RU and the second resistor RT and the connecting branch between the second switch tube QT and the third switch tube QD are also respectively provided with a voltage sampling branch U_RT+ and a voltage sampling branch U_RT-, and the voltage sampling branch U_RT+ and the voltage sampling branch U_RT- are respectively connected to a voltage sampling module, and the voltage sampling module sends the collected voltage sampling signal to the MCU control module.
[0015] Preferably, the MCU control module sends a drive enable signal CTR_PULL, a drive enable signal CTR_TER and a drive enable signal CTR_DOWN to the first switch tube QU, the second switch tube QT and the third switch tube QD respectively.
[0016] Preferably, a method for automatically detecting faults of a PROFIBUS communication cable is provided, which uses the above-mentioned automatic fault detection circuit for a PROFIBUS communication cable to automatically detect faults of a cable A and / or a cable B.
[0017] Preferably, when the cable B is automatically detected for a fault, the first terminal device input voltage UP is powered on, and the first switch tube QU and the second switch tube QT are set to an off state, and only the third switch tube QD is set to an on state, so that the first resistor RU and the second resistor RT are not connected to the communication network circuit, and only the third resistor RD is connected to the communication network circuit; the theoretical value of the voltage U_RT- is calculated by the following formula; ; The theoretical value of the voltage U_RT- is compared with the sampled value of the voltage U_RT-, and whether the cable B is faulty is determined based on the comparison result.
[0018] Preferably, if the theoretical value of the voltage U_RT- is consistent with the sampled value of the voltage U_RT-, it is determined that the cable B is in a normal communication state; if the theoretical value of the voltage U_RT- is inconsistent with the sampled value of the voltage U_RT- or the sampled value of the voltage U_RT- is 0, it is determined that the cable B is in a fault state.
[0019] Preferably, when the cable A is automatically fault-detected, the first terminal device input voltage UP is powered on, and the first switch tube QU is set to an off state, and the second switch tube QT and the third switch tube QD are set to an on state, so that the first resistor RU is not connected to the communication network circuit, and the second resistor RT and the third resistor RD are connected to the communication network circuit; the theoretical value of the voltage U_RT+ and the theoretical value of the voltage U_RT- are calculated by the following formulas: ; ; The theoretical value of the voltage U_RT+ and the theoretical value of the voltage U_RT- are compared with the sampled value of the voltage U_RT+ and the sampled value of the voltage U_RT-, respectively, and whether the cable A is faulty is determined based on the comparison results.
[0020] Preferably, if the theoretical value of the voltage U_RT+ is consistent with the sampled value of the voltage U_RT+, and the theoretical value of the voltage U_RT- is consistent with the sampled value of the voltage U_RT-, then it is determined that the cable A is in a normal communication state; if the theoretical value of the voltage U_RT+ is inconsistent with the sampled value of the voltage U_RT+ or the theoretical value of the voltage U_RT- is inconsistent with the sampled value of the voltage U_RT- or the sampled value of the voltage U_RT+ is equal to the theoretical value of the voltage U_RT-, then it is determined that the cable A is in a fault state.
[0021] The present invention creatively provides a unique terminal resistance matrix module in the proposed terminal device. The terminal resistance matrix module is configured by a combination of terminal resistance and bias resistance, and can realize automatic detection of communication cable faults in the PROFIBUS communication field, thereby significantly improving the stability and reliability of PROFIBUS communication. The terminal resistance matrix module proposed by the present invention has a simple structure, and the automatic fault detection method is simple and efficient, which is very suitable for large-scale promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the PROFIBUS terminal equivalent resistance structure adopted in the prior art; Figure 2 Schematic diagram of the connection structure of the terminal resistance matrix module in a specific embodiment of the present invention; Figure 3 It is a schematic diagram of the equivalent resistance structure of the PROFIBUS terminal in a specific implementation manner of the present invention; Figure 4 PROFIBUS terminal equivalent resistance structure diagram when automatically detecting the fault of cable B according to a specific embodiment of the present invention; Figure 5 is a schematic diagram of a detection process for automatically detecting a fault of cable B in a specific embodiment of the present invention (each step is described in a simplified manner); Figure 6 PROFIBUS terminal equivalent resistance structure diagram when automatically detecting the fault of cable A according to a specific embodiment of the present invention; Figure 7 It is a schematic diagram of the detection process when the cable A is automatically detected for faults according to a specific embodiment of the present invention (each step is described in a simplified manner). DETAILED DESCRIPTION
[0023] The embodiment of the present invention discloses an automatic fault detection circuit for a PROFIBUS communication cable. The PROFIBUS communication cable includes a cable A and a cable B arranged between a first terminal device and a second terminal device. The first terminal device is provided with a terminal resistance matrix module. The first terminal resistance matrix module includes a first switch tube QU, a first resistor RU (as a bias resistor), a second resistor RT (as a bias resistor), a second switch tube QT, a third switch tube QD and a third resistor RD (as a terminal resistor) connected in sequence. The first switch tube QU is connected to an input voltage UP of the first terminal device, and the third resistor RD is grounded GND. The connecting branch between the first resistor RU and the second resistor RT is connected to the cable A for realizing the transmission of a PROFIBUS communication signal RXD / TXD_P. The connecting branch between the second switch tube QT and the third switch tube QD is connected to the cable B for realizing the transmission of a PROFIBUS communication signal RXD / TXD_N.
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] See also Figure 2 and Figure 3 As shown, this embodiment provides a PROFIBUS communication cable fault automatic detection circuit, the PROFIBUS communication cable includes a cable A and a cable B arranged between a first terminal device and a second terminal device; the first terminal device is provided with a terminal resistance matrix module 10, the first terminal resistance matrix module 10 includes a first switch tube QU, a first resistor RU (as a bias resistor), a second resistor RT (as a bias resistor), a second switch tube QT, a third switch tube QD and a third resistor RD (as a terminal resistor) connected in sequence; the first switch tube QU is connected to the first terminal device input voltage UP, and the third resistor RD is grounded GND; wherein the first resistor RU is connected to The connecting branch between the second resistor RT is connected to the cable A, which is used to realize the transmission of the PROFIBUS communication signal RXD / TXD_P (where "P" represents the positive pole); the connecting branch between the second switch tube QT and the third switch tube QD is connected to the cable B, which is used to realize the transmission of the PROFIBUS communication signal RXD / TXD_N (where "N" represents the negative pole); preferably, in this embodiment, the MCU control module 40 sends the drive enable signal CTR_PULL, the drive enable signal CTR_TER and the drive enable signal CTR_DOWN to the first switch tube QU, the second switch tube QT and the third switch tube QD respectively.
[0026] Preferably, in this embodiment, the second terminal device is provided with a terminal resistance module, and the terminal resistance module includes a fourth resistor RU2, a fifth resistor RT2 and a sixth resistor RD2 connected in sequence; the fourth resistor RU2 is connected to the first terminal device input voltage UP2, and the sixth resistor RD2 is grounded GND; wherein, the connecting branch between the fourth resistor RU2 and the fifth resistor RT2 is connected to the cable A; and the connecting branch between the fifth resistor RT2 and the sixth resistor RD2 is connected to the cable B.
[0027] Preferably, in this embodiment, the connecting branch between the first resistor RU and the second resistor RT, and the connecting branch between the second switch tube QT and the third switch tube QD are respectively connected to the communication interface 20; the PROFIBUS communication signal RXD / TXD_P and the PROFIBUS communication signal RXD / TXD_N are respectively converted into RXD signal and TXD signal through the communication interface 20, and the RXD signal and TXD signal are sent to the MCU control module 40.
[0028] Preferably, in this embodiment, the connecting branch between the first resistor RU and the second resistor RT and the connecting branch between the second switch tube QT and the third switch tube QD are also respectively provided with a voltage sampling branch U_RT+ (where "+" represents the positive pole) and a voltage sampling branch U_RT- (where "-" represents the negative pole). The voltage sampling branch U_RT+ and the voltage sampling branch U_RT- are respectively connected to the voltage sampling module 30, and the voltage sampling module 30 sends the collected voltage sampling signal to the MCU control module 40.
[0029] It should be further explained that the communication interface 20 in this embodiment is mainly responsible for converting the standard PROFIBUS communication signals RXD / TXD_P and RXD / TXD_N into RXD and TXD signals, and the MCU control module 40 for data exchange; The voltage sampling module 30 in this embodiment is mainly responsible for collecting and conditioning the voltage signals of the RXD / TXD_P and RXD / TXD_N signals, and sending them to the MCU control module 40 module for analog quantity collection; The MCU control module 40 in this embodiment is mainly responsible for receiving and sending PROFIBUS communication data, collecting voltage signals of RXD / TXD_P and RXD / TXD_N signals, controlling the switching of the switch tubes QU, QT, QD, and software logic calculation.
[0030] Preferably, this embodiment further proposes a method for automatically detecting faults of a PROFIBUS communication cable, which automatically detects faults of the cable A and / or the cable B using the above automatic fault detection circuit for the PROFIBUS communication cable.
[0031] Preferably, in this embodiment, please refer to Figure 4 and Figure 5 As shown, when the cable B is automatically detected for a fault, the first terminal device input voltage UP is powered on, and the first switch tube QU and the second switch tube QT are set to the off state, and only the third switch tube QD is set to the on state, so that the first resistor RU and the second resistor RT are not connected to the communication network circuit, and only the third resistor RD is connected to the communication network circuit; the theoretical value of the voltage U_RT- is calculated by the following formula: ; The theoretical value of the voltage U_RT- is compared with the sampled value of the voltage U_RT-, and whether the cable B is faulty is determined based on the comparison; preferably, in this embodiment, if the theoretical value of the voltage U_RT- is consistent with the sampled value of the voltage U_RT-, it is determined that the cable B is in a normal communication state; if the theoretical value of the voltage U_RT- is inconsistent with the sampled value of the voltage U_RT- or the sampled value of the voltage U_RT- is 0, it is determined that the cable B is in a faulty state.
[0032] Preferably, in this embodiment, please refer to Figure 4 and Figure 5 As shown, when the cable A is automatically detected for fault, the first terminal device input voltage UP is powered on, and the first switch tube QU is set to the off state, and the second switch tube QT and the third switch tube QD are set to the on state, so that the first resistor RU is not connected to the communication network circuit, and the second resistor RT and the third resistor RD are connected to the communication network circuit; the theoretical value of the voltage U_RT+ and the theoretical value of the voltage U_RT- are calculated by the following formulas: ; ; The theoretical value of the voltage U_RT+ and the theoretical value of the voltage U_RT- are compared with the sampled value of the voltage U_RT+ and the sampled value of the voltage U_RT- respectively, and whether the cable A has a fault is determined based on the comparison; preferably, in this embodiment, if the theoretical value of the voltage U_RT+ is consistent with the sampled value of the voltage U_RT+, and the theoretical value of the voltage U_RT- is consistent with the sampled value of the voltage U_RT-, then it is determined that the cable A is in a normal communication state; if the theoretical value of the voltage U_RT+ is inconsistent with the sampled value of the voltage U_RT+ or the theoretical value of the voltage U_RT- is inconsistent with the sampled value of the voltage U_RT- or the sampled value of the voltage U_RT+ is equal to the theoretical value of the voltage U_RT-, then it is determined that the cable A is in a faulty state.
[0033] It should be noted that the "consistency" mentioned in the above-mentioned determination of the cable status in this embodiment includes the situation where the two are completely equal or basically close (the difference does not exceed 10%), and the inconsistency refers to the situation where the difference is huge (the difference between the two is obviously more than 30% or more).
[0034] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0035] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A PROFIBUS communication cable fault automatic detection circuit, wherein the PROFIBUS communication cable comprises a cable A and a cable B arranged between a first terminal device and a second terminal device; characterized in that: The first terminal device is provided with a terminal resistance matrix module, which includes a first switch tube QU, a first resistor RU, a second resistor RT, a second switch tube QT, a third switch tube QD and a third resistor RD connected in sequence; the first switch tube QU is connected to the first terminal device input voltage UP, and the third resistor RD is grounded GND; wherein, The connecting branch between the first resistor RU and the second resistor RT is connected to the cable A, and is used to realize the transmission of the PROFIBUS communication signal RXD / TXD_P; The connecting branch between the second switch tube QT and the third switch tube QD is connected to the cable B to realize the transmission of the PROFIBUS communication signal RXD / TXD_N.
2. The PROFIBUS communication cable fault automatic detection circuit according to claim 1, characterized in that: The second terminal device is provided with a terminal resistance module, which includes a fourth resistor RU2, a fifth resistor RT2 and a sixth resistor RD2 connected in sequence; the fourth resistor RU2 is connected to the first terminal device input voltage UP2, and the sixth resistor RD2 is grounded GND; wherein the connecting branch between the fourth resistor RU2 and the fifth resistor RT2 is connected to the cable A; and the connecting branch between the fifth resistor RT2 and the sixth resistor RD2 is connected to the cable B.
3. The PROFIBUS communication cable fault automatic detection circuit according to claim 1, characterized in that: The connection branch between the first resistor RU and the second resistor RT, and the connection branch between the second switch tube QT and the third switch tube QD are respectively connected to the communication interface; through the communication interface, the PROFIBUS communication signal RXD / TXD_P and the PROFIBUS communication signal RXD / TXD_N are respectively converted into RXD signal and TXD signal, and the RXD signal and TXD signal are sent to the MCU control module.
4. The PROFIBUS communication cable fault automatic detection circuit according to claim 3, characterized in that: The connecting branch between the first resistor RU and the second resistor RT and the connecting branch between the second switch tube QT and the third switch tube QD are also respectively provided with a voltage sampling branch U_RT+ and a voltage sampling branch U_RT-, and the voltage sampling branch U_RT+ and the voltage sampling branch U_RT- are respectively connected to the voltage sampling module, and the voltage sampling module sends the collected voltage sampling signal to the MCU control module.
5. The PROFIBUS communication cable fault automatic detection circuit according to claim 1, characterized in that: The MCU control module sends a driving enable signal CTR_PULL, a driving enable signal CTR_TER and a driving enable signal CTR_DOWN to the first switch tube QU, the second switch tube QT and the third switch tube QD respectively.
6. A method for automatically detecting cable faults for PROFIBUS communication, characterized in that: The PROFIBUS communication cable fault automatic detection circuit according to any one of claims 1 to 5 is used to perform automatic fault detection on cable A and / or cable B.
7. The automatic detection method for PROFIBUS communication cable fault according to claim 6, characterized in that: When the cable B is automatically detected for a fault, the first terminal device input voltage UP is powered on, and the first switch tube QU and the second switch tube QT are set to an off state, and only the third switch tube QD is set to an on state, so that the first resistor RU and the second resistor RT are not connected to the communication network circuit, and only the third resistor RD is connected to the communication network circuit; the theoretical value of the voltage U_RT- is calculated by the following formula; ; The theoretical value of the voltage U_RT- is compared with the sampled value of the voltage U_RT-, and whether the cable B is faulty is determined based on the comparison result.
8. The PROFIBUS communication cable fault automatic detection method according to claim 7, characterized in that: If the theoretical value of the voltage U_RT- is consistent with the sampled value of the voltage U_RT-, it is determined that the cable B is in a normal communication state. If the theoretical value of the voltage U_RT- is inconsistent with the sampled value of the voltage U_RT- or the sampled value of the voltage U_RT- is 0, it is determined that the cable B is in a fault state.
9. The automatic detection method for PROFIBUS communication cable fault according to claim 6, characterized in that: When the cable A is automatically fault-detected, the first terminal device input voltage UP is powered on, and the first switch tube QU is set to an off state, and the second switch tube QT and the third switch tube QD are set to an on state, so that the first resistor RU is not connected to the communication network circuit, and the second resistor RT and the third resistor RD are connected to the communication network circuit; the theoretical value of the voltage U_RT+ and the theoretical value of the voltage U_RT- are calculated by the following formulas respectively; ; ; The theoretical value of the voltage U_RT+ and the theoretical value of the voltage U_RT- are compared with the sampled value of the voltage U_RT+ and the sampled value of the voltage U_RT-, respectively, and whether the cable A is faulty is determined based on the comparison results.
10. The automatic detection method for PROFIBUS communication cable fault according to claim 9, characterized in that: If the theoretical value of voltage U_RT+ is consistent with the sampled value of voltage U_RT+, and the theoretical value of voltage U_RT- is consistent with the sampled value of voltage U_RT-, then it is determined that cable A is in a normal communication state. If the theoretical value of voltage U_RT+ is inconsistent with the sampled value of voltage U_RT+ or the theoretical value of voltage U_RT- is inconsistent with the sampled value of voltage U_RT- or the sampled value of voltage U_RT+ is equal to the theoretical value of voltage U_RT-, then it is determined that cable A is in a fault state.
Citation Information
Patent Citations
Communication cable breaking and wrongly connected line sequence measuring method and system
CN109254224A
Cable outgoing line tail end detection system, method and device, electronic equipment and medium
CN115308642A
Cable detection equipment and detection system
CN116953570A
Fault detection circuit and method and three-level inverter
CN118191467A
Line fault detection circuit
US20080074153A1