An automatic detection circuit and method for PROFIBUS communication cable faults
By introducing a terminal resistance matrix module into the PROFIBUS communication system, the automatic detection of communication cable failures is realized using voltage sampling and calculation, and the problem of undetectable in the prior art is solved, and the stability and reliability of the system are improved.
Patent Information
- Application Number
- CN202411863647.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-12-17
AI Technical Summary
In the existing PROFIBUS communication system, the terminal equivalent resistor cannot automatically detect communication cable failure, affecting the stability and reliability of communication.
A terminal resistance matrix module is set up in the terminal device, including a combination of switching tubes and resistors, and automatic detection of cable failures is achieved through voltage sampling and calculation.
It realizes automatic detection of communication cable faults in PROFIBUS communication site, improves communication stability and reliability, and the detection method is simple and efficient.
Smart Images

Figure CN119727786B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of PROFIBUS communication, and particularly relates to an automatic detection circuit and method for cable faults in PROFIBUS communication. Background Art
[0002] PROFIBUS (Process Field Bus) is a fieldbus standard widely used in the industrial automation field. It is formulated by the PROFIBUS International organization (PI) to achieve efficient communication and interoperability between devices. With its characteristics of high efficiency, flexibility and wide compatibility, PROFIBUS communication technology occupies an important position in the industrial automation field and supports 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, among which the RS485 transmission mode is the most widely used. Terminal resistors should be connected at both ends of the PROFIBUS cable. Among them, the terminal resistor is used to eliminate signal reflection 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, which helps to maintain signal integrity during long-distance transmission; The terminal resistor and the 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, the terminal equivalent resistor of PROFIBUS is a combination composed of three resistors, which are the bias resistor R U , R D and the terminal resistor R T . The functions of the terminal equivalent resistor include providing a specific voltage when the network is idle and matching the characteristic impedance of the PROFIBUS communication cable to prevent signal reflection.
[0006] As described above, the terminal equivalent resistance design of PROFIBUS is to solve the signal reflection problem that may occur during communication. 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, reflection will occur, distorting the signal waveform. This distortion may not be obvious when the transmission line is short, but as the transmission line lengthens, the distortion becomes more serious, ultimately resulting in incorrect data transmission. 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 terminal equivalent resistance of PROFIBUS also provides a specific voltage when the network is idle. This voltage value is calculated based on the combination of the terminal equivalent resistance. Among them, the terminal resistance consists of three resistors R U , R D and R T . They provide a voltage U 空闲 when the network is idle. The calculation formula for this voltage value is as follows:
[0008] ;
[0009] Among them, U P is the voltage applied to the terminal equivalent resistance. This specific voltage provides high interference suppression ability and a definite state, which is crucial for ensuring the stability and reliability of communication.
[0010] However, in actual engineering applications, the terminal equivalent resistance of PROFIBUS, that is, the bias resistors R U , R D and the terminal resistor R T only function to match the terminal impedance, especially unable to automatically detect faults in the communication cables at the PROFIBUS communication site, posing certain potential hazards to the reliability and stability of PROFIBUS communication.
[0011] Therefore, the applicant hopes to seek a technical solution to improve the above technical problems. Summary of the Invention
[0012] In view of this, the purpose of the present invention is to propose an automatic cable fault detection circuit and method for PROFIBUS communication, which can realize the automatic detection of faults in communication cables at the PROFIBUS communication site, significantly improving the stability and reliability of PROFIBUS communication; and the terminal resistor matrix module proposed by the present invention has a simple structure, and at the same time, the automatic fault detection method is simple and efficient, which is very suitable for large-scale promotion and application.
[0013] To this end, the technical solution adopted by the present invention is as follows:
[0014] An automatic cable fault detection circuit for PROFIBUS communication. The PROFIBUS communication cable includes cable A and cable B disposed 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 switching tube QU, a first resistor RU (as a bias resistor), a second resistor RT (as a bias resistor), a second switching tube QT, a third switching tube QD, and a third resistor RD (as a terminal resistance) connected in sequence. The first switching tube QU is connected to the input voltage UP of the first terminal device, and the third resistor RD is grounded to GND. Among them,
[0015] The connection branch between the first resistor RU and the second resistor RT is connected to cable A for transmitting the PROFIBUS communication signal RXD / TXD_P.
[0016] The connection branch between the second switching tube QT and the third switching tube QD is connected to cable B for transmitting the PROFIBUS communication signal RXD / TXD_N.
[0017] Preferably, the second terminal device is provided with a terminal resistance module. 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 input voltage UP2 of the first terminal device, and the sixth resistor RD2 is grounded to GND. Among them, the connection branch between the fourth resistor RU2 and the fifth resistor RT2 is connected to cable A; the connection branch between the fifth resistor RT2 and the sixth resistor RD2 is connected to cable B.
[0018] Preferably, the connection branch between the first resistor RU and the second resistor RT, and the connection branch between the second switching tube QT and the third switching tube QD are respectively connected to a communication interface; through the communication interface, the PROFIBUS communication signals RXD / TXD_P and RXD / TXD_N are respectively converted into RXD signals and TXD signals, and the RXD signals and TXD signals are sent to the MCU control module.
[0019] Preferably, the connection branch between the first resistor RU and the second resistor RT and the connection branch between the second switching tube QT and the third switching tube QD are also respectively provided with a voltage sampling branch U_RT+ and a voltage sampling branch U_RT-. 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 signals to the MCU control module.
[0020] Preferably, the MCU control module respectively sends drive enable signals CTR_PULL, CTR_TER, and CTR_DOWN to the first switch tube QU, the second switch tube QT, and the third switch tube QD.
[0021] Preferably, a method for automatically detecting faults in a PROFIBUS communication cable uses the above-described automatic PROFIBUS communication cable fault detection circuit to automatically detect faults in cable A and / or cable B.
[0022] Preferably, when automatically detecting faults in cable B, power on the input voltage UP of the first terminal device, and set the first switch tube QU and the second switch tube QT to the off state, and only set the third switch tube QD 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; calculate the theoretical value of the voltage U_RT- through the following formula;
[0023] ;
[0024] Compare the theoretical value of the voltage U_RT- with the sampled value of the voltage U_RT-, and determine whether a fault has occurred in the cable B according to the comparison result.
[0025] 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.
[0026] Preferably, when automatically detecting faults in cable A, power on the input voltage UP of the first terminal device, and set the first switch tube QU to the off state, and set the second switch tube QT and the third switch tube QD 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; calculate the theoretical value of the voltage U_RT+ and the theoretical value of the voltage U_RT- respectively through the following formula:
[0027] ;
[0028] ;
[0029] Compare the theoretical value of the voltage U_RT+ and the theoretical value of the voltage U_RT- with the sampled value of the voltage U_RT+ and the sampled value of the voltage U_RT- respectively, and determine whether a fault has occurred in the cable A according to the comparison result.
[0030] Preferably, 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-, it is determined that the 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-, it is determined that the cable A is in a fault state.
[0031] The present invention creatively provides a unique terminal resistor matrix module in the terminal device. The terminal resistor matrix module is composed of a combination of terminal resistors and bias resistors, which can realize the automatic detection of communication cable faults in the PROFIBUS communication field, significantly improving the stability and reliability of PROFIBUS communication. Moreover, the terminal resistor matrix module proposed by the present invention has a simple structure, and the automatic fault detection method is simple and efficient, making it very suitable for large-scale popularization and application. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a schematic diagram of the equivalent resistor structure of the PROFIBUS terminal adopted in the prior art;
[0033] Figure 2 is a schematic diagram of the connection structure of the terminal resistor matrix module in the specific embodiment of the present invention;
[0034] Figure 3 is a schematic diagram of the equivalent resistor structure of the PROFIBUS terminal in the specific embodiment of the present invention;
[0035] Figure 4 is a schematic diagram of the equivalent resistor structure of the PROFIBUS terminal when automatically detecting a fault in cable B in the specific embodiment of the present invention;
[0036] Figure 5 is a schematic diagram of the detection flow when automatically detecting a fault in cable B in the specific embodiment of the present invention (each step is described in a simplified manner);
[0037] Figure 6 is a schematic diagram of the equivalent resistor structure of the PROFIBUS terminal when automatically detecting a fault in cable A in the specific embodiment of the present invention;
[0038] Figure 7 is a schematic diagram of the detection flow when automatically detecting a fault in cable A in the specific embodiment of the present invention (each step is described in a simplified manner). DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] An embodiment of the present invention discloses an automatic fault detection circuit for a PROFIBUS communication cable. The PROFIBUS communication cable includes cable A and cable B disposed 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 switching tube QU, a first resistor RU (serving as a bias resistor), a second resistor RT (serving as a bias resistor), a second switching tube QT, a third switching tube QD, and a third resistor RD (serving as a terminal resistance) connected in sequence. The first switching tube QU is connected to the input voltage UP of the first terminal device, and the third resistor RD is grounded to GND. Among them, the connection branch between the first resistor RU and the second resistor RT is connected to cable A for transmitting the PROFIBUS communication signal RXD / TXD_P. The connection branch between the second switching tube QT and the third switching tube QD is connected to cable B for transmitting the PROFIBUS communication signal RXD / TXD_N.
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0041] Please refer to Figure 2 and Figure 3 As shown, this embodiment provides an automatic fault detection circuit for a PROFIBUS communication cable. The PROFIBUS communication cable includes cable A and cable B disposed 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 switching tube QU, a first resistor RU (serving as a bias resistor), a second resistor RT (serving as a bias resistor), a second switching tube QT, a third switching tube QD, and a third resistor RD (serving as a terminal resistance) connected in sequence. The first switching tube QU is connected to the input voltage UP of the first terminal device, and the third resistor RD is grounded to GND. Among them, the connection branch between the first resistor RU and the second resistor RT is connected to cable A for transmitting the PROFIBUS communication signal RXD / TXD_P (where "P" represents the positive electrode here). The connection branch between the second switching tube QT and the third switching tube QD is connected to cable B for transmitting the PROFIBUS communication signal RXD / TXD_N (where "N" represents the negative electrode here). Preferably, in this embodiment, the MCU control module 40 respectively sends drive enable signals CTR_PULL, drive enable signal CTR_TER, and drive enable signal CTR_DOWN to the first switching tube QU, the second switching tube QT, and the third switching tube QD.
[0042] Preferably, in this embodiment, the second terminal device is provided with a terminal resistance module. 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 input voltage UP2 of the first terminal device, and the sixth resistor RD2 is grounded to GND. Among them, the connection branch between the fourth resistor RU2 and the fifth resistor RT2 is connected to the cable A; the connection branch between the fifth resistor RT2 and the sixth resistor RD2 is connected to the cable B.
[0043] Preferably, in this embodiment, the connection branch between the first resistor RU and the second resistor RT, and the connection branch between the second switching tube QT and the third switching tube QD are respectively connected to the communication interface 20. The PROFIBUS communication signals RXD / TXD_P and RXD / TXD_N are respectively converted into RXD signals and TXD signals through the communication interface 20, and the RXD signals and TXD signals are sent to the MCU control module 40.
[0044] Preferably, in this embodiment, the connection branch between the first resistor RU and the second resistor RT and the connection branch between the second switching tube QT and the third switching tube QD are also respectively provided with a voltage sampling branch U_RT+ (the "+" here represents the positive pole) and a voltage sampling branch U_RT- (the "-" here 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 signals to the MCU control module 40.
[0045] It should be further noted 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 performing data exchange with the MCU control module 40;
[0046] 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 for analog quantity acquisition;
[0047] The MCU control module 40 in this embodiment is mainly responsible for the transceiver of PROFIBUS communication data, the acquisition of the voltage signals of the RXD / TXD_P and RXD / TXD_N signals, the switching control of each switching tube QU, QT, QD, and software logic calculation.
[0048] Preferably, this embodiment also proposes an automatic fault detection method for PROFIBUS communication cables, which automatically detects faults in cable A and / or cable B according to the above automatic fault detection circuit for PROFIBUS communication cables.
[0049] Preferably, in this embodiment, please refer to Figure 4 and Figure 5 As shown, when automatically detecting faults in cable B, power on the input voltage UP of the first terminal device, and set the first switch tube QU and the second switch tube QT to the off state, and only set the third switch tube QD 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; calculate the theoretical value of the voltage U_RT- through the following formula:
[0050] ;
[0051] Compare the theoretical value of the voltage U_RT- with the sampled value of the voltage U_RT-, and determine whether cable B has a fault according to the comparison result; 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 cable B is in a normal communication state, and 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 cable B is in a fault state.
[0052] Preferably, in this embodiment, please refer to Figure 4 and Figure 5 As shown, when automatically detecting faults in cable A, power on the input voltage UP of the first terminal device, and set the first switch tube QU to the off state, and set the second switch tube QT and the third switch tube QD 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; calculate the theoretical value of the voltage U_RT+ and the theoretical value of the voltage U_RT- respectively through the following formula:
[0053] ;
[0054] ;
[0055] Compare the theoretical values of the voltage U_RT+ and the voltage U_RT- with the sampled values of the voltage U_RT+ and the voltage U_RT- respectively, and determine whether cable A has a fault according to the comparison results. 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-, it is determined that 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-, it is determined that cable A is in a fault state.
[0056] It should be specifically noted that, in the above determination of the cable state in this embodiment, the "consistency" includes the cases where the two are exactly equal or basically close (the difference does not exceed 10%), and the inconsistency means a huge difference (the difference between the two is significantly more than 30% or more).
[0057] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any reference signs in the claims should not be regarded as limiting the claimed rights.
[0058] In addition, it should be understood that although this specification is described according to embodiments, not every embodiment only contains an independent technical solution. This narrative way of the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments 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 resistor matrix module. The terminal resistor matrix module of the first terminal device includes a first switching tube QU, a first resistor RU, a second resistor RT, a second switching tube QT, a third switching tube QD, and a third resistor RD connected in sequence. The first switching tube QU is connected to the input voltage UP of the first terminal device, and the third resistor RD is grounded to GND. Among them, The connection branch between the first resistor RU and the second resistor RT is connected to the cable A for transmitting the PROFIBUS communication signal RXD / TXD_P. The connection branch between the second switching tube QT and the third switching tube QD is connected to the cable B for transmitting the PROFIBUS communication signal RXD / TXD_N.
2. The automatic fault detection circuit for PROFIBUS communication cables according to claim 1, characterized in that The second terminal device is provided with a terminal resistor module. The terminal resistor 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 input voltage UP2 of the first terminal device, and the sixth resistor RD2 is grounded to GND. Among them, the connection branch between the fourth resistor RU2 and the fifth resistor RT2 is connected to the cable A; the connection branch between the fifth resistor RT2 and the sixth resistor RD2 is connected to the cable B.
3. The automatic fault detection circuit for PROFIBUS communication cables according to claim 2, wherein The connection branch between the first resistor RU and the second resistor RT, and the connection branch between the second switching tube QT and the third switching tube QD are respectively connected to the communication interface; the PROFIBUS communication signal RXD / TXD_P and the PROFIBUS communication signal RXD / TXD_N are respectively converted into the RXD signal and the TXD signal through the communication interface, and the RXD signal and the 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 connection branch between the first resistor RU and the second resistor RT and the connection branch between the second switching tube QT and the third switching tube QD are also respectively provided with a voltage sampling branch U_RT+ and a voltage sampling branch U_RT-. 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 4, characterized in that: The MCU control module respectively sends drive enable signals CTR_PULL, drive enable signal CTR_TER signal, and drive enable signal CTR_DOWN to the first switching tube QU, the second switching tube QT, and the third switching tube QD.
6. A method for automatically detecting cable faults for PROFIBUS communication, characterized in that: The PROFIBUS communication cable fault automatic detection circuit according to claim 4 or 5 is used to automatically detect faults in the cable A and / or the cable B; when automatically detecting faults in the cable B, the input voltage UP of the first terminal device is powered on, and the first switching tube QU and the second switching tube QT are set to the off state, and only the third switching 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 through the following formula; ; Comparing the theoretical value of the voltage U_RT- with the sampled value of the voltage U_RT-, and determining whether the cable B is faulty based on the comparison; When cable A is automatically fault-detected, the first terminal device input voltage UP is powered on, 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 values of the voltage U_RT+ and the theoretical values of the voltage U_RT- are calculated respectively 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.
7. The method for automatically detecting PROFIBUS communication cable faults according to claim 6, 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.
8. The automatic fault detection method for PROFIBUS communication cables according to claim 6, characterized in that, 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.
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