Universal input / output module and fault diagnosis method
By sharing common circuits in general input and output modules and providing fault diagnosis methods, the problems of complex architecture and insufficient fault diagnosis are solved, and the effect of reducing manufacturing costs and improving performance is achieved.
Patent Information
- Application Number
- CN202411951595.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-27
AI Technical Summary
The traditional general-purpose input and output module has complex architecture and complex circuits, which leads to high manufacturing costs and lacks the diagnosis of circuit failures from a functional safety perspective, resulting in poor performance.
A general input and output module is designed, in which the analog input circuit, analog output circuit, switching input circuit and switching output circuit share a common circuit, simplifying the circuit structure, reducing the number of devices, and providing a fault diagnosis method.
By sharing common circuits, the manufacturing cost of the module is reduced, and the performance of the module is improved through fault diagnosis methods, so that faults can be detected and troubleshooted in a timely manner.
Smart Images

Figure CN119788081A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of safety instrument systems, and in particular to a universal input and output module and a fault diagnosis method. Background Art
[0002] In safety instrumented systems, in order to achieve input and output standardization and improve the flexibility and efficiency of field applications, a universal input and output module can be used. The inventors have found that the traditional universal input and output module has a complex architecture and a complex circuit, which leads to high manufacturing costs of the universal input and output module. Summary of the invention
[0003] In view of this, an embodiment of the present application provides a universal input-output module and a fault diagnosis method. The universal input-output module provided by the present application has a common universal circuit in the analog input circuit, analog output circuit, switch input circuit and switch output circuit, thereby reducing the devices used in constructing the module, simplifying the circuit of the module, and reducing the manufacturing cost of the module.
[0004] To achieve the above objectives, the present application provides the following technical solutions:
[0005] A general input and output module, comprising:
[0006] An analog input circuit, an analog output circuit, a switch input circuit, a switch output circuit, a differential amplifier module, a first analog-to-digital converter, a second analog-to-digital converter, a first control module, and a second control module;
[0007] The analog input circuit comprises a first switch, a universal circuit, a second switch and a first resistor connected in series in sequence, and one end of the first resistor not connected to the second switch is grounded;
[0008] The universal circuit comprises a second resistor, a diode and a field instrument connected in series in sequence;
[0009] The analog output circuit comprises a current source, the universal circuit and a third switch connected in series in sequence, and one end of the third switch not connected to the universal circuit is grounded;
[0010] The switch input circuit comprises the first switch, the universal circuit, the fourth switch, the third resistor and the fourth resistor which are connected in series in sequence, and one end of the fourth resistor which is not connected to the third resistor is grounded;
[0011] The switch output circuit comprises a first switch, the general circuit and the third switch connected in series in sequence, and one end of the third switch not connected to the general circuit is grounded;
[0012] The first input end of the differential amplifier module is connected to the end of the second resistor that is not connected to the diode, the second input end is connected to the connection between the second resistor and the diode, and the output end is connected to the first analog-to-digital converter;
[0013] The first control module is used to control the opening and closing states of the second switch, the third switch and the fourth switch, and receive data from the first analog-to-digital converter;
[0014] A first end of the second analog-to-digital converter is connected to a connection point between the first resistor and the second switch, and a second end of the second analog-to-digital converter is connected to a connection point between the third resistor and the fourth resistor;
[0015] The second control module is used to control the states of the current source and the first switch, and receive data from the second analog-to-digital converter.
[0016] The above-mentioned universal input and output module, optionally, the differential amplifier module includes:
[0017] a fifth resistor, a sixth resistor and a differential amplifier;
[0018] One end of the fifth resistor is connected to the positive input terminal of the differential amplifier, and the other end serves as the first input terminal of the differential amplifier;
[0019] One end of the sixth resistor is connected to the negative input end of the differential amplifier, and the other end serves as the second input end of the differential amplifier.
[0020] A fault diagnosis method is applied to the above-mentioned universal input and output module, the method comprising:
[0021] Applying a preset first diagnostic strategy to diagnose the analog input circuit to obtain a first diagnostic result of the analog input circuit;
[0022] Applying a preset second diagnostic strategy to diagnose the analog output circuit to obtain a second diagnostic result of the analog output circuit;
[0023] Applying a preset third diagnostic strategy to diagnose the switch value input circuit to obtain a third diagnostic result of the switch value input circuit;
[0024] A preset fourth diagnostic strategy is applied to diagnose the switching value output circuit to obtain a fourth diagnostic result of the switching value output circuit.
[0025] In the above method, optionally, the applying a preset first diagnostic strategy to diagnose the analog input circuit to obtain a first diagnostic result of the analog input circuit includes:
[0026] Based on the first diagnostic strategy, collecting a first differential voltage across the second resistor, and determining a first current based on the first differential voltage;
[0027] collecting a first voltage of the first resistor, and determining a second current based on the first voltage;
[0028] The first current and the second current are used to perform fault diagnosis on the analog input circuit to obtain a first diagnosis result of the analog input circuit.
[0029] In the above method, optionally, the using the first current and the second current to perform fault diagnosis on the analog input circuit to obtain a first diagnosis result of the analog input circuit includes:
[0030] Obtaining a first deviation value between the first current and the second current; when the first deviation value exceeds a first preset deviation value, generating a first diagnostic conclusion indicating that a fault has occurred in the analog input circuit; when the first deviation value does not exceed the first preset deviation value, generating a first diagnostic conclusion indicating that a fault has not occurred in the analog input circuit;
[0031] When the first current is in a preset first current interval, a second diagnostic conclusion is generated, indicating that the line of the analog input circuit is fault-free; when the first current is less than a minimum value in the first current interval, a second diagnostic conclusion is generated, indicating that a disconnection fault occurs in the analog input circuit; when the first current is greater than a maximum value in the first current interval, a second diagnostic conclusion is generated, indicating that a short circuit fault occurs in the analog input circuit;
[0032] Based on the first diagnostic conclusion and the second diagnostic conclusion, a first diagnostic result of the analog input circuit is generated.
[0033] In the above method, optionally, the applying a preset second diagnostic strategy to diagnose the analog output circuit to obtain a second diagnostic result of the analog output circuit includes:
[0034] Based on the second diagnostic strategy, collecting a second differential voltage across the second resistor, and determining a third current based on the second differential voltage;
[0035] controlling the current source to output a current, and determining the output current of the current source as a fourth current;
[0036] The third current and the fourth current are used to perform fault diagnosis on the analog output circuit to obtain a second diagnosis result of the analog output circuit.
[0037] In the above method, optionally, the using the third current and the fourth current to perform fault diagnosis on the analog output circuit to obtain a second diagnosis result of the analog output circuit includes:
[0038] Acquire a second deviation value between the third current and the fourth current; when the second deviation value exceeds a second preset deviation value, generate a third diagnostic conclusion indicating that the analog output circuit has a fault; when the second deviation value does not exceed the second preset deviation value, generate a third diagnostic conclusion indicating that the analog output circuit has not a fault;
[0039] When the third current is less than the preset detection current, a fourth diagnosis conclusion is generated indicating that a disconnection fault occurs in the analog output circuit; when the third current is not less than the preset detection current, a fourth diagnosis conclusion is generated indicating that no fault occurs in the analog output circuit;
[0040] Based on the third diagnostic conclusion and the fourth diagnostic conclusion, a second diagnostic result of the analog output circuit is generated.
[0041] In the above method, optionally, the applying a preset third diagnostic strategy to diagnose the switch value input circuit to obtain a third diagnostic result of the switch value input circuit includes:
[0042] Based on the third diagnostic strategy, collecting a third differential voltage across the second resistor, and determining a fourth current based on the third differential voltage;
[0043] Performing calculation on the fourth current, the resistance value of the third resistor, and the resistance value of the fourth resistor to obtain a first voltage;
[0044] Using the second analog-to-digital converter to sample a first sampled voltage on the fourth resistor, and performing calculations on the first sampled voltage, a resistance value of the third resistor, and a resistance value of the fourth resistor to obtain a second voltage;
[0045] Connecting the field instrument to a preset resistor, collecting an output current of the field instrument, and using the output current to obtain first diagnostic information indicating whether there is a line fault in the switch input circuit;
[0046] Based on the first voltage and the second voltage, a fault diagnosis is performed on the switch value input circuit to obtain second diagnostic information of the switch value input circuit;
[0047] A third diagnosis result is generated based on the first diagnosis information and the second diagnosis information.
[0048] In the above method, optionally, the performing fault diagnosis on the switch input circuit based on the first voltage and the second voltage to obtain second diagnostic information of the switch input circuit includes:
[0049] Determine a voltage deviation value between the first voltage and the second voltage; when the voltage deviation value exceeds a preset voltage deviation value, generate second diagnostic information indicating that a fault has occurred in the switch input circuit; when the voltage deviation value does not exceed the preset voltage deviation value, generate second diagnostic information indicating that a fault has not occurred in the switch input circuit.
[0050] In the above method, optionally, the applying a preset fourth diagnostic strategy to diagnose the switch value output circuit to obtain a fourth diagnostic result of the switch value output circuit includes:
[0051] Based on the fourth diagnostic strategy, collecting a fourth differential voltage across the second resistor, and determining a fifth current based on the fourth differential voltage;
[0052] Based on the fifth current, performing a line fault judgment on the switching value output circuit to obtain a line fault judgment result of the switching value output circuit;
[0053] controlling the first switch, the third switch, and the fourth switch to be in a closed state, using the second analog-to-digital converter to sample a second sampled voltage on the fourth resistor, performing calculations on the second sampled voltage, the resistance value of the third resistor, and the resistance value of the fourth resistor to obtain a third voltage, and obtaining a first switch diagnosis sub-result based on the third voltage;
[0054] controlling the first switch and the fourth switch to be in a closed state, and controlling the third switch to be in an open state, using the second analog-to-digital converter to sample a third sampled voltage on the fourth resistor, performing calculations on the third sampled voltage, a resistance value of the third resistor, and a resistance value of the fourth resistor to obtain a fourth voltage, and obtaining a second switch diagnosis sub-result based on the third voltage;
[0055] controlling the first switch and the third switch to be in an open state, and controlling the fourth switch to be in a closed state, using the second analog-to-digital converter to sample a fourth sampled voltage on the fourth resistor, performing calculations on the fourth sampled voltage, a resistance value of the third resistor, and a resistance value of the fourth resistor to obtain a fifth voltage, and obtaining a third switch diagnosis sub-result based on the fifth voltage;
[0056] A fourth diagnosis result of the switch output circuit is obtained based on the line fault judgment result, the first switch diagnosis sub-result, the second switch diagnosis sub-result and the third switch diagnosis sub-result.
[0057] Compared with the prior art, this application has the following advantages:
[0058] The present application provides a universal input-output module and a fault diagnosis method, wherein the universal input-output module comprises an analog input circuit, an analog output circuit, a switch input circuit, a switch output circuit, a differential amplifier module, a first analog-to-digital converter, a second analog-to-digital converter, a first control module and a second control module; wherein a common universal circuit exists in the analog input circuit, the analog output circuit, the switch input circuit and the switch output circuit, thereby reducing the number of components of the universal input-output module and also reducing the architectural complexity of the universal input-output module, thereby reducing the manufacturing cost of the universal input-output module; and the fault diagnosis method is used to diagnose whether there is a fault in the universal input-output module, timely troubleshoot the universal input-output module, and improve the performance of the universal input-output module. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] 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 embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0060] Figure 1 A circuit structure diagram of a universal input-output module provided in an embodiment of the present application;
[0061] Figure 2 A method flow chart of a fault diagnosis method provided in an embodiment of the present application;
[0062] Figure 3 An example diagram of an analog input path provided in an embodiment of the present application;
[0063] Figure 4 A flowchart of using a first current and a second current to perform fault diagnosis on an analog input circuit to obtain a first diagnosis result of the analog input circuit provided in an embodiment of the present application;
[0064] Figure 5 An example diagram of an analog output path provided in an embodiment of the present application;
[0065] Figure 6 A flowchart of using a third current and a fourth current to perform fault diagnosis on an analog output circuit to obtain a second diagnosis result of the analog output circuit provided in an embodiment of the present application;
[0066] Figure 7An example diagram of a switch input path provided in an embodiment of the present application;
[0067] Figure 8 A flowchart of applying a preset third diagnostic strategy to diagnose a switch value input circuit and obtaining a third diagnostic result of the switch value input circuit provided in an embodiment of the present application;
[0068] Fig. 9 An example diagram of a switch output path provided in an embodiment of the present application;
[0069] Fig.10 A flowchart of applying a preset fourth diagnostic strategy to diagnose a switch output circuit to obtain a fourth diagnostic result of the switch output circuit is provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0072] Terminology explanation:
[0073] CPLD: Complex Programmable Logic Device.
[0074] ADC: Analog to digital converter.
[0075] In the safety instrument system, the implementation scheme of the general input and output module is complex in architecture and its circuit lines are complex, resulting in high production costs. In addition, the current general input and output modules do not diagnose circuit faults from the perspective of functional safety, resulting in poor performance of the general input and output modules.
[0076] In order to solve the above-mentioned problems, the present application provides a universal input-output module and a fault diagnosis method applied to the universal input-output module. In the scheme provided by the present application, there is a common universal circuit between the analog input circuit, the analog output circuit, the switch input circuit and the switch output circuit of the universal input-output module, and each circuit is constructed using resistors and switches. The circuit architecture of the entire universal input-output module is simple and the number of components used is small, which reduces the production cost of the universal input-output module. In addition, the scheme also provides a fault diagnosis method for the universal input-output module, which can detect whether there is a fault in the universal input-output module, timely troubleshoot the universal input-output module, and improve the performance of the universal input-output module.
[0077] Reference Figure 1 , is a circuit structure diagram of a universal input-output module provided in an embodiment of the present application, and is specifically described as follows:
[0078] The universal input-output module provided in the present application includes: an analog input circuit, an analog output circuit, a switch input circuit, a switch output circuit, a differential amplifier module, a first analog-to-digital converter, a second analog-to-digital converter, a first control module and a second control module.
[0079] The analog input circuit includes a first switch SW1, a universal circuit 101, a second switch SW1 and a first resistor R1 connected in series; the end of the first resistor R1 not connected to the second switch SW2 is grounded. The end of the first switch SW1 not connected to the universal circuit 101 is connected to a 24V DC power supply.
[0080] The universal circuit 101 includes a second resistor R2, a diode D1 and a field instrument connected in series.
[0081] The analog output circuit includes a current source, a universal circuit 101 and a third switch SW3 connected in series, and the end of the third switch SW3 not connected to the universal circuit 101 is grounded. The end of the current source not connected to the universal circuit 101 is connected to a 24V DC power supply.
[0082] The switch input circuit includes the first switch SW1, the universal circuit 101, the fourth switch SW4, the third resistor R3 and the fourth resistor R4 which are connected in series in sequence. One end of the fourth resistor R4 which is not connected to the third resistor R3 is grounded.
[0083] The switch output circuit includes a first switch SW1 , a universal circuit 101 , and a third switch R3 which are connected in series in sequence. One end of the third switch R3 which is not connected to the universal circuit 101 is grounded.
[0084] The first input terminal of the differential amplifier module 102 is connected to the end of the second resistor R2 that is not connected to the diode D1 , the second input terminal is connected to the connection between the second resistor R2 and the diode D1 , and the output terminal is connected to the first analog-to-digital converter ADC1 .
[0085] The first control module CPLD1 is used for controlling the opening and closing states of the second switch SW2 , the third switch SW3 and the fourth switch SW4 , and receiving data from the first analog-to-digital converter ADC1 .
[0086] A first end of the second analog-to-digital converter CPLD2 is connected to a connection point between the first resistor R1 and the second switch SW2 , and a second end of the second analog-to-digital converter CPLD2 is connected to a connection point between the third resistor R3 and the fourth resistor R4 .
[0087] The second control module CPLD2 is used to control the states of the current source and the first switch, and receive data from the second analog-to-digital converter.
[0088] The differential amplifier module 102 includes: a fifth resistor R5, a sixth resistor R6, and a differential amplifier; one end of the fifth resistor R5 is connected to the positive input end of the differential amplifier, and the other end is used as the first input end of the differential amplifier; one end of the sixth resistor R6 is connected to the negative input end of the differential amplifier, and the other end is used as the second input end of the differential amplifier. The fifth resistor R5 and the sixth resistor R6 are used to limit the loop circuit and protect the differential amplifier of the subsequent stage.
[0089] The first control module and the second control module in the universal input and output module provided in the present application control devices such as switches and ADCs through a digital interface. The first control module and the second control module are independent of each other. The first control module and the second control module can be CPLDs or microcontrollers.
[0090] In the universal input and output module provided in the embodiment of the present application, the analog input circuit realizes the analog input function, the analog output circuit realizes the analog output function, the switch input circuit realizes the switch input function, and the switch output circuit realizes the switch output function.
[0091] In the embodiment provided in the present application, the universal input-output module includes an analog input circuit, an analog output circuit, a switch input circuit, a switch output circuit, a differential amplifier module, a first analog-to-digital converter, a second analog-to-digital converter, a first control module and a second control module; wherein, there are common universal circuits in the analog input circuit, the analog output circuit, the switch input circuit and the switch output circuit, thereby reducing the devices of the universal input-output module and also reducing the architectural complexity of the universal input-output module, thereby reducing the manufacturing cost of the universal input-output module.
[0092] Another implementation provided by the present application provides a fault diagnosis method, which is applied to a universal input-output module. Different functions in the universal input-output module have different diagnosis strategies. Optionally, different functions may need to be configured with different signal types when performing diagnosis.
[0093] Reference Figure 2 , is a method flow chart of a fault diagnosis method provided in an embodiment of the present application, and is specifically described as follows:
[0094] S201: Apply a preset first diagnostic strategy to diagnose an analog input circuit to obtain a first diagnostic result of the analog input circuit.
[0095] For the analog input function of the universal input and output module, specifically: the field instrument is a two-wire instrument, the second control module controls the first switch SW1 to be closed, and the field instrument is powered through the diode D1; the first control module controls the second switch SW2 to be closed, and the output current of the field instrument is converted into a voltage signal through the resistor R1, and is sampled by the second analog-to-digital converter ADC2 and transmitted to the second control module. Its signal path is as follows: Figure 3 shown.
[0096] Different circuits have different diagnostic strategies. The process of using the first diagnostic strategy to diagnose the analog input circuit is as follows: based on the first diagnostic strategy, the first differential voltage across the second resistor R2 is collected, and the first current is determined based on the first differential voltage; the first voltage of the first resistor R1 is collected, and the second current is determined based on the first voltage; the first current and the second current are used to perform fault diagnosis on the analog input circuit to obtain a first diagnostic result of the analog input circuit.
[0097] By collecting the first differential voltage across the second resistor R2, the output current of the diode D1 is obtained, and the output current can be determined as the first current; the first voltage of the first resistor R1 is collected, and the input current can be obtained by measuring the voltage on the first resistor (that is, the first voltage mentioned above), and the input current is determined as the second current.
[0098] In the present application, two sets of current sampling circuits use independent ADCs and CPLDs, which can ensure that in the event of a single device failure, the other set of circuits can correctly sample the signal.
[0099] Reference Figure 4 , which is a flowchart of using a first current and a second current to perform fault diagnosis on an analog input circuit and obtain a first diagnostic result of the analog input circuit provided in an embodiment of the present application, and is specifically described as follows:
[0100] S301, obtaining a first deviation value between a first current and a second current; when the first deviation value exceeds a first preset deviation value, generating a first diagnostic conclusion indicating that a fault has occurred in an analog input circuit; when the first deviation value does not exceed the first preset deviation value, generating a first diagnostic conclusion indicating that no fault has occurred in the analog input circuit.
[0101] The first preset deviation value can be set according to actual needs, preferably, can be set to ±5%; the deviation value between the first current and the second current is calculated, and the deviation value is the first deviation value.
[0102] When the first deviation value exceeds the first preset deviation value, it is determined that the analog input function of the universal input-output module fails, that is, the function of the analog input circuit fails, and a first diagnostic conclusion characterizing that the analog input circuit fails is generated. When the first deviation value does not exceed the first preset deviation value, it is determined that the analog input function of the universal input-output module does not fail, that is, the function of the analog input circuit does not fail, and a first diagnostic conclusion characterizing that the analog input circuit does not fail is generated.
[0103] At this point, the analog input function of the general input and output module can be diagnosed.
[0104] S302. When the first current is in a preset first current interval, a second diagnostic conclusion is generated, indicating that there is no fault in the line of the analog input circuit; when the first current is less than the minimum value in the first current interval, a second diagnostic conclusion is generated, indicating that a disconnection fault occurs in the analog input circuit; when the first current is greater than the maximum value in the first current interval, a second diagnostic conclusion is generated, indicating that a short circuit fault occurs in the analog input circuit.
[0105] The first current range can be set according to actual needs, such as [3.7mA, 20.8mA].
[0106] Exemplarily, when the first current is in the first current interval, it is determined that the analog input circuit is not faulty, and a second diagnostic conclusion is generated, indicating that the analog input circuit is not faulty; when the first current is less than the minimum value in the first current interval, for example 3.7mA, it indicates that a disconnection fault has occurred in the analog input circuit, and a second diagnostic conclusion is generated, indicating that a disconnection fault has occurred in the analog input circuit; when the first current is greater than the maximum value in the first current interval, for example 20.8mA, it indicates that a short circuit fault has occurred in the analog input circuit, and a second diagnostic conclusion is generated, indicating that a short circuit fault has occurred in the analog input circuit.
[0107] At this point, the first current and the preset first current interval can be used to perform line fault diagnosis on the analog input circuit.
[0108] Figure 4The execution order of S301 and S302 in the process shown can be replaced, and this application does not limit the execution order of S301 and S302.
[0109] S303: Generate a first diagnostic result of the analog input circuit based on the first diagnostic conclusion and the second diagnostic conclusion.
[0110] The generated first diagnosis result includes a first diagnosis conclusion and a second diagnosis conclusion.
[0111] The diagnostic process provided in the present application covers the fault detection of the analog input function and the line detection of the analog input circuit, thereby enabling comprehensive fault detection of the analog input circuit and improving the accuracy of fault diagnosis.
[0112] S202: Apply a preset second diagnostic strategy to diagnose the analog output circuit to obtain a second diagnostic result of the analog output circuit.
[0113] For the analog output function of the universal input and output module, specifically: the first switch SW1 is disconnected, the current source outputs 0~20mA current, and the current signal is output to the field instrument through the diode D1. At the same time, the third switch SW3 is closed to provide a return path for the current signal. The signal path is as follows Figure 5 shown.
[0114] The process of using the second diagnostic strategy to diagnose the analog output circuit is as follows: based on the second diagnostic strategy, collecting the second differential voltage across the second resistor, and determining the third current based on the second differential voltage; controlling the output current of the current source, and determining the output current of the current source as the fourth current; using the third current and the fourth current to perform fault diagnosis on the analog output circuit to obtain a second diagnostic result of the analog output circuit.
[0115] In the embodiment provided in the present application, the output current of the diode can be obtained by measuring the differential voltage across the sampling resistor (i.e., the second resistor R2) (i.e., the second differential voltage mentioned above), and the output current is determined as the second current; the current source is responsible for the output current, and the current output current is determined as the fourth current.
[0116] Reference Figure 6 , which is a flowchart of using the third current and the fourth current to perform fault diagnosis on the analog output circuit and obtain a second diagnostic result of the analog output circuit provided in an embodiment of the present application, and is specifically described as follows:
[0117] S401. Obtain a second deviation value between the third current and the fourth current; when the second deviation value exceeds a second preset deviation value, generate a third diagnostic conclusion indicating that a fault has occurred in the analog output circuit; when the second deviation value does not exceed the second preset deviation value, generate a third diagnostic conclusion indicating that no fault has occurred in the analog output circuit.
[0118] The second preset deviation value can be set according to actual needs, such as ±5%.
[0119] A deviation value between the third current and the fourth current is calculated, and the deviation value is a second deviation value.
[0120] When the second deviation value exceeds the second preset deviation value, it is determined that the analog output function of the universal input and output module fails, that is, the function of the analog output circuit fails, and a third diagnostic conclusion indicating that the analog output circuit fails is generated.
[0121] When the second deviation value does not exceed the second preset deviation value, it is determined that the analog output function of the universal input and output module has not failed, that is, the function of the analog output circuit has not failed, and a third diagnostic conclusion is generated indicating that the analog output circuit has not failed.
[0122] Thus, by using the third current and the fourth current, the analog output function of the universal input and output module can be fault-detected to obtain a corresponding detection conclusion.
[0123] S402. When the third current is less than a preset detection current, a fourth diagnostic conclusion is generated indicating that a disconnection fault occurs in the analog output circuit; when the third current is not less than the preset detection current, a fourth diagnostic conclusion is generated indicating that no fault occurs in the analog output circuit.
[0124] In the embodiment provided in the present application, the preset detection current can be set according to actual needs, such as being specifically set to 3.7 mA.
[0125] When the third current is less than the preset detection current, it is considered that a disconnection fault has occurred in the analog output circuit, and a fourth diagnostic conclusion is generated, indicating that a disconnection fault has occurred in the analog output circuit; when the third current is not less than the preset detection current, the analog output circuit is short-circuited. Although the analog output circuit is short-circuited, it can operate normally, so it is not considered to be a fault, and a fourth diagnostic conclusion is generated, indicating that there is no fault in the analog output circuit.
[0126] At this point, the line fault diagnosis of the analog output circuit is completed using the third current and the fourth current.
[0127] This application does not limit the execution order of S401 and S402.
[0128] S403 : Generate a second diagnosis result of the analog output circuit based on the third diagnosis conclusion and the fourth diagnosis conclusion.
[0129] The second diagnostic result includes a third diagnostic conclusion and a fourth diagnostic conclusion.
[0130] The diagnostic process provided in the present application covers fault detection of analog output functions and line detection of analog output circuits, thereby enabling comprehensive fault detection of analog output circuits and improving the accuracy of fault diagnosis.
[0131] S203: Apply a preset third diagnostic strategy to diagnose the switch value input circuit to obtain a third diagnostic result of the switch value input circuit.
[0132] For the switch input function of the universal input and output module, specifically: the field instrument is a dry contact switch, the first switch SW1 is closed, and the field instrument is powered through the diode D1; the fourth switch SW4 is closed, and the signal is converted into a low voltage signal through the third resistor R3 and the fourth resistor R4, and is sampled by the second analog-to-digital converter ADC2 and transmitted to the second control module CPLD2. The signal path is as follows Figure 7 shown.
[0133] Reference Figure 8 , which is a flowchart of applying a preset third diagnostic strategy to diagnose a switch input circuit and obtaining a third diagnostic result of the switch input circuit provided in an embodiment of the present application, and is specifically described as follows:
[0134] S501 . Based on a third diagnostic strategy, collect a third differential voltage across two ends of a second resistor, and determine a fourth current based on the third differential voltage.
[0135] By measuring the differential voltage across the sampling resistor R1 (ie, the third differential voltage mentioned above), the output current of the diode D1 can be obtained, and the output current is determined as the fourth current.
[0136] S502: Calculate the fourth current, the resistance value of the third resistor, and the resistance value of the fourth resistor to obtain a first voltage.
[0137] The process of calculating the fourth current, the resistance value of the third resistor and the resistance value of the fourth resistor is such as: fourth current*(resistance value of the third resistor+resistance value of the fourth resistor), thereby obtaining a voltage, and determining the voltage as the first voltage.
[0138] S503: Use a second analog-to-digital converter to sample a first sampled voltage on the fourth resistor, and calculate the first sampled voltage, the resistance value of the third resistor, and the resistance value of the fourth resistor to obtain a second voltage.
[0139] The second analog-to-digital converter ADC2 is used to sample the voltage on the fourth resistor R4 (i.e., the first sampled voltage mentioned above), and the first sampled voltage, the resistance value of the third resistor, and the resistance value of the fourth resistor are calculated to obtain the second voltage, such as: first sampled voltage*(resistance value of the third resistor R3+resistance value of the fourth resistor R4) / resistance value of the fourth resistor R4, to obtain a voltage, which is the second voltage.
[0140] S504: Connect the field instrument to a preset resistor, collect the output current of the field instrument, and use the output current to obtain first diagnostic information indicating whether there is a line fault in the switch input circuit.
[0141] By connecting the field instrument to the preset resistor, the connection method can be series or parallel, and then collecting the corresponding output current, the output current values of different connection methods are different. Based on the output currents of different connection methods, it is determined whether there is a line fault in the switch input circuit, and the first diagnostic information is generated, and the line fault is a short circuit fault or a short circuit fault.
[0142] Preferably, when there is no fault in the switch input circuit, first diagnostic information is generated indicating that there is no fault in the switch input circuit; when there is a short circuit fault in the switch input circuit, first diagnostic information is generated indicating that there is a short circuit fault in the switch input circuit; when there is an open circuit fault in the switch input circuit, first diagnostic information is generated indicating that there is an open circuit fault in the switch input circuit.
[0143] At this point, the line fault diagnosis process for the switch input circuit is completed.
[0144] S505 . Perform fault diagnosis on the switch value input circuit based on the first voltage and the second voltage to obtain second diagnosis information of the switch value input circuit.
[0145] In the present application, a voltage deviation value between the first voltage and the second voltage is determined; when the voltage deviation value exceeds a preset voltage deviation value, it is determined that the switch input function of the universal input-output module fails, that is, the function of the switch input circuit fails, and second diagnostic information characterizing that the switch input circuit fails is generated at this time; when the voltage deviation value does not exceed the preset voltage deviation value, it is determined that the switch input function of the universal input-output module does not fail, that is, the function of the switch input circuit does not fail, and second diagnostic information characterizing that the switch input circuit does not fail is generated at this time.
[0146] Specifically, a voltage deviation value between the first voltage and the second voltage is calculated, and the preset voltage deviation value can be set according to actual needs, such as ±5%.
[0147] At this point, the fault detection of the switch input function of the universal input / output module is completed. The present application does not limit the sequence of the function detection and line detection of the switch input circuit.
[0148] S506: Generate a third diagnostic result based on the first diagnostic information and the second diagnostic information.
[0149] The third detection result includes the first diagnosis information and the second diagnosis information.
[0150] The diagnostic process provided in the present application covers fault detection of switch input functions and line detection of switch input circuits, thereby enabling comprehensive fault detection of switch input circuits and improving the accuracy of fault diagnosis.
[0151] S204: Apply a preset fourth diagnostic strategy to diagnose the switch output circuit to obtain a fourth diagnostic result of the switch output circuit.
[0152] For the switch output function in the universal input and output module, the first switch SW1 is closed, and the signal is output to the field instrument through the diode D1. At the same time, the third switch SW3 is closed to provide a return path for the current signal. The signal path is as follows: Fig. 9 shown.
[0153] Reference Fig.10 , which is a flowchart of applying a preset fourth diagnostic strategy to diagnose the switch output circuit and obtain a fourth diagnostic result of the switch output circuit provided in an embodiment of the present application, and is specifically described as follows:
[0154] S601 . Based on a fourth diagnostic strategy, collect a fourth differential voltage across the second resistor, and determine a fifth current based on the fourth differential voltage.
[0155] The differential voltage across the second resistor R2 is measured and sampled (ie, the fourth differential voltage mentioned above). The output current of the diode D1 can be obtained by using the differential voltage. The output current is the fifth current.
[0156] S602: Based on the fifth current, perform line fault judgment on the switch value output circuit to obtain a line fault judgment result of the switch value output circuit.
[0157] For the fifth current, when the fifth current is in the preset second current interval, it is determined that there is no fault in the line of the switch output circuit, and at this time a line fault judgment result is generated characterizing that there is no fault in the line of the switch output circuit, and the second current interval can be set according to actual needs, such as [10mA, 1A]; when the fifth current is less than the minimum value in the second current interval, it is determined that a line break fault occurs in the switch output circuit, and at this time a line fault judgment result characterizing that a line break fault occurs in the switch output circuit is generated, such as the minimum value is 10mA; when the fifth current is greater than the maximum value in the second current interval, such as the maximum value is 1A, it is determined that a short circuit fault occurs in the switch output circuit, and at this time a line fault judgment result characterizing that a short circuit fault occurs in the switch output circuit is generated.
[0158] Furthermore, the present application also provides for detecting the switch output function of the universal input and output module. During the detection process, the first switch SW1 is closed, and the first switch SW1 is responsible for outputting the switch signal voltage for driving the field instrument load. The third switch SW3 is closed to provide a return path for the current signal. The detection process is such as S603-S605.
[0159] S603, control the first switch, the third switch and the fourth switch to be in a closed state, use the second analog-to-digital converter to sample the second sampled voltage on the fourth resistor, calculate the second sampled voltage, the resistance value of the third resistor and the resistance value of the fourth resistor to obtain the third voltage, and obtain the first switch diagnosis sub-result based on the third voltage.
[0160] During the detection process, the second control module is used to control the first switch SW1 to be closed and the third switch SW3 to be closed to output an ON signal, and the fourth switch SW4 is controlled to be closed. The voltage on the fourth resistor R4, i.e., the second sampled voltage above, is sampled by the second analog-to-digital converter ADC2, and the second sampled voltage is sent to the second control module. Furthermore, in the present application, when the circuit is configured as a switch output, each switch has its default switch state. When describing the switch output, the closed state of the switch is different in different situations. When describing, some switches mention the open and closed state, and some switches do not mention it. Among them, the switches not mentioned are all in the open state.
[0161] The second control module calculates the second sampling voltage, the resistance value of the third resistor and the resistance value of the fourth resistor. The specific process is as follows: the second sampling voltage*(the resistance value of the third resistor R3+the resistance value of the fourth resistor R4) / the resistance value of the fourth resistor. At this time, the third voltage is obtained, and then the third voltage is used for fault detection.
[0162] When the third voltage is greater than the first preset voltage value, it is determined that the third switch SW3 has failed, and a first switch diagnosis sub-result indicating that the third switch SW3 has failed is generated; when the third voltage is not greater than the first preset voltage value, it is determined that the third switch SW3 has not failed, and a first switch diagnosis sub-result indicating that the third switch SW3 has not failed is generated; when the third voltage is greater than the first preset voltage value, it is determined that the third switch SW3 has failed, and a first switch diagnosis sub-result indicating that the third switch SW3 has failed is generated.
[0163] Furthermore, the first preset voltage value can be set according to actual needs, and the value range of the first preset voltage value is usually 0~5V.
[0164] S604, control the first switch and the fourth switch to be in a closed state, and control the third switch to be in an open state, use the second analog-to-digital converter to sample the third sampled voltage on the fourth resistor, calculate the third sampled voltage, the resistance value of the third resistor, and the resistance value of the fourth resistor to obtain the fourth voltage, and obtain the second switch diagnosis sub-result based on the third voltage.
[0165] During the detection process, the second control module controls the first switch SW1 to close, the fourth switch SW4 to close, and controls the third switch SW3 to open. The voltage on the fourth resistor R4 is sampled by the second analog-to-digital converter ADC2 as the third sampled voltage, and the third sampled voltage is sent to the second control module.
[0166] The second control module calculates the third sampling voltage, the resistance value of the third resistor and the resistance value of the fourth resistor. The specific process is as follows: the third sampling voltage*(the resistance value of the third resistor R3+the resistance value of the fourth resistor R4) / the resistance value of the fourth resistor. At this time, the fourth voltage is obtained, and then the fourth voltage is used for fault detection.
[0167] When the fourth voltage is less than the second preset voltage value, it is determined that the first switch SW1 or the third switch SW3 is faulty, and a second switch diagnosis sub-result is generated, indicating that the first switch SW1 or the third switch SW3 is faulty; when the fourth voltage is greater than or equal to the second preset voltage value, it is determined that the first switch SW1 and the third switch SW3 are not faulty, and a second switch diagnosis sub-result is generated, indicating that the first switch SW1 and the third switch SW3 are not faulty.
[0168] Furthermore, the second preset voltage value can be set according to actual needs, and the value range of the second preset voltage value is usually 15~24V.
[0169] S605, control the first switch and the third switch to be in an open state, and control the fourth switch to be closed, use the second analog-to-digital converter to sample the fourth sampled voltage on the fourth resistor, calculate the fourth sampled voltage, the resistance value of the third resistor, and the resistance value of the fourth resistor to obtain a fifth voltage, and obtain a third switch diagnosis sub-result based on the fifth voltage.
[0170] During the detection process, the second control module controls the first switch SW1 and the third switch SW3 to be opened, and controls the fourth switch SW4 to be closed. The voltage on the fourth resistor R4 is sampled by the second analog-to-digital converter ADC2 as a fourth sampled voltage, and the fourth sampled voltage is sent to the second control module.
[0171] The second control module calculates the fourth sampling voltage, the resistance value of the third resistor and the resistance value of the fourth resistor. The specific process is as follows: fourth sampling voltage*(resistance value of the third resistor R3+resistance value of the fourth resistor R4) / resistance value of the fourth resistor R4, and the fifth voltage can be obtained, and the fifth voltage is used for fault judgment.
[0172] When the fifth voltage is greater than the third preset voltage value, it is determined that the first switch SW1 or the fourth switch SW4 has failed, and a third switch diagnosis sub-result is generated indicating that the first switch SW1 or the fourth switch SW4 has failed; when the fifth voltage switch is less than or equal to the third preset voltage value, it is determined that the first switch SW1 and the fourth switch SW4 have not failed, and a third switch diagnosis sub-result is generated indicating that the first switch SW1 and the fourth switch SW4 have not failed.
[0173] Further, based on the first switch diagnosis sub-result, the second switch diagnosis sub-result, and the third switch diagnosis sub-result, the fault types of all switches may be obtained.
[0174] Furthermore, the third preset voltage value can be set according to actual needs, and the value range of the third preset voltage value is usually 0~5V.
[0175] In the method provided in the present application, the three diagnostic steps S603 to S605 can be executed in a fixed cycle during the operation of the system, the diagnostic time for each time is configurable, and the disturbance of the switch output should not cause abnormal operation of the load.
[0176] Preferably, the process of performing functional diagnosis and line diagnosis on the switch output circuit is not limited in order, and can also be performed in parallel.
[0177] S606. Obtain a fourth diagnosis result of the switch output circuit based on the line fault judgment result, the first switch diagnosis sub-result, the second switch diagnosis sub-result, and the third switch diagnosis sub-result.
[0178] The generated fourth diagnosis result includes a line fault determination result, a first switch diagnosis sub-result, a second switch diagnosis sub-result, and a third switch diagnosis sub-result.
[0179] In the embodiment provided in the present application, the execution order of steps S201 to S204 is not limited, and they can be executed in parallel.
[0180] The diagnostic process provided in the present application covers fault detection of the switch output function and line detection of the switch output circuit. Thus, the switch output circuit can be comprehensively detected for faults, thereby improving the accuracy of fault diagnosis.
[0181] The fault diagnosis solution provided in this application achieves 99% diagnostic coverage of the system, meets the functional safety design requirements of the 1oo1D architecture, has complete diagnostic capabilities, and any component failure can be diagnosed. It has the advantages of high diagnostic coverage and leads to a safe state.
[0182] The fault diagnosis scheme provided in the embodiment of the present application provides a fault diagnosis method for each unit of the universal input and output module. The scheme has a high diagnostic coverage rate. When any circuit inside the module fails, it can be effectively diagnosed to ensure that the module is in a safe and controllable state and to issue an alarm.
[0183] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0184] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.
[0185] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0186] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0187] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A general input and output module, characterized in that: include: An analog input circuit, an analog output circuit, a switch input circuit, a switch output circuit, a differential amplifier module, a first analog-to-digital converter, a second analog-to-digital converter, a first control module, and a second control module; The analog input circuit comprises a first switch, a universal circuit, a second switch and a first resistor connected in series in sequence, and one end of the first resistor not connected to the second switch is grounded; The universal circuit comprises a second resistor, a diode and a field instrument connected in series in sequence; The analog output circuit comprises a current source, the universal circuit and a third switch connected in series in sequence, and one end of the third switch not connected to the universal circuit is grounded; The switch input circuit comprises the first switch, the universal circuit, the fourth switch, the third resistor and the fourth resistor which are connected in series in sequence, and one end of the fourth resistor which is not connected to the third resistor is grounded; The switch output circuit comprises a first switch, the general circuit and the third switch connected in series in sequence, and one end of the third switch not connected to the general circuit is grounded; The first input end of the differential amplifier module is connected to the end of the second resistor that is not connected to the diode, the second input end is connected to the connection between the second resistor and the diode, and the output end is connected to the first analog-to-digital converter; The first control module is used to control the opening and closing states of the second switch, the third switch and the fourth switch, and receive data from the first analog-to-digital converter; A first end of the second analog-to-digital converter is connected to a connection point between the first resistor and the second switch, and a second end of the second analog-to-digital converter is connected to a connection point between the third resistor and the fourth resistor; The second control module is used to control the states of the current source and the first switch, and receive data from the second analog-to-digital converter.
2. The universal input-output module according to claim 1, characterized in that: The differential amplifier module comprises: a fifth resistor, a sixth resistor and a differential amplifier; One end of the fifth resistor is connected to the positive input terminal of the differential amplifier, and the other end serves as the first input terminal of the differential amplifier; One end of the sixth resistor is connected to the negative input end of the differential amplifier, and the other end serves as the second input end of the differential amplifier.
3. A fault diagnosis method, characterized in that: Applied to the universal input-output module according to any one of claims 1-2, the method comprising: Applying a preset first diagnostic strategy to diagnose the analog input circuit to obtain a first diagnostic result of the analog input circuit; Applying a preset second diagnostic strategy to diagnose the analog output circuit to obtain a second diagnostic result of the analog output circuit; Applying a preset third diagnostic strategy to diagnose the switch value input circuit to obtain a third diagnostic result of the switch value input circuit; A preset fourth diagnostic strategy is applied to diagnose the switching value output circuit to obtain a fourth diagnostic result of the switching value output circuit.
4. The method according to claim 3, characterized in that The applying a preset first diagnostic strategy to diagnose the analog input circuit to obtain a first diagnostic result of the analog input circuit includes: Based on the first diagnostic strategy, collecting a first differential voltage across the second resistor, and determining a first current based on the first differential voltage; collecting a first voltage of the first resistor, and determining a second current based on the first voltage; The first current and the second current are used to perform fault diagnosis on the analog input circuit to obtain a first diagnosis result of the analog input circuit.
5. The method according to claim 4, characterized in that The method of using the first current and the second current to perform fault diagnosis on the analog input circuit to obtain a first diagnosis result of the analog input circuit includes: Obtaining a first deviation value between the first current and the second current; when the first deviation value exceeds a first preset deviation value, generating a first diagnostic conclusion indicating that a fault has occurred in the analog input circuit; when the first deviation value does not exceed the first preset deviation value, generating a first diagnostic conclusion indicating that a fault has not occurred in the analog input circuit; When the first current is in a preset first current interval, a second diagnostic conclusion is generated, indicating that the line of the analog input circuit is fault-free; when the first current is less than a minimum value in the first current interval, a second diagnostic conclusion is generated, indicating that a disconnection fault occurs in the analog input circuit; when the first current is greater than a maximum value in the first current interval, a second diagnostic conclusion is generated, indicating that a short circuit fault occurs in the analog input circuit; Based on the first diagnostic conclusion and the second diagnostic conclusion, a first diagnostic result of the analog input circuit is generated.
6. The method according to claim 3, characterized in that The applying a preset second diagnostic strategy to diagnose the analog output circuit to obtain a second diagnostic result of the analog output circuit includes: Based on the second diagnostic strategy, collecting a second differential voltage across the second resistor, and determining a third current based on the second differential voltage; controlling the current source to output a current, and determining the output current of the current source as a fourth current; The third current and the fourth current are used to perform fault diagnosis on the analog output circuit to obtain a second diagnosis result of the analog output circuit.
7. The method according to claim 6, characterized in that The method of using the third current and the fourth current to perform fault diagnosis on the analog output circuit to obtain a second diagnosis result of the analog output circuit includes: Acquire a second deviation value between the third current and the fourth current; when the second deviation value exceeds a second preset deviation value, generate a third diagnostic conclusion indicating that the analog output circuit has a fault; when the second deviation value does not exceed the second preset deviation value, generate a third diagnostic conclusion indicating that the analog output circuit has not a fault; When the third current is less than the preset detection current, a fourth diagnosis conclusion is generated indicating that a disconnection fault occurs in the analog output circuit; when the third current is not less than the preset detection current, a fourth diagnosis conclusion is generated indicating that no fault occurs in the analog output circuit; Based on the third diagnostic conclusion and the fourth diagnostic conclusion, a second diagnostic result of the analog output circuit is generated.
8. The method according to claim 3, characterized in that The step of applying a preset third diagnostic strategy to diagnose the switch value input circuit to obtain a third diagnostic result of the switch value input circuit includes: Based on the third diagnostic strategy, collecting a third differential voltage across the second resistor, and determining a fourth current based on the third differential voltage; Performing calculation on the fourth current, the resistance value of the third resistor, and the resistance value of the fourth resistor to obtain a first voltage; Using the second analog-to-digital converter to sample a first sampled voltage on the fourth resistor, and performing calculations on the first sampled voltage, a resistance value of the third resistor, and a resistance value of the fourth resistor to obtain a second voltage; Connecting the field instrument to a preset resistor, collecting an output current of the field instrument, and using the output current to obtain first diagnostic information indicating whether there is a line fault in the switch input circuit; Based on the first voltage and the second voltage, a fault diagnosis is performed on the switch value input circuit to obtain second diagnostic information of the switch value input circuit; A third diagnosis result is generated based on the first diagnosis information and the second diagnosis information.
9. The method according to claim 7, characterized in that: The performing fault diagnosis on the switch value input circuit based on the first voltage and the second voltage to obtain second diagnostic information of the switch value input circuit includes: Determine a voltage deviation value between the first voltage and the second voltage; when the voltage deviation value exceeds a preset voltage deviation value, generate second diagnostic information indicating that a fault has occurred in the switch input circuit; when the voltage deviation value does not exceed the preset voltage deviation value, generate second diagnostic information indicating that a fault has not occurred in the switch input circuit.
10. The method according to claim 3, characterized in that The applying a preset fourth diagnostic strategy to diagnose the switch value output circuit to obtain a fourth diagnostic result of the switch value output circuit includes: Based on the fourth diagnostic strategy, collecting a fourth differential voltage across the second resistor, and determining a fifth current based on the fourth differential voltage; Based on the fifth current, performing a line fault judgment on the switching value output circuit to obtain a line fault judgment result of the switching value output circuit; controlling the first switch, the third switch, and the fourth switch to be in a closed state, using the second analog-to-digital converter to sample a second sampled voltage on the fourth resistor, performing calculations on the second sampled voltage, the resistance value of the third resistor, and the resistance value of the fourth resistor to obtain a third voltage, and obtaining a first switch diagnosis sub-result based on the third voltage; controlling the first switch and the fourth switch to be in a closed state, and controlling the third switch to be in an open state, using the second analog-to-digital converter to sample a third sampled voltage on the fourth resistor, performing calculations on the third sampled voltage, a resistance value of the third resistor, and a resistance value of the fourth resistor to obtain a fourth voltage, and obtaining a second switch diagnosis sub-result based on the third voltage; controlling the first switch and the third switch to be in an open state, and controlling the fourth switch to be in a closed state, using the second analog-to-digital converter to sample a fourth sampled voltage on the fourth resistor, performing calculations on the fourth sampled voltage, a resistance value of the third resistor, and a resistance value of the fourth resistor to obtain a fifth voltage, and obtaining a third switch diagnosis sub-result based on the fifth voltage; A fourth diagnosis result of the switch output circuit is obtained based on the line fault judgment result, the first switch diagnosis sub-result, the second switch diagnosis sub-result and the third switch diagnosis sub-result.
Citation Information
Patent Citations
CANopen field bus input / output device with short-circuit protection and self-diagnosis function
CN101783741A
Current acquisition and diagnosis circuit and failure diagnosis method thereof
CN111190047A
Universal analog quantity input and output circuit and using method thereof
CN112073068A
Universal input / output control device
CN117518925A
General long -range analog quantity switching value input -output system
CN205644225U