Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a driving output circuit and a diagnosis method, which can effectively solve the problems in the background art.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a driving output circuit comprises a driving circuit connected to two ends of a load, the driving circuit is connected with a diagnosis circuit used for detecting the driving circuit and a microprocessor unit used for receiving signals of the diagnosis circuit and controlling the driving circuit to operate, and a redundant switch assembly is further arranged on the driving circuit.
As a preferred technical solution of the present invention, the microprocessor unit is responsible for reading a diagnostic signal of a self-test of the diagnostic circuit, and outputting a control signal to the driving circuit according to a circuit safety logic rule.
As a preferred embodiment of the present invention, the load is an inductive coil load.
As a preferable technical scheme of the invention, the redundant switch assembly comprises a power switch for controlling the on-off of the driving circuit and two switch tubes, and two ends of each switch tube are respectively connected to the load and the power supply of the driving circuit.
As a preferred technical solution of the present invention, the two switching tubes of the driving circuit are controlled to be turned on or off by a control signal of the microprocessor unit, and the power switch is also controlled to be turned on or off by a control signal of the microprocessor unit.
As a preferred technical solution of the present invention, when a load is turned on, the power switch is turned on, and simultaneously, two switching tubes of the driving circuit are also turned on; when the load is disconnected, any one of the two switch tubes of the power switch and the driving circuit is disconnected.
As a preferable technical solution of the present invention, the diagnostic circuit includes two switching tubes, one end of each of the two switching tubes is connected to a power supply of the driving circuit, the other end of each of the two switching tubes is connected in series to a freewheeling resistor, the load is disposed between the two freewheeling resistors, and two ends of the load are also connected in parallel to an AD converter, and the AD converter collects voltages of a positive electrode and a negative electrode of the load and transmits the voltages to the microprocessor unit.
In a preferred embodiment of the present invention, the power switch of the redundant switch module is connected to a switch tube of a diagnostic circuit, and the diagnostic circuit and the redundant switch module share a power supply and a power switch.
In addition, the invention also provides a diagnosis method of the drive output circuit, which comprises the following steps:
step 100, initializing and self-checking after the microprocessor unit is powered on;
step 200, after the self-checking of the microprocessor unit is passed, electrifying the diagnosis circuit and the driving circuit;
step 300, the diagnosis circuit carries out self-checking;
step 400, when the self-checking of the diagnosis circuit is passed, the diagnosis circuit detects the driving circuit;
and 500, driving the load to run after the drive circuit passes the detection, and enabling the diagnosis circuit to enter a circulating diagnosis state.
Compared with the prior art, the invention has the beneficial effects that:
(1) the invention can improve the safety performance of the load during working by arranging the driving circuit and the diagnosis circuit and controlling the circuit design of the load by utilizing a triple redundant switch mode, and can reduce the influence of device failure on the circuit function when the circuit fails;
(2) the diagnostic circuit and the processor of the invention are added with a self-checking mode, and the influence of the processor and the diagnostic circuit on circuit diagnosis and load driving can be reduced, thereby improving the accuracy of circuit diagnosis and the safety and stability of the load in use.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
As shown in fig. 1, the present invention provides a driving output circuit, which is mainly composed of two parts, a driving circuit and a diagnostic circuit, and is controlled by a microprocessor unit.
In this embodiment, one of the main uses of the driving output circuit is a safety instrument system, which is referred to as SIS for short, and is mainly an alarm and interlock part in a plant control system, and implements alarm action or adjustment or shutdown control on a detection result in the control system, and is an important component part in automatic control of a plant enterprise, and mainly includes a sensor, a logic arithmetic unit, and an execution element, as shown in fig. 2.
The present invention will be described in detail by taking a drive output circuit in a safety instrument system as an example:
the driving circuit is used for driving a load to work, the load is equivalent to an execution element of the safety instrument system, the diagnosis circuit is used for carrying out fault detection on the driving circuit, and the microprocessor control unit receives a diagnosis signal of the diagnosis circuit and sends a control signal to the driving circuit to control the running state of the driving circuit. When the sensor monitoring circuit system is normal, the driving circuit works normally, and the load can be used normally and stably; when the sensor monitoring circuit system has a fault, the microprocessor unit controls the switch in the driving circuit to be switched off to protect the load, and the microprocessor unit is used as an operation unit of related logic programs of the driving output circuit and is responsible for reading the diagnosis signal and giving out a correct control signal according to the circuit safety logic rule.
In this embodiment, the load may be an inductive coil, for example: a coil of a relay.
As shown in fig. 3, the innovative part of the present invention is that a redundant switch assembly is disposed on the driving circuit, so as to perform multiple protection functions on the load, and a diagnosis circuit is added to perform fault detection on each switch in the redundant switch assembly, so as to ensure the safety of each switch in the driving circuit when in use, thereby further protecting the load.
In this embodiment, the redundant switch module mainly includes a power switch P for controlling the on/off of the driving circuit, and two switch tubes, i.e., a switch tube K1 and a switch tube K2, wherein two ends of the switch tube K1 and two ends of the switch tube K2 are both connected to the load and the driving circuit power supply, respectively, and the switch tube K1 and the switch tube K2 are controlled to be turned on or off by the control signal of the microprocessor unit, and the power switch P is also controlled to be turned on or off by the control signal of the microprocessor unit.
When the load needs to be switched on to normally work, the power switch P is closed, and meanwhile, the two switch tubes K1 and K2 are also closed; when the circuit is in fault and the circuit needs to be disconnected to protect the load, the power switch P and any one of the two switching tubes are disconnected, so that the driving circuit can be disconnected, and the load can be disconnected and kept in a safe state.
As shown in fig. 4, the diagnostic circuit also includes two switching tubes, namely, switching tube K3 and switching tube K4, two ends of switching tube K3 are respectively connected to the positive electrode of power supply P and the positive electrode of load, two ends of switching tube K4 are respectively connected to the negative electrode of power supply and the negative electrode of load, a freewheeling resistor R1 is connected in series between switching tube K3 and load, a freewheeling resistor R2 is connected in series between switching tube K4 and load, and an AD converter is connected in parallel between two ends of load for collecting the positive and negative voltages of load and transmitting them to the microprocessor unit.
In the present embodiment, the diagnostic circuit and the redundant switch assembly share one power supply and the power switch P, and the diagnostic circuit and the driving circuit can be powered on simultaneously when the power switch P is closed.
Example 2
As shown in fig. 5, the present embodiment also provides a method for diagnosing a drive output circuit, including the steps of:
step one, a power supply of a microprocessor unit is electrified, the microprocessor unit is initialized, then the microprocessor unit carries out self-checking, after the self-checking of the microprocessor unit is passed, a power switch P is controlled to be closed, a driving circuit and a diagnosis circuit are electrified, otherwise, the power switch P is kept to be disconnected, and therefore the driving circuit and the diagnosis circuit are always kept in a safe state (the safe state is that the driving circuit and the diagnosis circuit are not electrified);
step two, after the power switch P is closed, the diagnosis circuit carries out self-checking, when the self-checking of the diagnosis circuit is passed, the diagnosis operation can be carried out on the driving circuit, otherwise, the driving circuit can not be operated, so that the driving circuit is kept in an off state, and the driving circuit is ensured to be in a safe state;
and step three, after the self-checking of the diagnosis circuit is passed, the diagnosis circuit detects the driving circuit, the driving circuit starts to drive the load after the detection of the driving circuit is passed, the diagnosis circuit enters a circulating diagnosis state, otherwise, the load cannot be driven, and therefore the driving circuit is in a safe state.
The microprocessor unit and the diagnosis circuit firstly carry out respective circuit self-check, thereby preventing the microprocessor unit and the diagnosis circuit from having problems, reducing the influence on fault detection of the driving circuit, further improving the accuracy of fault detection of the diagnosis circuit, simultaneously improving the stability of signals received by the microprocessor unit and signals output by control, and further improving the protection safety performance of loads.
If the switch tube K1, the switch tube K2 and the power switch P in the drive circuit can not be disconnected, the load is always in a connected state and can not be disconnected, and the load is in a dangerous state, therefore, the diagnosis circuit is additionally arranged in the invention, namely, the diagnosis circuit is used for carrying out circulating continuous detection on the switch tube K1, the switch tube K2 and the power switch P, preventing the switch from being in failure, and ensuring the timely disconnection of the load.
The driving circuit and the diagnosis circuit form a closed loop, diagnosis is carried out by adopting a 'Test pattern' method in IEC61508 standard, namely, the on-off of the switching tubes 1-4 is changed, and whether the on-off of the switching tubes 1-4 is normal or not is observed through the back reading voltage change of the diagnosis circuit so as to judge whether the driving circuit and the diagnosis circuit work normally or not.
The specific diagnostic method is described below by taking the needle diagnosis of the switch tube K1 as an example:
first, the following basic conditions were set:
(1) all devices work normally.
(2) The load is now in the on state, i.e. K1, K2 are closed.
(3) Fault state of switching tube K1: k1 is normally open or K1 is normally closed.
The purpose of the diagnosis is to diagnose whether the switching tube K1 is faulty, and to ensure that the load cannot malfunction (i.e., open).
The specific flow of the diagnosis circuit for diagnosing the driving circuit is as follows:
initial state: and the switch tube K1 and the switch tube K2 are closed, the switch tube K3 and the switch tube K4 are opened, and the voltages of the positive end and the negative end of the load are collected through the AD converter and are compared with expected values.
State 1: the switch tube K1 is disconnected (the disconnection time is less than 1ms), the switch tube K2 is closed, the switch tube K3 is closed, the switch tube K4 is disconnected, the voltages of the positive end and the negative end of the load are collected through the AD converter and are compared with an expected value, if the actual voltage is consistent with the expected value (the voltage of a follow current resistor R1 in the diagnosis circuit is divided, the voltage of the two ends of the load is less than the power supply voltage), the disconnection function of the switch tube K1 is normal, when the circuit fails, the load can be disconnected, and the safety performance of the load is improved;
otherwise, the disconnection function of the K1 is abnormal, the switch tube K1 has a normally closed fault condition, and if the circuit has a fault, the load cannot be disconnected, so that the safety performance of the load is low.
State 2: the switching tube K1 and the switching tube K2 are closed, the switching tube K3 and the switching tube K4 are disconnected, the voltages of the positive end and the negative end of the load are collected through the AD converter and are compared with an expected value, if the actual voltage is consistent with the expected value (the voltages of the two ends of the load are the same as the voltage of a power supply), the closing function of the switching tube is normal, namely the load has normal load voltage and can be normally used;
otherwise, the switching tube is not normally closed, the switching tube K1 has a fault condition of being opened frequently, the load voltage of the load is low, and the normal use cannot be realized.
State 3: and (5) detecting the state 1 and the state 2 in a circulating mode.
In the present embodiment, the way to ensure that the load cannot malfunction during the detection of the switch tube K1 is to use the micro-motion method, switch tube K1 is switched off for ms, and switch tube K3 and the freewheeling resistor are used to provide a double protection to prevent the load from malfunctioning, so that the switch tube state can be diagnosed stably.
The failure detection principle of the switch tube K2 is the same as that of the switch tube K1, and will not be described in detail here.
In the present embodiment, the way to ensure that the load cannot malfunction during the detection of the switching tube K1 and the switching tube K2 is to use the micro-motion method, the switching tube K1 and the switching tube K2 are switched off in ms level, and the switching tube and the freewheeling resistor in the diagnostic circuit are used to provide double protection to prevent the load from malfunctioning, so that the switching tube state can be diagnosed stably.
The driving circuit is used for controlling the on-off condition of the load, when the circuit breaks down, the switch in the driving circuit is disconnected, the load is protected, the diagnostic circuit detects the working condition of the switch in the driving circuit in real time, and the problem that the switch in the driving circuit is normally closed or normally disconnected can be prevented, so that the normal operation of the load is ensured, and the safety of the load during working is protected.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.