Distributed control system and control network
Through the customized CNET protocol, the communication module is used to dominate the master-slave architecture of the I/O module in the distributed control system of the nuclear power plant to form a redundant communication link, solving the problem of inefficient communication in the existing bus protocol in the nuclear power plant and achieving efficient and reliable data transmission.
Patent Information
- Application Number
- CN202510887114.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-30
AI Technical Summary
The existing mature bus protocol cannot be fully adapted in the distributed control system of nuclear power plants, resulting in inefficient communication between CPU modules and I/O modules.
Using a custom CNET protocol, a communication module is used as the master node and an I/O module is used as the master and slave nodes to connect to the communication module and the redundant communication module through at least two CNET buses to form a redundant communication link, realizing data communication management between the computing module and the I/O module, and performing abnormal detection.
Improve communication efficiency, avoid retransmission, interruption or system restart caused by failures, ensure the sustainability of data transmission, and reduce invalid waiting time.
Smart Images

Figure CN120378465A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication control technologies, and particularly to a distributed control system and a control network. Background Art
[0002] A distributed control system (DCS) is an important system used to control various process systems and field devices in the field of nuclear power plants. A control station generally consists of a CPU module, a communication module, and an I / O module. The I / O module is responsible for collecting the operation data of field devices in the nuclear power plant and transmitting the collected data to the CPU module. The CPU module is responsible for performing logical operations based on the data transmitted by the I / O module and inputting the logical operation results to the field devices through the I / O module, so as to achieve the automatic operation control of multiple field devices. Among them, network communication is used between the CPU module and the I / O module, which is herein referred to as a control network. In the currently related technologies, mature bus protocols are often selected for the control network, such as the DP protocol, the CAN bus protocol, and so on. Although these mature bus protocols have high versatility, they are often applied to traditional industrial fields and cannot fully adapt to the specific architecture of the DCS system in nuclear power plants, easily leading to the problem of low communication efficiency between the CPU module and the I / O module. Summary of the Invention
[0003] Based on the above problems, in order to improve the communication efficiency between the CPU module and the I / O module in the DCS system of a nuclear power plant, embodiments of this application provide a distributed control system and a control network.
[0004] Embodiments of this application disclose the following technical solutions: In a first aspect, embodiments of this application provide a distributed control system, including: an operation module, at least one communication module, and multiple I / O modules. Each of the communication modules has a separately associated redundant communication module. Each of the I / O modules is connected to the communication module and the associated redundant communication module through at least two CNET buses to form a redundant communication link; the CNET is a custom control network protocol, and the master nodes of the CNET are the communication module and the associated redundant communication module, and the slave nodes of the CNET are the I / O modules; The communication module is configured to implement data communication management between the operation module and the I / O module according to a preset communication interaction mechanism in the CNET, and perform anomaly detection on each of the I / O modules, the communication module, and multiple CNET buses.
[0005] In a possible implementation, a plurality of the I / O modules are connected to each of the CNET buses; the preset communication interaction mechanism includes: a periodic polling mechanism, and the communication module includes: a periodic polling unit, and the periodic polling unit is specifically configured to: Receive an upper-layer instruction from the operation module, and convert the upper-layer instruction into a frame format corresponding to the CNET to determine a request packet for each of the I / O modules; For the plurality of I / O modules connected to each of the CNET buses, based on the polling period specified by the periodic polling mechanism, sequentially send request packets to each of the I / O modules to receive response packets fed back by each of the I / O modules; the polling period includes the sending time of the request packet and the feedback time of the response packet; If the response packet is not received within the polling period or the response packet has a verification error, it is determined that the associated I / O module has no response and polling proceeds to the next I / O module; Wherein, the polling of the plurality of I / O modules on each of the CNET buses is independent of each other, and within a single polling period for each of the CNET buses, the request packets sent by the periodic polling unit are unique.
[0006] In a possible implementation, the preset communication interaction mechanism includes: a time synchronization processing mechanism; the communication module includes: a time synchronization processing unit, and the time synchronization processing unit is specifically configured to: When the local clock of the communication module triggers the time synchronization processing moment specified by the time synchronization processing mechanism, start a time synchronization request sending process to send a time synchronization request to the plurality of I / O modules connected to each of the CNET buses; the time synchronization request is a broadcast frame; For the CNET bus with the largest number of connected I / O modules among each of the CNET buses, after all the I / O modules on the CNET bus have been polled, send the time synchronization request to the plurality of I / O modules connected to each of the CNET buses; After the time synchronization requests for each of the CNET buses have been sent, send a time synchronization completion instruction to the periodic polling unit so that the periodic polling unit re-executes the periodic polling mechanism for each of the I / O modules.
[0007] In a possible implementation, the CNET includes: a physical layer, a data link layer, and an application layer; The physical layer adopts a bus - type RS485 half - duplex link architecture, and a single communication module supports the connection of multiple CNET buses; the physical layer adopts an asynchronous transmission character - coding structure, and each character includes: a single start bit for synchronizing data reception, multiple data bits for carrying valid data, a single parity check bit for detecting single - byte transmission errors, and a single stop bit for identifying the end of the character; The data - link layer adopts an asynchronous transmission mode of DLPDU with a non - fixed field length, and the data - link layer is used to define the request - frame structure of the request packet and the response - frame structure of the response packet; both the request - frame structure and the response - frame structure include: a synchronization byte, a start delimiter, a length field, a repeated length field, a destination address, a source address, a function code, a data unit, a frame check sequence, and an end delimiter; The application layer is used to detect data - interaction anomalies when data interaction occurs between the communication module and the I / O module.
[0008] In a possible implementation, the data - interaction anomaly detection includes: I / O address consistency detection, I / O address repeatability detection, protocol - number validity detection, and module - type detection; The execution steps of the I / O address consistency detection include: Based on the request packet sent by the cycle polling unit to the I / O module, determine the target I / O module address; If the target I / O module address is inconsistent with the DIP address of the I / O module that receives the request packet, it is determined that the request packet is abnormal, and the I / O module is controlled to discard the request packet; The execution steps of the I / O address repeatability detection include: If within a single polling cycle, the cycle polling unit receives at least two response packets with the same address, it is determined that there is an address - configuration conflict anomaly in the I / O module associated with the response packet; The execution steps of the protocol - number validity detection include: For the request packet sent by the cycle polling unit, obtain the protocol number of the request packet; If the protocol number of the request packet exceeds the preset range, control the I / O module that receives the request packet to feedback the response packet to the cycle polling unit based on the data - acquisition format; Perform field analysis on the response packet to determine whether there is a protocol - logic processing anomaly in the cycle polling unit; The execution steps of the module - type detection include: For the request packet sent by the cycle polling unit, determine the module type of the associated communication module according to the request packet; When the module type does not match the module type of the I / O module that receives the request packet, set the preset module quality bit in the response packet fed back by the I / O module to identify the abnormal state of the communication module; Based on the abnormal state and the response format corresponding to the protocol number of the request packet, determine whether the module type of the communication module is consistent with the hardware type of the I / O module to determine whether there is an abnormal module type match in the communication module.
[0009] In a possible implementation manner, the preset communication interaction mechanism includes: a timeout detection mechanism, and the communication module includes: a timeout detection unit, and the timeout detection unit is specifically used for: Within a single polling cycle, if the cycle polling unit does not receive the response packet fed back by the I / O module, it is determined that the I / O module has no response and the number of times the I / O module has no response is recorded; If the number of times of no response reaches a preset threshold, it is determined that the I / O module has a fault.
[0010] In a second aspect, an embodiment of the present application provides a control network, which is applied to a distributed control system. The distributed control system includes: an operation module, at least one communication module, and a plurality of I / O modules. Each communication module has a separately associated redundant communication module. Each I / O module is connected to the communication module and the associated redundant communication module through at least two CNET buses to form a redundant communication link; the CNET is a custom control network protocol, and the main nodes of the CNET are the communication module and the associated redundant communication module, and the slave nodes of the CNET are the I / O modules; The communication module is used to implement data communication management between the operation module and the I / O module according to the preset communication interaction mechanism in the CNET, and perform abnormal detection on each I / O module, the communication module, and multiple CNET buses.
[0011] In a possible implementation manner, a plurality of I / O modules are connected to each CNET bus; the preset communication interaction mechanism includes: a cycle polling mechanism, and the communication module includes: a cycle polling unit, and the cycle polling unit is specifically used for: Receive an upper-layer instruction from the operation module and convert the upper-layer instruction into a frame format corresponding to the CNET to determine a request packet for each I / O module; For each of the multiple I / O modules connected to the CNET bus, based on the polling period specified by the periodic polling mechanism, request packets are sequentially sent to each of the I / O modules to receive response packets fed back by each of the I / O modules; the polling period includes the sending time of the request packet and the feedback time of the response packet; If the response packet is not received within the polling period or the response packet has a checksum error, it is determined that the associated I / O module has no response and polling proceeds to the next I / O module; Among them, the polling of multiple I / O modules on each CNET bus is independent of each other, and within a single polling period for each CNET bus, the request packets sent by the periodic polling unit are unique.
[0012] In a possible implementation, the preset communication interaction mechanism includes: a time synchronization processing mechanism; the communication module includes: a time synchronization processing module, and the time synchronization processing module is specifically used for: When the local clock of the communication module triggers the time synchronization processing moment specified by the time synchronization processing mechanism, a time synchronization request sending process is started to send a time synchronization request to each of the multiple I / O modules connected to the CNET bus; the time synchronization request is a broadcast frame; For the CNET bus with the most I / O modules connected among each of the CNET buses, after all the I / O modules on the CNET bus are polled, a time synchronization request is sent to each of the multiple I / O modules connected to the CNET bus; After the time synchronization requests for each of the CNET buses are sent, a time synchronization completion instruction is sent to the periodic polling unit to cause the periodic polling unit to re-execute the periodic polling mechanism for each of the I / O modules.
[0013] In a possible implementation, the CNET includes: a physical layer, a data link layer, and an application layer; The physical layer adopts a bus-type RS485 half-duplex link architecture, and a single communication module supports the connection of multiple CNET buses; the physical layer adopts an asynchronous transmission character encoding structure, and each character includes: a single start bit for synchronizing data reception, multiple data bits for carrying valid data, a single parity check bit for detecting single-byte transmission errors, and a single stop bit for identifying the end of the character; The data link layer adopts an asynchronous transmission mode of DLPDU with a non-fixed field length, and the data link layer is used to define the request frame structure of the request packet and the response frame structure of the response packet; both the request frame structure and the response frame structure include: a synchronization byte, a start delimiter, a length field, a repeated length field, a destination address, a source address, a function code, a data unit, a frame check sequence, and an end delimiter; The application layer is used to detect data interaction anomalies when data interaction occurs between the communication module and the I / O module.
[0014] Compared with the prior art, the present application has the following beneficial effects: The embodiments of the present application provide a distributed control system and a control network. In the distributed control system provided by the embodiments of the present application, it includes: an operation module, at least one communication module, and multiple I / O modules. Each communication module has a separately associated redundant communication module. Each I / O module is connected to the communication module and the associated redundant communication module through at least two CNET buses to form a redundant communication link; CNET is a custom control network protocol, and the master nodes of CNET are the communication module and the associated redundant communication module, and the slave nodes of CNET are the I / O modules; the communication module is used to implement data communication management between the operation module and the I / O module according to the preset communication interaction mechanism in CNET, and perform anomaly detection on each I / O module, the communication module, and multiple CNET buses. Through the custom CNET protocol, a protocol stack can be customized for the specific data interaction requirements of the distributed control system in nuclear power plants, avoiding the impact of redundant functional modules in general protocols on data transmission efficiency and reducing the ineffective overhead of data transmission. At the same time, CNET adopts a master-slave architecture with the communication module as the master node and the I / O module as the slave node. The communication module dominates the communication process between the operation module (i.e., the CPU module) and the I / O module, thereby eliminating the delay caused by node competition in the distributed protocol and improving communication efficiency. On this basis, each I / O module is connected to the communication module and the redundant communication module through at least two CNET buses to form physical layer redundancy. When a single bus or a single communication module fails, the redundant link can seamlessly take over the communication, avoiding retransmission, interruption, or system restart caused by faults, ensuring the continuity of data transmission, reducing the ineffective waiting time, and thus achieving the effect of improving communication efficiency. Description of the Drawings
[0015] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0016] Figure 1 Schematic diagram of the connection structure of a distributed control system provided by an embodiment of the present application; Figure 2 Schematic diagram of the physical layer of a CNET control network protocol provided by an embodiment of the present application; Figure 3 Schematic flowchart of a method for implementing a periodic polling mechanism provided by an embodiment of the present application; Figure 4 Schematic diagram of a periodic polling mechanism provided by an embodiment of the present application; Figure 5 Schematic flowchart of a method for implementing a time synchronization processing mechanism provided by an embodiment of the present application; Figure 6 Schematic flowchart of a method for implementing a timeout detection mechanism provided by an embodiment of the present application. Detailed implementation manners
[0017] To make the objectives, technical solutions and advantages of the present application more clear and understandable, the following further details the present application in combination with specific embodiments and with reference to the accompanying drawings. It should be particularly noted that the embodiments described in the embodiments of the present application are only a part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts fall within the scope of protection of the present application.
[0018] It should be noted that unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the ordinary meaning understood by those of ordinary skill in the art to which the present application belongs. The "first", "second" and similar terms used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left" and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0019] As described above, in the currently relevant technologies, a mature bus protocol is often selected for the control network, such as the DP protocol, the CAN bus protocol, and so on. Although these mature bus protocols have high versatility, they are often applied to traditional industrial fields and cannot fully adapt to the specific architecture of the DCS system in nuclear power plants, which easily leads to the problem of low communication efficiency between the CPU module and the I / O module.
[0020] To solve the above problems, the embodiments of the present application provide a distributed control system and a control network. In the distributed control system provided by the embodiments of the present application, it includes: an operation module, at least one communication module, and a plurality of I / O modules. Each of the communication modules has a separately associated redundant communication module. Each of the I / O modules is connected to the communication module and the associated redundant communication module through at least two CNET buses to form a redundant communication link; the CNET is a custom control network protocol, and the master nodes of the CNET are the communication module and the associated redundant communication module, and the slave nodes of the CNET are the I / O modules; the communication module is used to manage the data communication between the operation module and the I / O module according to the preset communication interaction mechanism in the CNET, and perform anomaly detection on each of the I / O modules, the communication module, and the plurality of CNET buses. Through the custom CNET protocol, a protocol stack can be customized for the specific data interaction requirements of the distributed control system in nuclear power plants, avoiding the impact of redundant functional modules in general protocols on data transmission efficiency and reducing the ineffective overhead of data transmission. At the same time, the CNET adopts a master-slave architecture with the communication module as the master node and the I / O module as the slave node. The communication module dominates the communication process between the operation module (i.e., the CPU module) and the I / O module, thereby eliminating the delay caused by node competition in the distributed protocol and improving communication efficiency. On this basis, each I / O module is connected to the communication module and the redundant communication module through at least two CNET buses to form physical layer redundancy. When a single bus or a single communication module is abnormal, the redundant link can seamlessly take over the communication, avoiding retransmission, interruption, or system restart caused by faults, ensuring the continuity of data transmission, reducing the ineffective waiting time, and thus achieving the effect of improving communication efficiency.
[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.
[0022] See Figure 1 , which is a schematic diagram of the connection structure of a distributed control system provided by an embodiment of the present application. In this distributed control system (corresponding to the DCS system in a nuclear power plant), there are an operation module (corresponding to the CPU module), multiple I / O modules, at least one communication module, and an associated redundant communication module. Figure 1 What is shown is a schematic diagram of a DCS system with multiple communication modules. As shown in the figure, the operation module serves as the core of the system, undertaking the tasks of data logic processing and control algorithm operation. The output instructions of the operation module are transmitted to the on-site I / O modules through the communication module, and it constructs communication with the I / O modules through the communication module. The communication module and the redundant communication module form a dual-machine hot standby architecture. They are physically independently deployed and logically backup each other to ensure that system communication is not interrupted when a single module fails.
[0023] Each I / O module is responsible for signal acquisition of on-site devices and execution of data acquisition instructions. It is connected to the communication module and the redundant communication module respectively through two independent CNET buses, forming a redundant communication link of "dual master nodes - multiple slave nodes". This design enables each I / O module to interact with the main communication module or the redundant communication module in real time at any moment, avoiding the risk of communication interruption caused by a single point of failure.
[0024] CNET is a custom control network protocol in the embodiment of the present application. The corresponding CNET bus adopts the bus-type topology structure as Figure 1 shown. A single bus supports communication between 1 master node (communication module or redundant communication module) and multiple slave nodes (I / O modules). In Figure 1 the shown application scenario, the communication module can manage 6 independent CNET buses simultaneously to achieve parallel control of multiple I / O modules. Regarding the custom CNET control network protocol in the embodiment of the present application, its core purpose is to eliminate the redundant functions in the conventional general bus protocol, only retain the core communication logic necessary for the DCS system of the nuclear power plant, and precisely adapt to the DCS system architecture of the nuclear power plant, so as to achieve the effect of improving the communication efficiency between the operation module and the I / O module.
[0025] In this embodiment, the custom CNET control network protocol is divided into a physical layer, a data link layer, and an application layer. Each layer realizes the elimination of redundant communication functions through specific architecture settings and transmission mode settings. Next, the physical layer, data link layer, and application layer of CNET will be introduced in sequence according to the specific embodiment drawings.
[0026] See Figure 2, this figure is a schematic diagram of the physical layer of a CNET control network protocol provided by an embodiment of the present application. In the embodiment of the present application, the physical layer design of the CNET protocol closely revolves around the high real-time and high reliability requirements of the nuclear power plant DCS system, aiming to combine multi-channel parallel transmission with a simple asynchronous coding mechanism to build a low-cost and high-efficiency underlying communication channel. The core features and functions of the physical layer can be summarized into the following three aspects: multi-bus parallel transmission architecture, lightweight asynchronous character coding, and industrial standard hardware adaptability.
[0027] Specifically, the physical layer adopts a bus-type RS485 half-duplex link architecture, and a single communication module supports the connection of multiple CNET buses. Further, the physical layer adopts an asynchronous transmission character coding structure, and each character includes: a single start bit for synchronizing data reception, multiple data bits for carrying valid data, a single parity check bit for detecting single-byte transmission errors, and a single stop bit for indicating the end of the character.
[0028] Specifically, at the level of the multi-bus parallel transmission architecture, the physical layer selects RS485 as the transmission medium and adopts a half-duplex master-slave communication mode, so that a single bus supports 1 master node (communication module or redundant module) and multiple slave nodes (I / O modules, up to 10 I / O modules in actual application scenarios). A single communication module can be simultaneously connected to multiple independent CNET buses (6 in actual application scenarios). This design inherits the mature technical advantages of RS485: differential signal transmission has strong anti-interference ability and is suitable for the complex electromagnetic environment of industrial sites. In the half-duplex mode, the master node exclusively controls the bus, and the slave node only responds when it receives a request, which naturally adapts to the "polling-response" interaction logic of the DCS system. At the character coding level, the physical layer adopts an 11-bit character structure for asynchronous transmission (1 start bit + 8 data bits + 1 parity check bit + 1 stop bit), without the need for an additional synchronous clock signal. The start bit and stop bit are used to achieve self-synchronization at the receiving end, simplifying the hardware design complexity. At the same time, the parity check bit provides real-time error detection ability for single-byte data, ensuring the basic reliability of the underlying transmission.
[0029] The improvement of this physical layer design on communication efficiency is reflected in multiple dimensions. First, the half-duplex master-slave architecture and the multi-bus parallel mechanism directly improve the system throughput. Traditional full-duplex buses need to handle two-way data conflicts, while the half-duplex mode of CNET is uniformly scheduled by the master node, completely avoiding bus contention and improving the bandwidth utilization rate. A single communication module supports 6 buses to work in parallel, which is equivalent to distributing the communication tasks of the I / O module to 6 independent channels for synchronous execution - assuming that the polling cycle of 10 nodes on a single bus is 20ms, 6 buses can compress the overall polling cycle to 3.3ms, meeting the strict requirements of the nuclear power plant for "millisecond-level response" to control instructions.
[0030] Secondly, at the lightweight asynchronous character encoding level, the lightweight asynchronous design for the character encoding structure reduces the transmission overhead and processing latency. The character structure for asynchronous transmission abandons the complex headers and trailers in the synchronous protocol (such as the preamble in Ethernet), and each character is transmitted independently. This enables the receiving end to dispense with maintaining global clock synchronization and only trigger the receiving state machine through the start bit, significantly reducing the hardware processing complexity of the slave node. Taking 8-bit valid data bits as an example, the transmission efficiency (the proportion of valid data) of a single character reaches 72.7%, which is approximately 15% higher than that of some synchronous protocols (such as protocols with more control bits). The introduction of parity check bits enables real-time detection of single-byte errors without significantly increasing the transmission load (only adding 1 bit). That is, when the slave node receives a character with a parity check error, it can immediately discard it and wait for the master node to retransmit, preventing invalid data from entering the link layer processing and reducing the error correction pressure of the upper-layer protocol at the source.
[0031] Finally, at the level of industrial standard hardware adaptability, the wide application of RS485 enables the CNET physical layer to dispense with relying on a dedicated communication chip and can be directly implemented through the UART interface of a common industrial-grade MCU (such as STM32), reducing the hardware cost by more than 40% compared with dedicated buses (such as the Profibus-DP bus). This "de-dedicated" design not only reduces the chip procurement cost but also avoids the startup latency caused by the complex initialization process of dedicated protocol chips, enabling the communication module to quickly enter the working state after power-on. In addition, the bus-type topology supports hot-swap maintenance. When a single I / O module or the bus fails, the device can be replaced without interrupting other bus communications, further reducing the downtime caused by system maintenance and ensuring the overall communication efficiency from the perspective of availability.
[0032] The above is the introduction to the CNET physical layer in this embodiment. Next, the data link layer of the CNET in the embodiments of this application will be introduced.
[0033] It should be noted in advance that the data interaction between the operation module and the I / O module is achieved by the communication module forwarding the request packet sent by the operation module to the I / O module and returning the response packet feedback by the I / O module for this request packet. The main role of the data link layer is to define the frame formats of the request packet and the response packet in this data interaction process to achieve the precision of data interaction and the maximization of transmission efficiency between the operation module and the I / O module.
[0034] Specifically, the data link layer adopts an asynchronous transmission mode of DLPDU with a variable field length. The data link layer is used to define the request frame structure of the request packet and the response frame structure of the response packet. Both the request frame structure and the response frame structure include: a synchronization byte, a start delimiter, a length field, a repeated length field, a destination address, a source address, a function code, a data unit, a frame check sequence, and an end delimiter. The core features and functions of the data link layer can be summarized into the following three aspects: a flexible adaptation mechanism for dynamic frame lengths, an accurate addressing architecture for directional interaction, and a dual verification and process optimization to ensure the balance between reliability and efficiency.
[0035] Refer to Tables 1 - 3 below. Tables 1 - 2 are the request frame formats of the master station (i.e., the arithmetic module), and Table 3 is the response frame format of the slave station (corresponding to the I / O module).
[0036] Table 1
[0037] Table 2
[0038] Table 3
[0039] As can be seen from the designs of the request frames and response frames in Tables 1 - 3 above, both the request frames and response frames defined by the data link layer contain a synchronization byte (SYNC), a start delimiter (SD), a length field (LENGTH), a repeated length field (REP_LENGTH), a destination address (DEST_ADDR), a source address (SRC_ADDR), a function code (FUNC_CODE), a data unit (DATA_UNIT), a frame check sequence (FCS), and an end delimiter (ED). Among them, the variable field length is the core innovation point, that is, the length of the data unit (carrying the status data or control instructions of the I / O module) can be dynamically adjusted according to the actual business, avoiding the redundant transmission caused by the fixed frame format in general protocols (such as the fixed frame header of Modbus accounting for up to 40%). The asynchronous transmission mode is deeply adapted to the RS485 half-duplex architecture of the physical layer, and quickly identifies the frame boundary through the "synchronization byte + delimiter", without relying on strict clock synchronization, simplifying the parsing logic of the slave node.
[0040] This design for the data link layer improves communication efficiency in multiple aspects. First, at the level of the flexible adaptation mechanism of the dynamic frame length mentioned above, in the traditional fixed-frame protocol (such as Profibus-DP), regardless of the data volume, fixed fields need to be filled to meet the format requirements. However, in the data link layer of CNET in this embodiment, the frame body can be dynamically generated according to the actual data unit length. When transmitting simple control instructions (assuming a single-channel switch operation, and the data unit only requires 1 byte), the frame length can be compressed to a minimum of 12 bytes, reducing the redundant bytes by 30% - 50% compared with the fixed-frame protocol. When transmitting multi-channel analog data (the data unit reaches 50 bytes), the frame length automatically expands to avoid the overhead of multiple sub-packet transmissions.
[0041] Second, at the level of the precise addressing architecture for directional interaction, the destination address field (8 bits, supporting 256 slave nodes) enables the main node operation module to precisely address a specific I / O module. The slave node I / O module only continues to process the subsequent fields when it resolves its own address, otherwise it directly discards the frame. This mechanism, combined with the frame structure design of "address field preposition" (the address field is in the 3rd and 4th bytes after the delimiter), enables the slave node to quickly complete address matching after receiving the first 4 bytes. Compared with the mechanism in the general protocol that needs to parse the entire frame header to determine whether to receive, the single-frame filtering efficiency is increased by 60%. For example, when the main node polls 10 slave nodes, each slave node only needs to process 10% of the total number of frames on average, and the CPU load caused by the parsing of invalid frames is reduced by 70%, releasing more resources for the I / O module to process real-time data, thus achieving the effect of improving communication efficiency.
[0042] Finally, at the level of double verification and process optimization to ensure the balance between reliability and efficiency, the "double verification" design of the length field and the repeated length field ensures that the receiving end verifies the length consistency before parsing the frame, avoiding the invalid parsing of the entire frame caused by transmission errors. The frame check sequence (FCS) then verifies the entire frame data, providing a more powerful error detection ability than the parity check at the physical layer, reducing the frame retransmission probability caused by bit errors to less than 0.1%. This double-layer mechanism of "single-byte parity check + entire-frame CRC check" almost eliminates the repeated interactions caused by data errors with only a 1.5% increase in transmission overhead. Compared with the mechanism in the general protocol that relies on upper-layer retransmissions, the communication efficiency is significantly improved.
[0043] The above is the introduction to the data link layer of CNET in this embodiment. Next, the application layer of CNET in this application embodiment will be introduced.
[0044] In this embodiment, the application layer of the CNET protocol is the top layer of data interaction. The application layer is mainly used to detect data interaction anomalies in the request packets and response packets transmitted between the operation module and the I / O module through the communication module, so as to detect possible data interaction anomalies during the communication process.
[0045] Specifically, the types of data interaction anomaly detection that the application layer can perform include: I / O address consistency detection, I / O address repeatability detection, protocol number validity detection, and module type detection. Next, the above four anomaly detection methods will be introduced in turn.
[0046] First, introduce the execution steps of I / O address consistency detection. The application layer performs I / O address consistency detection including the following two steps: Step 1: Determine the target I / O module address based on the request packet sent by the cycle polling unit to the I / O module.
[0047] The target I / O module address (DA field in Table 2) is dynamically filled by the application layer according to the DIP address of the I / O module currently being interacted with. For example, when the main node communication module needs to communicate with the 1st I / O module, the DA field of the request packet is assigned 0x01 (corresponding to the module DIP address), and this address is sent to the bus after being encapsulated by the data link layer along with the request packet. At this time, all I / O modules on the bus will receive this request packet, but the detection mechanism is only triggered after the receiving module parses the data link layer frame header - specifically, after the slave node I / O module completes the decoding from 8 bits to 11 bits at the physical layer, it first extracts the DA field (destination address) of the data link layer and synchronously reads the physical address set by its own hardware DIP (range 0x01~0x0A), and then enters the I / O address consistency verification process.
[0048] Step 2: If the DIP address of the target I / O module is inconsistent with the DIP address of the I / O module that receives the request packet, it is determined that the request packet is abnormal, and the I / O module is controlled to discard the request packet.
[0049] When the address consistency detection determines an anomaly, that is, the target I / O module address is inconsistent with the DIP address of this I / O module, the I / O module directly discards the request packet and does not respond to the corresponding response packet, avoiding the main node entering the retransmission process due to incorrect responses and reducing the bus redundancy traffic. On the other hand, this I / O module internally records this abnormal event, such as the error address, occurrence time, link number, etc., and reports it to the communication module during the next normal interaction for the operation and maintenance system to analyze the reason for the address misalignment. This design not only ensures that the efficiency of the current communication cycle is not affected by abnormal frames, but also provides complete traceability information for subsequent fault troubleshooting.
[0050] The above is the process introduction for I / O address consistency detection. Next, the execution process of I / O address duplication detection will be introduced. Specifically, the execution process of I / O address duplication detection includes the following execution steps: Step 1: If the cycle polling unit receives at least two response packets with the same address within a single polling cycle, it is determined that there is an abnormal address configuration conflict in the I / O module associated with the response packet.
[0051] It should be noted in advance that the I / O address duplication detection is for the polling communication process of a communication module for multiple I / O modules on a single CNET bus. As previously mentioned, in this embodiment, multiple CNET buses can be connected to a single communication module, and multiple I / O modules can be arranged on each CNET bus. Therefore, when the communication module communicates with multiple I / O modules on a CNET bus, in order to prevent multiple I / O modules from competing for the same CNET bus simultaneously, the communication module needs to sequentially poll all the I / O modules on a CNET bus in order through the built-in cycle polling unit and a preset polling cycle.
[0052] The I / O address duplication detection process is the detection process for the communication module when polling each I / O module. In the polling process of the communication module, the communication module sends request packets to the I / O modules on each CNET bus in a preset order. After each slave node receives the request packet, it returns a response packet through the corresponding link. The duplication detection mechanism at the application layer only takes effect within a single polling cycle, that is, according to the protocol definition, a complete polling cycle covers the sequential interrogation and response reception process of the master node for all slave nodes on a certain bus (for example, the link polling cycle for 10 I / O modules is 20 ms). When the master node receives the response packet, it first parses the SA field (source address, that is, the DIP switch address of the I / O module, range 0x01~0x0A) in the data link layer, and extracts it to the temporary buffer area at the application layer to form the response address list within this cycle.
[0053] The key technical point of this process lies in real-time address caching and cycle isolation: The communication module maintains an independent address cache space for each CNET bus, and clears the cache at the start of each polling cycle to ensure that only the response addresses within the current cycle are stored. For example, when the communication module sequentially receives responses from 10 I / O modules within a 20 ms cycle, the SA fields of each response packet (such as 0x03, 0x05, 0x03) will be stored in the cache list in the order of reception. The detection mechanism continuously monitors this list during the cycle. Once it finds the same address (such as 0x03) appearing twice or more, it immediately triggers the duplicate address determination logic. This cycle-based isolation design avoids cross-cycle address confusion and ensures that the detection result only reflects the immediate status during the current polling process.
[0054] The above is the process introduction for I / O address repeatability detection. Next, the execution process of protocol number validity detection will be introduced. Specifically, the execution process of protocol number validity detection includes the following three execution steps: Step 1: For the request packet sent by the cycle polling unit, obtain the protocol number of the request packet.
[0055] In the data interaction scenario of this embodiment, the request packets sent by the communication module (specifically, the cycle polling unit set inside it) to each I / O module all contain a 16-bit protocol number field, which is used to identify the protocol version and function type to which the request packet belongs. When the I / O module receives a request packet, the application layer first strips the data link layer encapsulation, extracts the protocol number, and compares it with the preset range (0x0001~0xFFFF): if the protocol number is 0x0000 or exceeds 0xFFFF, it is determined as an invalid protocol number, and the exception response process is immediately triggered; if the protocol number is within the valid range, the request packet is allowed to enter the subsequent function code parsing link.
[0056] Step 2: If the protocol number of the request packet exceeds the preset range, control the I / O module that receives the request packet to feedback the response packet to the cycle polling unit based on the data acquisition format.
[0057] When it is detected that the protocol number exceeds the preset range, the I / O module follows the principle of "safety response first", abandons the execution of the instruction logic, and instead generates a response packet according to the fixed data acquisition format and feeds it back to the master node. This response packet contains three key fields: the original error protocol number (completely retaining the illegal protocol number in the request packet for easy traceability by the master node), the error code 0xEE (used to identify the protocol number invalid exception), and the module status word (used to represent the hardware status of the current I / O module, such as normal power supply, communication link connection status, etc.). It should be noted that the generation of the response packet strictly follows the data link layer format of the CNET protocol, and only fills the exception information in the application layer data unit to ensure that the master node can parse it normally.
[0058] The core function of this step is to pre-filter illegal protocol formats. For example, when the communication module accidentally sends a request packet with a protocol number of 0x0000 due to software exceptions, the I / O module can directly identify the exception without having to parse the subsequent function codes, avoiding incorrect execution of instructions caused by protocol version mismatches. This mechanism improves the abnormal response speed of the protocol number compared to the traditional protocol that can only detect protocol number errors after completely parsing the instructions, significantly reducing the invalid computing consumption of the slave node.
[0059] Step 3: Analyze the fields of the response packet to determine whether there is an abnormal protocol logic processing in the cycle polling unit.
[0060] After the master node receives an abnormal response packet, the application layer starts a three-level progressive analysis process: First, parse the error code field to confirm whether it is an abnormal protocol number. Second, verify whether the original protocol number actually exceeds the preset range. Finally, combine the historical communication records within the current polling cycle to determine whether there is a persistent protocol logic abnormality - if the same type of abnormality occurs 3 times or more within a single cycle, it is determined that the protocol processing function of the cycle polling unit in the communication module fails.
[0061] The above is the process introduction for the validity detection of the protocol number. Next, the execution process of the module type detection will be introduced. Specifically, the execution process of the module type detection includes the following three execution steps: Step 1: For the request packet sent to the cycle polling unit, determine the module type of the associated communication module according to the request packet.
[0062] The module type detection mechanism is used to ensure the functional compatibility between the communication module and the I / O module, so as to avoid the problem of instruction failure caused by mismatched module types.
[0063] In the CNET self-defined protocol framework of this embodiment, the communication module type and the I / O module type are defined by both hardware identifiers and protocol fields. The communication module embeds a 2-bit type code (0x01 for digital quantity module, 0x02 for analog quantity module, 0x03 for special function module) in the control field of the request packet to clarify the instruction types it supports. The I / O module solidifies the module type through the hardware DIP switch combination and firmware version information (for example, 0x01 corresponds to the digital input module, 0x02 corresponds to the analog output module). When the I / O module receives the request packet, the application layer first parses the control field to obtain the communication module type code, and at the same time reads the module type identifier in the local hardware configuration, and enters the two-way type comparison process.
[0064] Step 2: When the module type does not match the module type of the I / O module that receives the request packet, set the preset module quality bit in the response packet fed back by the I / O module to identify the abnormal state of the communication module.
[0065] If the communication module type code is inconsistent with the I / O module hardware type, when the I / O module generates a response packet, set the preset "module type mismatch bit" (the 7th bit, default 0 for normal, 1 for abnormal) in the status field of the data unit, and at the same time retain the key information of the original request packet (such as type code, protocol number, timestamp) to ensure that the master node communication module can trace the source of the abnormality. It should be noted that the response packet still follows the frame format of the CNET protocol for encapsulation, and only transmits the abnormal information through the change of the status of the quality bit, neither blocking the communication link nor affecting the normal parsing of other fields, realizing the decoupling of abnormal identification and functional communication.
[0066] Step 3: Based on the abnormal status and the response format corresponding to the protocol number of the request packet, determine whether the module type of the communication module is consistent with the hardware type of the I / O module, so as to determine whether there is an abnormal module type matching in the communication module.
[0067] After the communication module receives the response packet for setting the quality bit, it starts a two-layer logic determination process. First, confirm the risk of module type matching based on the abnormal status bit. Second, combined with the response format corresponding to the protocol number of the request packet, verify whether the hardware type of the I / O module supports this instruction function. For example, the protocol number 0x0010 corresponds to the analog calibration instruction. If the target I / O module is of the digital input type (hardware type 0x01), the calibration data field in its response format should be all 0 and accompanied by an error bit. At this time, the master node can clearly determine that the type mismatch causes the function to be unavailable.
[0068] The above is a detailed introduction to the physical layer, data link layer, and application layer of the custom control protocol CNET in the embodiments of the present application. As mentioned before, in this embodiment, the data interaction and communication between the operation module and the I / O module are implemented based on the communication module and the CNET protocol architecture defined in this embodiment. Among them, the communication module aims to implement the data communication management between the operation module and the I / O module according to the preset communication interaction mechanism in CNET, as well as the abnormal detection of each I / O module, the communication module, and multiple CNET buses. Among them, the preset communication interaction mechanism specifically includes: a periodic polling mechanism, a time synchronization processing mechanism, and a timeout detection mechanism. Next, combined with the specific embodiment drawings, these three communication interaction mechanisms will be introduced in turn.
[0069] First, introduce the periodic polling mechanism. See Figure 3 , which is a schematic flowchart of a method for executing the periodic polling mechanism provided by the embodiment of the present application, specifically including the following steps: S101: Receive the upper-layer instruction from the operation module, and convert the upper-layer instruction into the frame format corresponding to CNET to determine the request packet for each I / O module.
[0070] The periodic polling interaction mechanism is implemented by a periodic polling unit set in the communication module. As mentioned before, multiple CNET buses can be connected to a single communication module, and multiple I / O modules can be connected to a single CNET bus. To prevent multiple I / O modules on a single CNET bus from competing for the bus, the periodic polling unit needs to poll the communication with each I / O module in turn based on a preset polling period, so as to ensure the efficient cooperation of multiple I / O modules in a complex bus environment.
[0071] Specifically, the periodic polling unit first receives upper-layer control instructions from the operation module, such as data acquisition, device control, status query, etc. These instructions carry key information such as I / O module address, function code, data parameters, etc. The polling unit converts the upper-layer instructions into request packets in a specific frame format according to the CNET protocol standard. The frame structure contains 7 necessary fields: synchronization header (2 bytes), source address (SA, 1 byte), destination address (DA, 1 byte), protocol number (2 bytes), data length (1 byte), data unit (N bytes), and frame check sequence (FCS, 2 bytes). Among them, the destination address DA directly corresponds to the DIP switch address of the I / O module (0x01~0x0A), the protocol number identifies the instruction type (such as 0x0001 for analog quantity acquisition and 0x0002 for digital quantity output), and the data unit fills in specific parameters according to the function code, such as the target value of the control instruction, the channel number of the acquisition instruction, etc.
[0072] S102: For each of the multiple I / O modules connected to the CNET bus, based on the polling period specified by the periodic polling mechanism, request packets are sequentially sent to each of the I / O modules to receive response packets fed back by each of the I / O modules; the polling period includes the sending time of the request packet and the feedback time of the response packet.
[0073] For multiple I / O modules on each CNET bus, the periodic polling unit performs sequential addressing according to the polling period. The specific process is as follows: At the beginning of the polling period, the bus counter is initialized and a request packet is sent to the current address module, and the response timeout timer is started. If a response packet is received before the timeout, the FCS check is immediately performed. If it passes, the data unit is parsed and forwarded to the operation module. If an exception occurs, the status of the module is marked as "check error". Correspondingly, if no response packet is received after the timeout, it is determined as "no response", the failure count of the I / O module is recorded and the module is skipped, and the counter is incremented to point to the next address. After traversing the addresses of all I / O modules, a single bus polling period is completed, and each bus polling runs independently (for example, 3 CNET buses can perform their respective polling simultaneously).
[0074] The core of this step is to avoid bus application conflicts of multiple I / O modules through the periodic polling mechanism. For example, when the polling unit sends a request to the 0x03 module, even if it detects that the 0x01 module has no response midway, it will not resend the request packet for 0x01 until the next cycle traverses again. This "sequential unicast + timeout skip" strategy can ensure the throughput of effective data when the bus is fully loaded (that is, the maximum number of I / O modules has been connected to the CNET bus) compared with the traditional polling mechanism.
[0075] S103: If the response packet is not received within the polling period or the response packet verification fails, it is determined that the associated I / O module has no response, and polling proceeds to the next I / O module. When there is no response or the response packet verification fails, the polling unit performs hierarchical fault tolerance processing: during the first exception, only the log is recorded and polling continues. If the same module experiences exceptions in three consecutive cycles, a deep diagnosis process is triggered. That is, a special diagnostic frame (protocol number 0xFFFF) is sent to request the I / O module to return its hardware status. If the diagnostic frame still receives no response, it is determined that the module has failed, and the operation and maintenance system is notified via the redundant channel and the standby module is switched to. This progressive fault determination mechanism can effectively distinguish between temporary link interference and real device failures.
[0076] To better understand the cycle polling mechanism implemented by the cycle polling unit, the implementation process of the cycle polling mechanism will be summarized and described below with reference to a specific schematic diagram.
[0077] See Figure 4 , which is a schematic diagram of a cycle polling mechanism provided by an embodiment of the present application. In the figure, the polling period between the communication module and a single I / O module is strictly fixed at 2 ms. The polling period can actually be divided into: the request packet sending time (T1 = 2 ms) and the response packet feedback time (T2 = 2 ms), and the two constitute a complete communication cycle closed-loop. Among them, the request packet adopts a segmented structure of "instruction header + instruction body", and the interval T3 between the two segments needs to be greater than 20 μs to provide the I / O module with a necessary address resolution window. The specific process is as follows: The communication module first sends the instruction header (including key identifiers such as I / O address and frame synchronization code), and keeps the bus silent during the T3 interval to allow the I / O module to complete address resolution within 20 μs. If the address matches (i.e., the target address in the instruction header is the same as the local DIP address), the I / O module continues to receive the subsequent instruction body. If the address does not match, the request packet is immediately discarded and no response is given. This segmented design preposes address recognition, avoids invalid data from occupying bus resources, and actual measurements show that it can reduce redundant data transmission by 30%, while ensuring that the time margin for address resolution meets the industrial-level real-time requirements.
[0078] The above is the introduction to the cycle polling mechanism. Next, the time synchronization processing mechanism processed by the communication module will be introduced, and the time synchronization processing mechanism is implemented by the time synchronization processing unit set in the communication module.
[0079] See Figure 5 , which is a schematic flowchart of a method for implementing a time synchronization processing mechanism provided by an embodiment of the present application, and specifically includes the following steps: S201: When the local clock of the communication module triggers the time synchronization processing moment specified by the time synchronization processing mechanism, start the time synchronization request sending process to send a time synchronization request to multiple I / O modules connected to each CNET bus; the time synchronization request is a broadcast frame. S202: For the CNET bus with the most I / O modules connected in each CNET bus, after all the I / O modules on the CNET bus complete polling, send the time synchronization request to multiple I / O modules connected to each CNET bus.
[0080] The time synchronization processing mechanism is the core function to ensure the clock synchronization between each I / O module and the communication module. When the local clock count reaches the preset moment, the time synchronization processing unit immediately starts the time synchronization request sending process. First, perform bus status detection. If there is a current ongoing periodic polling (such as the polling of I / O modules on a certain CNET bus is not completed), then wait for the bus to complete the current polling cycle first to avoid time synchronization broadcasts interfering with normal data interaction. In particular, for the CNET bus with the largest number of connected I / O modules (i.e., the bus with the heaviest load, such as a bus with 8 modules mounted), the time synchronization unit forcibly requires all module polling to be completed before sending the time synchronization request to ensure that the bus is in a low-load state when the broadcast frame is sent and reduce the probability of communication conflicts.
[0081] Among them, the time synchronization request is sent in the form of a broadcast frame, and the frame structure contains key information such as a 32-bit timestamp, a time synchronization instruction code, and a bus identifier. Before sending, the time synchronization unit performs three CRC checks on the timestamp (covering the year / month / day / hour / minute / second / microsecond fields) to ensure the integrity of the synchronization data. Taking a typical scenario in a nuclear power plant as an example, when the local clock reaches 10:00:00.100, the time synchronization unit detects that a certain bus is still polling the 7th module, so it waits for the module to complete the response (about 2 ms), and then broadcasts a time synchronization frame to all buses to ensure that each I / O module receives the synchronization signal in an environment without data conflicts.
[0082] S203: After the time synchronization requests for each CNET bus are sent, send a time synchronization completed instruction to the periodic polling unit so that the periodic polling unit re-executes the periodic polling mechanism for each I / O module.
[0083] The transmission of the time synchronization broadcast frame follows the "no response confirmation" mechanism. When the I / O module receives the broadcast frame, instead of sending a feedback response packet, it directly parses the timestamp field and compares it with the local clock. This design avoids the response storm problem of traditional time synchronization protocols and compresses the bus occupancy time of the time synchronization process to the transmission time of a single broadcast frame, thus improving communication efficiency. At the same time, the time synchronization processing unit embeds a "time synchronization priority mark" in the broadcast frame to ensure that the bus arbiter gives priority to forwarding time synchronization data. Even in the case of high bus load, the transmission delay of the broadcast frame can be controlled within 20 μs. After all the time synchronization broadcasts on all CNET buses are completed, the time synchronization processing unit sends a "time synchronization completed instruction" to the periodic polling unit, thus triggering the restart of the polling mechanism on each CNET bus. After receiving the instruction, the periodic polling unit immediately resets the polling counter of each bus to ensure that the first poll after time synchronization is based on the synchronized clock, realizing the process connection of "time synchronization - data interaction". In the restart logic, the polling unit gives priority to handling the possible delay during the time synchronization process: if the cumulative deviation of the polling cycle caused by the time synchronization operation exceeds 10 μs, an "idle polling cycle" is automatically inserted to ensure that subsequent polls strictly follow a fixed cycle of 2 ms.
[0084] The above is the introduction to the time synchronization processing mechanism. Next, the timeout detection mechanism processed by the communication module will be introduced, and the timeout detection mechanism is implemented by the timeout detection unit set in the communication module.
[0085] See Figure 6 , which is a schematic flowchart of a method for implementing a timeout detection mechanism provided by an embodiment of the present application, specifically including the following steps: S301: Within a single polling cycle, if the periodic polling unit does not receive the response packet fed back by the I / O module, it is determined that the I / O module has no response and the number of times the I / O module has no response is recorded.
[0086] In this embodiment, the core function of the timeout detection mechanism is to ensure the reliability of data interaction between the master and slave nodes (i.e., the communication module and the I / O module). Among them, the timeout detection unit, as the execution entity of this mechanism, is tightly coupled with the periodic polling process. By dynamically recording the number of times without response and comparing it with the threshold, it effectively distinguishes between temporary link interference and real device failures.
[0087] Specifically, the timeout detection unit is deeply bound to the periodic polling mechanism, and monitors the response packet reception status in real time within each 2ms polling cycle. After the periodic polling unit sends a request packet to the target I / O module, the timeout detection unit synchronously starts a 2ms countdown timer (equal in length to the polling cycle). If a complete response packet (including a valid frame with passed CRC check) is not received before the countdown ends, it is immediately determined that the module has "no response in a single cycle", and the number of times the I / O module has no response is recorded. After the recording is completed, the timeout detection unit sends a "skip instruction" to the periodic polling unit, causing it to immediately terminate the current module interaction and enter the next module polling. This "cycle-level real-time detection" mechanism ensures that the communication anomaly of a single module does not occupy the polling time of subsequent modules, and guarantees the timing independence of multi-module parallel communication.
[0088] S302: If the number of times of no response reaches a preset threshold, it is determined that the I / O module has a fault.
[0089] Furthermore, to avoid misjudgment caused by single interference, only when the no-response counter of a certain I / O module reaches a preset threshold (usually 3 times), that is, no valid response is received in three consecutive polling cycles (6ms), the "deep fault diagnosis process" is triggered. Before that, the first two times of no response are only recorded as warnings and do not trigger the determination of hardware faults, giving a time window for temporary link recovery (for example, the instantaneous poor contact of the wiring terminal may recover within 2ms). In the deep diagnosis stage, the detection unit collaborates with the periodic polling unit to send a dedicated test frame. If there is still no response or a check error for the test frame, it is officially determined that the module "has a fault", the status is marked as "offline", and a fault alarm is sent to the operation and maintenance system through the redundant communication channel to effectively distinguish between accidental faults and permanent faults of the I / O module.
[0090] Embodiments of the present application provide a distributed control system and a control network. In the distributed control system provided by the embodiments of the present application, it includes: an operation module, at least one communication module, and multiple I / O modules. Each communication module has a separately associated redundant communication module. Each I / O module is connected to the communication module and the associated redundant communication module through at least two CNET buses to form a redundant communication link; the CNET is a custom control network protocol, and the master nodes of the CNET are the communication module and the associated redundant communication module, and the slave nodes of the CNET are the I / O modules; the communication module is used to implement data communication management between the operation module and the I / O module according to a preset communication interaction mechanism in the CNET, and perform anomaly detection on each of the I / O modules, the communication module, and multiple CNET buses. Through the custom CNET protocol, a protocol stack can be customized for the specific data interaction requirements of the distributed control system in a nuclear power plant, avoiding the impact of redundant functional modules in general protocols on data transmission efficiency and reducing the ineffective overhead of data transmission. At the same time, the CNET adopts a master-slave architecture with the communication module as the master node and the I / O module as the slave node. The communication module dominates the communication process between the operation module (i.e., the CPU module) and the I / O module, thereby eliminating the delay caused by node competition in the distributed protocol and improving communication efficiency. On this basis, each I / O module is connected to the communication module and the redundant communication module through at least two CNET buses to form physical layer redundancy. When a single bus or a single communication module is abnormal, the redundant link can seamlessly take over the communication, avoiding retransmission, interruption, or system restart caused by faults, ensuring the continuity of data transmission, reducing the ineffective waiting time, and thus achieving the effect of improving communication efficiency.
[0091] The following introduces a control network provided by the embodiments of the present application. The control network described below can be correspondingly referred to the distributed control system described above.
[0092] Embodiments of the present application provide a control network applied to a distributed control system. The distributed control system includes: an operation module, at least one communication module, and multiple I / O modules. Each communication module has a separately associated redundant communication module. Each I / O module is connected to the communication module and the associated redundant communication module through at least two CNET buses to form a redundant communication link; the CNET is a custom control network protocol, and the master nodes of the CNET are the communication module and the associated redundant communication module, and the slave nodes of the CNET are the I / O modules; The communication module is used to manage data communication between the operation module and the I / O module according to a preset communication interaction mechanism within the CNET, and to detect anomalies of each of the I / O modules, the communication module, and multiple CNET buses.
[0093] In a possible implementation, multiple I / O modules are connected to each CNET bus; the preset communication interaction mechanism includes: a periodic polling mechanism, and the communication module includes: a periodic polling unit, and the periodic polling unit is specifically used for: Receiving an upper-layer instruction from the operation module, and converting the upper-layer instruction into a frame format corresponding to the CNET to determine a request packet for each I / O module; For multiple I / O modules connected to each CNET bus, based on the polling period specified by the periodic polling mechanism, sequentially sending request packets to each I / O module to receive response packets fed back by each I / O module; the polling period includes the sending time of the request packet and the feedback time of the response packet; If the response packet is not received within the polling period or the response packet verification is incorrect, it is determined that the associated I / O module has no response and polling proceeds to the next I / O module; Among them, the polling of multiple I / O modules on each CNET bus is independent of each other, and within a single polling period for each CNET bus, the request packets sent by the periodic polling unit are unique.
[0094] In a possible implementation, the preset communication interaction mechanism includes: a time synchronization processing mechanism; the communication module includes: a time synchronization processing module, and the time synchronization processing module is specifically used for: When the local clock of the communication module triggers the time synchronization processing moment specified by the time synchronization processing mechanism, starting a time synchronization request sending process to send time synchronization requests to multiple I / O modules connected to each CNET bus; the time synchronization request is a broadcast frame; For the CNET bus with the most connected I / O modules among each CNET bus, after all I / O modules on the CNET bus are polled, sending the time synchronization request to multiple I / O modules connected to each CNET bus; After the time synchronization requests for each CNET bus are sent, sending a time synchronization completion instruction to the periodic polling unit so that the periodic polling unit re-executes the periodic polling mechanism for each I / O module.
[0095] In a possible implementation, the CNET includes: a physical layer, a data link layer, and an application layer; The physical layer adopts a bus - type RS485 half - duplex link architecture, and a single communication module supports the connection of multiple CNET buses; the physical layer adopts an asynchronous transmission character encoding structure, and each character includes: a single start bit for synchronizing data reception, multiple data bits for carrying valid data, a single parity check bit for detecting single - byte transmission errors, and a single stop bit for identifying the end of the character; The data link layer adopts an asynchronous transmission mode of DLPDU with a non - fixed field length, and the data link layer is used to define the request frame structure of the request packet and the response frame structure of the response packet; both the request frame structure and the response frame structure include: a synchronization byte, a start delimiter, a length field, a repeated length field, a destination address, a source address, a function code, a data unit, a frame check sequence, and an end delimiter; The application layer is used to detect data interaction anomalies when data interaction occurs between the communication module and the I / O module.
[0096] It should be noted that the various embodiments in this specification are described in a progressive manner. For the same or similar parts between the various embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the distributed control system and the control network, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the method embodiment. The distributed control system and the control network described above are only illustrative. The units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.
[0097] As described above, this is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A distributed control system, characterized in that, Including: An operation module, at least one communication module, and multiple I / O modules. Each of the communication modules has a separately associated redundant communication module. Each of the I / O modules is connected to the communication module and the associated redundant communication module through at least two CNET buses to form a redundant communication link. The CNET is a custom control network protocol, and the master nodes of the CNET are the communication module and the associated redundant communication module, and the slave nodes of the CNET are the I / O modules. The communication module is used to implement data communication management between the operation module and the I / O module according to a preset communication interaction mechanism within the CNET, and perform anomaly detection on each of the I / O modules, the communication module, and multiple CNET buses.
2. The system according to claim 1, wherein Multiple of the I / O modules are connected to each CNET bus. The preset communication interaction mechanism includes a periodic polling mechanism. The communication module includes a periodic polling unit, and the periodic polling unit is specifically used for: Receiving an upper-layer instruction from the operation module, and converting the upper-layer instruction into a frame format corresponding to the CNET to determine a request packet for each of the I / O modules. Based on the polling period specified by the periodic polling mechanism, sequentially sending request packets to each of the I / O modules connected to each CNET bus to receive response packets fed back by each of the I / O modules. The polling period includes the sending time of the request packet and the feedback time of the response packet. If the response packet is not received within the polling period or the response packet has a verification error, it is determined that the associated I / O module has no response and polling proceeds to the next I / O module. Among them, the polling of multiple I / O modules on each CNET bus is independent of each other, and within a single polling period for each CNET bus, the request packets sent by the periodic polling unit are unique.
3. The system according to claim 2, wherein The preset communication interaction mechanism includes a time synchronization processing mechanism. The communication module includes a time synchronization processing unit, and the time synchronization processing unit is specifically used for: When the local clock of the communication module triggers the time synchronization processing moment specified by the time synchronization processing mechanism, starting a time synchronization request sending process to send a time synchronization request to multiple I / O modules connected to each CNET bus. The time synchronization request is a broadcast frame. For the CNET bus with the most I / O modules connected among each CNET bus, after all the I / O modules on the CNET bus have been polled, sending the time synchronization request to multiple I / O modules connected to each CNET bus. After the time synchronization requests for each CNET bus have been sent, sending a time synchronization completion instruction to the periodic polling unit to enable the periodic polling unit to re-execute the periodic polling mechanism for each of the I / O modules.
4. The system according to claim 2, wherein The CNET includes a physical layer, a data link layer, and an application layer. The physical layer adopts a bus - type RS485 half - duplex link architecture, and a single communication module supports the connection of multiple CNET buses; the physical layer adopts an asynchronous transmission character - coding structure, and each character includes: a single start bit for synchronizing data reception, multiple data bits for carrying valid data, a single parity check bit for detecting single - byte transmission errors, and a single stop bit for identifying the end of the character; The data - link layer adopts an asynchronous transmission mode of DLPDU with a non - fixed field length, and the data - link layer is used to define the request - frame structure of the request packet and the response - frame structure of the response packet; both the request - frame structure and the response - frame structure include: a synchronization byte, a start delimiter, a length field, a repeated length field, a destination address, a source address, a function code, a data unit, a frame check sequence, and an end delimiter; The application layer is used to detect data - interaction exceptions when data interaction occurs between the communication module and the I / O module.
5. The system according to claim 4, characterized in that The data - interaction exception detection includes: I / O address consistency detection, I / O address repeatability detection, protocol - number validity detection, and module - type detection; The execution steps of the I / O address consistency detection include: Based on the request packet sent by the cycle polling unit to the I / O module, determine the target I / O module address; If the target I / O module address is inconsistent with the DIP address of the I / O module that receives the request packet, it is determined that the request packet is abnormal, and the I / O module is controlled to discard the request packet; The execution steps of the I / O address repeatability detection include: If within a single polling cycle, the cycle polling unit receives at least two response packets with the same address, it is determined that there is an address - configuration conflict exception for the I / O module associated with the response packet; The execution steps of the protocol - number validity detection include: For the request packet sent by the cycle polling unit, obtain the protocol number of the request packet; If the protocol number of the request packet exceeds the preset range, control the I / O module that receives the request packet to feedback the response packet to the cycle polling unit based on the data - acquisition format; Perform field analysis on the response packet to determine whether there is an abnormal protocol - logic processing in the cycle polling unit; The execution steps of the module - type detection include: For the request packet sent by the cycle polling unit, determine the module type of the associated communication module according to the request packet; When the module type does not match the module type of the I / O module that receives the request packet, set a preset module - quality bit for the response packet fed back by the I / O module to identify the abnormal state of the communication module; Based on the abnormal state and the response format corresponding to the protocol number of the request packet, determine whether the module type of the communication module is consistent with the hardware type of the I / O module to determine whether there is a module - type matching exception for the communication module.
6. The system according to claim 2, wherein The preset communication interaction mechanism includes: a timeout detection mechanism, and the communication module includes: a timeout detection unit, and the timeout detection unit is specifically used for: Within a single polling cycle, if the cycle polling unit does not receive the response packet feedback from the I / O module, it is determined that the I / O module has no response and the number of times the I / O module has no response is recorded. If the number of times of no response reaches a preset threshold, it is determined that the I / O module has a fault.
7. A control network, characterized in that, Applied to a distributed control system, the distributed control system includes: an operation module, at least one communication module, and multiple I / O modules. Each communication module has a separately associated redundant communication module. Each I / O module is connected to the communication module and the associated redundant communication module through at least two CNET buses to form a redundant communication link; the CNET is a custom control network protocol, and the master nodes of the CNET are the communication module and the associated redundant communication module, and the slave nodes of the CNET are the I / O modules. The communication module is used to manage data communication between the operation module and the I / O module according to the preset communication interaction mechanism within the CNET, and to detect abnormalities of each I / O module, the communication module, and multiple CNET buses.
8. The control network according to claim 7, characterized in that, Multiple I / O modules are connected to each CNET bus; the preset communication interaction mechanism includes: a cycle polling mechanism. The communication module includes: a cycle polling unit, and the cycle polling unit is specifically used for: Receiving an upper-layer instruction from the operation module and converting the upper-layer instruction into the frame format corresponding to the CNET to determine a request packet for each I / O module. For multiple I / O modules connected to each CNET bus, based on the polling cycle specified by the cycle polling mechanism, sequentially sending request packets to each I / O module to receive response packets feedback by each I / O module; the polling cycle includes the sending time of the request packet and the feedback time of the response packet. If the response packet is not received or the response packet verification is incorrect within the polling cycle, it is determined that the associated I / O module has no response and polling proceeds to the next I / O module. Among them, the polling of multiple I / O modules on each CNET bus is independent of each other, and within a single polling cycle for each CNET bus, the request packet sent by the cycle polling unit remains unique.
9. The control network according to claim 8, characterized in that, The preset communication interaction mechanism includes: a time synchronization processing mechanism; the communication module includes: a time synchronization processing module, and the time synchronization processing module is specifically used for: When the local clock of the communication module triggers the time synchronization processing moment specified by the time synchronization processing mechanism, starting a time synchronization request sending process to send a time synchronization request to multiple I / O modules connected to each CNET bus; the time synchronization request is a broadcast frame. For the CNET bus with the most I / O modules connected among each CNET bus, after all the I / O modules on the CNET bus are polled, sending the time synchronization request to multiple I / O modules connected to each CNET bus. After the time synchronization requests for each of the CNET buses are sent, a time synchronization completion instruction is sent to the periodic polling unit, so that the periodic polling unit re-executes the periodic polling mechanism for each of the I / O modules.
10. The control network according to claim 8, wherein, The CNET includes: a physical layer, a data link layer, and an application layer; The physical layer adopts a bus-type RS485 half-duplex link architecture, and a single communication module supports the connection of multiple CNET buses; the physical layer adopts an asynchronous transmission character encoding structure, and each character includes: a single start bit for synchronizing data reception, multiple data bits for carrying valid data, a single parity check bit for detecting single-byte transmission errors, and a single stop bit for identifying the end of the character; The data link layer adopts an asynchronous transmission mode of DLPDU with a non-fixed field length, and the data link layer is used to define the request frame structure of the request packet and the response frame structure of the response packet; both the request frame structure and the response frame structure include: a synchronization byte, a start delimiter, a length field, a repeated length field, a destination address, a source address, a function code, a data unit, a frame check sequence, and an end delimiter; The application layer is used to detect data interaction anomalies when data interaction occurs between the communication module and the I / O module.
Citation Information
Patent Citations
Safety control redundant system and method for fully-intelligent master control system
CN102799104A
Multi-master asynchronous duplex differential bus and communication method
CN102857397A
Reliable polling communication method of power line carrier
CN108667486A
Distributed peripheral bus system of strict access and sampling time and control method thereof
CN109976272A
Distributed control system and industrial control system
CN115562195A