Disclosure of Invention
Therefore, an object of the embodiments of the present invention is to provide a method and a system for self-checking an intelligent IO outlet based on a CAN bus, which are used for analyzing which board card has an abnormal open loop through a CAN network self-checking message when the intelligent IO has an open loop disconnection or an open loop breakdown, so as to realize quick positioning of hardware problems of a relay protection device, so that operation and maintenance personnel CAN replace the relay protection device in time, effectively improve reliability of the protection device, ensure safer operation of an electric power system, and reduce failure accident rate.
In a first aspect, an embodiment of the present invention provides a method for self-checking an intelligent IO outlet based on a CAN bus, where the method includes:
intelligent IO power-on initialization and CAN network initialization.
The intelligent IO program starts a self-checking function, and performs open loop self-checking by reading the level state of the outlet pin.
And according to the result of the open loop self-test, obtaining a corresponding open loop self-test message, and sending the open loop self-test message to the CPU through the CAN bus.
And the CPU analyzes the received CAN network message and performs board fault positioning.
With reference to the first aspect, the embodiment of the present invention provides a first possible implementation manner of the first aspect, where the smart IO power-on initialization and CAN network initialization include:
and (3) the intelligent IO is powered on for initialization, the configuration file is analyzed, and the outlet pins are distributed.
And initializing the CAN network and the opening object, including enabling the initialization of the receiving of the export message, the initialization of the self-checking function and the initialization of the uploading of the self-checking message.
With reference to the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where the performing the open loop self-test by reading the status of the exit pin level by the intelligent IO program starts a self-test function includes:
first detection period Q 1 And when the protection device operates normally, the outlet pin is in a first high-level state, and the intelligent IO calls a breakdown self-checking function.
Judging whether the open loop breakdown occurs, if the open loop breakdown is read to be in a first low level state lower than the high level state, and the breakdown state is kept to be longer than a first preset time period T 1 And judging that the loop breaks down.
Reset by hand, first detection period Q 2 And (3) the protection device resumes normal operation, the outlet pin is in a second low-level state, and the intelligent IO calls a disconnection self-checking function.
Judging whether the open loop disconnection occurs, if the open loop disconnection is read to be in a second high-level state higher than the second low-level state, and the continuous disconnection time exceeds a second preset time length T 2 And judging that the loop is opened and broken.
The identification of the intelligent IO program initiated self-test function is shown in Table 1.
With reference to the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where the obtaining, according to a result of the open loop self-test, a corresponding open loop self-test packet, sending the open loop self-test packet to the CPU through the CAN bus includes:
if the open loop breaks down, the intelligent IO sends an open loop breakdown CAN message to the CPU through the CAN bus.
If the open loop is broken, the intelligent IO sends an open loop broken CAN message to the CPU through the CAN bus.
With reference to the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the analyzing, by the CPU, the received CAN network packet, and performing board fault location includes:
and judging which hardware board card is subjected to open loop breakdown according to the characteristics of the open loop breakdown CAN message, and driving the relay protection device to send out alarm information.
And judging which hardware board card generates the open loop disconnection according to the characteristics of the open loop disconnection CAN message, and driving the relay protection device to send out alarm information.
The characteristics of the CAN network message comprise a message start bit, a CAN message identifier, a control bit, a data field, CRC check, message response and a message end stop bit.
In a second aspect, an embodiment of the present invention further provides an intelligent IO outlet self-checking system based on a CAN bus, where the system includes:
and the initialization module is used for intelligent IO power-on initialization and CAN network initialization.
And the self-checking module is used for starting a self-checking function by the intelligent IO program and carrying out open loop self-checking by reading the level state of the outlet pin.
And the message sending module is used for obtaining a corresponding open loop self-checking message according to the open loop self-checking result and sending the open loop self-checking message to the CPU through the CAN bus.
And the analysis module is used for analyzing the received CAN network message by the CPU and positioning the fault of the board card.
With reference to the second aspect, an embodiment of the present invention provides a first possible implementation manner of the second aspect, where the initializing module includes:
and (3) the intelligent IO is powered on for initialization, the configuration file is analyzed, and the outlet pins are distributed.
And initializing the CAN network and the opening object, including enabling the initialization of the receiving of the export message, the initialization of the self-checking function and the initialization of the uploading of the self-checking message.
With reference to the second aspect, an embodiment of the present invention provides a second possible implementation manner of the second aspect, where the self-checking module includes:
first detection period Q 1 And when the protection device operates normally, the outlet pin is in a first high-level state, and the intelligent IO calls a breakdown self-checking function.
Judging whether the open loop breakdown occurs, if the open loop breakdown is read to be in a first low level state lower than the high level state, and the breakdown state is kept to be longer than a first preset time period T 1 And judging that the loop breaks down.
Reset by hand, first detection period Q 2 And (3) the protection device resumes normal operation, the outlet pin is in a second low-level state, and the intelligent IO calls a disconnection self-checking function.
Judging whether the open loop disconnection occurs, if the open loop disconnection is read to be in a second high-level state higher than the second low-level state, and the continuous disconnection time exceeds a second preset time length T 2 And judging that the loop is opened and broken.
With reference to the second aspect, an embodiment of the present invention provides a third possible implementation manner of the second aspect, where the message sending module includes:
if the open loop breaks down, the intelligent IO sends an open loop breakdown CAN message to the CPU through the CAN bus.
If the open loop is broken, the intelligent IO sends an open loop broken CAN message to the CPU through the CAN bus.
With reference to the second aspect, an embodiment of the present invention provides a fourth possible implementation manner of the second aspect, wherein the analysis module includes:
and judging which hardware board card is subjected to open loop breakdown according to the characteristics of the open loop breakdown CAN message, and driving the relay protection device to send out alarm information.
And judging which hardware board card generates the open loop disconnection according to the characteristics of the open loop disconnection CAN message, and driving the relay protection device to send out alarm information.
The characteristics of the CAN network message comprise a message start bit, a CAN message identifier, a control bit, a data field, CRC check, message response and a message end stop bit.
The embodiment of the invention has the beneficial effects that:
the invention provides an intelligent IO (input/output) outlet self-checking method and system based on a CAN (controller area network) bus, which board card is abnormal in an open loop is analyzed through a CAN network self-checking message when the open loop of an intelligent IO breaks or breaks down, so that the hardware problem of a relay protection device is rapidly positioned, an operation and maintenance person CAN replace the relay protection device in time, the reliability of a protection device is effectively improved, the operation safety of an electric power system is ensured, and the failure accident rate is reduced.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein can be arranged and designed in a wide variety of different configurations.
Referring to fig. 1 to 5, a first embodiment of the present invention provides an intelligent IO outlet self-checking method based on a CAN bus, including:
intelligent IO power-on initialization and CAN network initialization.
The intelligent IO program starts a self-checking function, and performs open loop self-checking by reading the level state of the outlet pin.
And according to the result of the open loop self-test, obtaining a corresponding open loop self-test message, and sending the open loop self-test message to the CPU through the CAN bus.
And the CPU analyzes the received CAN network message and performs board fault positioning.
Wherein, the intelligent IO power-on initialization and CAN network initialization comprise:
and (3) the intelligent IO is powered on for initialization, the configuration file is analyzed, and the outlet pins are distributed.
And initializing the CAN network and the opening object, including enabling the initialization of the receiving of the export message, the initialization of the self-checking function and the initialization of the uploading of the self-checking message.
The intelligent IO program starts a self-checking function, and the self-checking of the open loop by reading the level state of the outlet pin comprises the following steps:
first detection period Q 1 Initially, when the protection device operates normally, the exit pin (start_ret) is in a first high-level state, and the intelligent IO invokes a breakdown self-checking function. The intelligent IO initiates a self-test function once every millisecond.
Judging whether the open loop breakdown occurs or not, if the read-out exit pin (START_RET) is lower than thatA first low level state of the high level state, and the breakdown state is maintained for more than a first preset time period T 1 (0.5 s), it is determined that the loop breakdown is open.
Referring to fig. 4, when the protection device is operating normally, the outlet relay JQ1 is not operated, OUT1 is in a low level state, Q1 is turned off, at this time +5v_qd is in a high resistance state, and start_ret is at a first high level. When the breakdown occurs to the Q1, after the intelligent IO reads that the START_RET is at a first low level, the triode Q1 is indicated to be broken down, and when the breakdown state is kept to be more than 0.5s, the intelligent IO sends a loop breakdown CAN message to the CPU.
Reset by hand, first detection period Q 2 And (3) the protection device resumes normal operation, the exit pin (START_RET) is in a second low level state, and the intelligent IO calls a disconnection self-checking function. The intelligent IO initiates a self-test function once every millisecond.
Judging whether the open loop disconnection occurs, if the read outlet pin (START_RET) is in a second high level state higher than the second low level state, and the continuous disconnection time exceeds a second preset time length T 2 (10 min), the open loop is judged to be broken.
Referring to fig. 4, when the protection device is operating normally, the OUT1 is set to high level every minute, Q1 is turned on, and at this time +5v_qd is in the on state, start_ret is the second low level in fig. 4. When the Q1 is disconnected, the intelligent IO reads that start_ret in fig. 4 is at the second high level, indicates that the triode Q1 is disconnected, and continues to be disconnected for more than 10 minutes, at this time, the intelligent IO puts the local open loop to disconnect, and sends an open loop disconnection CAN message to the CPU.
The identification of the intelligent IO program initiated self-test function is shown in Table 1.
Table 1 opening self-checking State identifier definition
The method for obtaining the open loop self-checking message according to the open loop self-checking result comprises the steps of:
if the open loop breaks down, the intelligent IO sends an open loop breakdown CAN message to the CPU through the CAN bus. In table 2, open loop breakdown occurred for board card No. 4.
The open loop breakdown CAN message is shown in table 2.
TABLE 2 open loop breakdown CAN message
If the open loop is broken, the intelligent IO sends an open loop broken CAN message to the CPU through the CAN bus. In table 3, the 5 th and 8 th paths of the No. 4 board card are broken.
The open loop and open loop CAN message is shown in table 3.
TABLE 3 open loop open circuit CAN message
The CPU analyzes the received CAN network message, and the board fault positioning comprises the following steps:
and judging which hardware board card is subjected to open loop breakdown according to the characteristics of the open loop breakdown CAN message, and driving the relay protection device to send out alarm information to remind operation and maintenance personnel of timely replacing the hardware board card.
And judging which hardware board card is subjected to open loop disconnection according to the characteristics of the open loop disconnection CAN message, and driving the relay protection device to send out alarm information to remind operation and maintenance personnel of timely replacing the hardware board card.
The characteristics of the CAN network message comprise a message start bit, a CAN message identifier, a control bit, a data field, CRC check, message response and a message end stop bit.
Referring to fig. 2, fig. 4 and fig. 5, a second embodiment of the present invention provides a second aspect, and the embodiment of the present invention further provides an intelligent IO outlet self-checking system based on a CAN bus, which includes:
and the initialization module is used for intelligent IO power-on initialization and CAN network initialization.
And the self-checking module is used for starting a self-checking function by the intelligent IO program and carrying out open loop self-checking by reading the level state of the outlet pin.
And the message sending module is used for obtaining a corresponding open loop self-checking message according to the open loop self-checking result and sending the open loop self-checking message to the CPU through the CAN bus.
And the analysis module is used for analyzing the received CAN network message by the CPU and positioning the fault of the board card.
As shown in fig. 2, the intelligent IO chip control relay of the CAN bus of the present invention includes a relay protection device CPU, an intelligent IO M4 chip, a CAN transceiver 1, a CAN transceiver 2, a power module, a B code pair time and a debug interface.
The CPU communicates with the intelligent IO chip through the CAN bus, and the CAN1 receives and transmits the opening state message and sends the opening information to the CPU. CAN2 receives and transmits the exit state message and sends the exit state message to the CPU. The power module provides power for the intelligent IO chip. And the B code time synchronization module realizes the synchronous signal transmission function between the intelligent IO chip and the CPU of the relay protection device. The debugging interface realizes the downloading of the intelligent IO program and initializes the CAN network.
Wherein, the initialization module includes:
and (3) the intelligent IO is powered on for initialization, the configuration file is analyzed, and the outlet pins are distributed.
And initializing the CAN network and the opening object, including enabling the initialization of the receiving of the export message, the initialization of the self-checking function and the initialization of the uploading of the self-checking message.
Wherein, the self-checking module includes:
first detection period Q 1 Initially, when the protection device operates normally, the exit pin (start_ret) is in a first high-level state, and the intelligent IO invokes a breakdown self-checking function. The intelligent IO initiates a self-test function once every millisecond.
Judging whether the open loop breakdown occurs, if the read exit pin (START_RET) is in a first low level state lower than the high level state, and the breakdown state is kept exceeding the firstA preset time length T 1 (0.5 s), it is determined that the loop breakdown is open.
Reset by hand, first detection period Q 2 And (3) the protection device resumes normal operation, the exit pin (START_RET) is in a second low level state, and the intelligent IO calls a disconnection self-checking function. The intelligent IO initiates a self-test function once every millisecond.
Judging whether the open loop disconnection occurs, if the read outlet pin (START_RET) is in a second high level state higher than the second low level state, and the continuous disconnection time exceeds a second preset time length T 2 (10 min), the open loop is judged to be broken.
The message sending module comprises:
if the open loop breaks down, the intelligent IO sends an open loop breakdown CAN message to the CPU through the CAN bus.
If the open loop is broken, the intelligent IO sends an open loop broken CAN message to the CPU through the CAN bus.
Wherein the analysis module comprises:
and judging which hardware board card is subjected to open loop breakdown according to the characteristics of the open loop breakdown CAN message, and driving the relay protection device to send out alarm information to remind operation and maintenance personnel of timely replacing the hardware board card.
And judging which hardware board card is subjected to open loop disconnection according to the characteristics of the open loop disconnection CAN message, and driving the relay protection device to send out alarm information to remind operation and maintenance personnel of timely replacing the hardware board card.
The characteristics of the CAN network message comprise a message start bit, a CAN message identifier, a control bit, a data field, CRC check, message response and a message end stop bit.
The embodiment of the invention aims to protect an intelligent IO (input/output) outlet self-checking method and system based on a CAN (controller area network) bus, and has the following effects:
when the open loop breaks or breaks down, the CAN network self-checking message is used for analyzing which board card has the open loop abnormality, so that the hardware problem of the relay protection device is rapidly positioned, the operation and maintenance personnel CAN conveniently replace the relay protection device in time, the reliability of the protection device is effectively improved, the operation safety of the power system is ensured, and the failure accident rate is reduced.
The computer program product of the intelligent IO outlet self-checking method and device based on the CAN bus provided by the embodiment of the invention comprises a computer readable storage medium storing program codes, wherein the instructions included in the program codes CAN be used for executing the method in the method embodiment, and specific implementation CAN be seen in the method embodiment and is not repeated herein.
Specifically, the storage medium CAN be a general storage medium, such as a mobile disk, a hard disk and the like, and when a computer program on the storage medium is run, the intelligent IO outlet self-checking method based on the CAN bus CAN be executed, so that the reliability of a protection device CAN be effectively improved, the running safety of an electric power system is ensured, and the failure accident rate is reduced.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.