Redundant serial link communication method and device and storage medium
Through the redundant string-ring link communication method and data filtering mechanism, the dual-operation/dual standby state problem of the security instrument system in the communication link failure between modules is solved, simplifying the hardware design and ensuring the normal operation of the system.
Patent Information
- Application Number
- CN202411321942.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-03-04
AI Technical Summary
When the communication link between modules fails, the existing security instrument system can easily lead to the dual-operation or dual-standby state of the module, affecting the normal operation of the system, and the separate design of the data link between channels and modules increases the complexity of hardware design.
The redundant string-ring link communication method is adopted to realize the communication of each channel in the module and the redundant communication between the redundant modules through the communication unit on each channel, and the data link saw is simple. Through the setting of the string-ring link and the data filtering mechanism, each logical processing unit can obtain data from other logical processing units and conduct data voting to judge the working/standby status of the redundant module.
It avoids the power grabbing between modules for working/standby status, prevents the occurrence of dual-working/dual standby status, simplifies hardware design, and ensures the normal operation of the system.
Smart Images

Figure CN119561918A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of industrial control technology, and specifically relates to a multi-task deterministic scheduling method, device and storage medium for an industrial operating system. Background Art
[0002] In existing safety instrument systems, in order to increase system reliability, 2oo3 system architecture design modules are usually adopted, and modules are redundantly configured to further improve system availability. However, when designing output modules, especially analog signal output modules, it is often necessary to divide the working and standby states to ensure that only one module outputs externally during operation. Therefore, when the communication link between modules fails, it will cause the modules to work or standby, which will lead to module output signal errors. At the same time, in terms of architecture, the channel communication within the module and the redundant communication between modules are often designed separately, which will increase the complexity of the corresponding hardware design.
[0003] like Figure 1 As shown, in the existing safety instrument system, the three channels in the module with 2oo3 architecture design work independently, and the data between channels is obtained through the communication link for voting. In the case of redundant configuration, the local module and the opposite module exchange data. Among them, the communication between channels in the module is carried out through the channel communication module, and the redundant communication between modules is carried out through the redundant communication module. The overall communication link hardware design is complex. After the local module and the opposite module vote on the data between channels, the working / standby state of the module will be generated according to the voting results. The switching process of the working / standby state between modules is explained by taking the local module as the working module and the opposite module as the standby module as an example. When the local module fails, the opposite module processes the module data through the communication link, and the opposite module changes from the standby module to the working module, and the local module changes from the working module to the standby module.
[0004] Problems with current technology: In the case of redundant configuration, the local module and the opposite module will have different working / standby states. When the communication link between the two modules fails, the local module and the opposite module cannot know the working state of the other, resulting in the module being unable to correctly judge its own working state, resulting in dual working or dual standby module states, affecting the normal operation of the system. In addition, the data links between channels and modules are designed separately, which increases the complexity of hardware design. Summary of the invention
[0005] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present application provides a redundant serial ring link communication method, device and storage medium, which adopts a serial ring link to realize the communication of each channel in the module and the redundant communication between redundant modules through the communication unit on each channel. The data chain is simple. At the same time, through the setting of the serial ring link, each logical processing unit can obtain the data of other logical processing units, and after data voting, the validity of the data between the redundant modules is judged, so as to determine whether the redundant module is externally transmitting data, thereby avoiding the dual working / dual standby state of the module caused by the power grabbing behavior of the working / standby state between the modules.
[0006] To achieve the above purpose, the present application adopts the following technical solution, a redundant serial ring link communication method, comprising the steps of: S1: The communication unit receives the data packets sent by the logic processing unit and forwards them to other communication units connected to it; S2: After receiving the data packets forwarded by other communication units, the communication unit filters the data packets and forwards the filtered data packets to other communication units connected to it.
[0007] Preferably, the communication unit is communicatively connected with other communication units of the module and communication units on corresponding channels of the redundant module.
[0008] Preferably, the data packet includes a header for identifying a source of the data packet, the header includes a module address and a channel number of the source of the data packet, and the header also includes a serial number for identifying whether the data packet is repeated.
[0009] Preferably, each time the logic processing unit sends a data packet to the communication unit, the sequence number on the data packet increases by 1.
[0010] Preferably, the method for filtering the data packets by the communication unit is: S201: receiving data packets forwarded by other communication units; S202: Determine whether the module address and channel number of the data packet are repeated, if so, execute S203, if not, execute S205; S203: Determine whether the data packet sequence number is greater than the local sequence number, if so, execute S205, if not, execute S204; S204: Filter and discard the data packet; S205: The data packet is stored locally, and forwarded to other communication units connected to the same communication unit.
[0011] Preferably, the logic processing unit is an MCU, and the communication unit is an FPGA.
[0012] Preferably, the logic processing unit obtains data packets sent by the logic processing units of the present module and the redundant module through the communication unit. After obtaining the data packets of all channels of the present module, the logic processing unit performs voting output to determine the fault status of the present module.
[0013] Preferably, the logic processing unit sends the fault status and data packet to the redundant module through the communication unit, and receives the fault status and data packet sent by the redundant module to generate the working / standby status of the module.
[0014] The present application also provides another embodiment, a redundant serial ring link communication device, comprising at least two redundantly configured modules, wherein the modules include at least three signal acquisition channels, characterized in that: The logic processing unit is used to collect data and forward it through the communication unit; the communication unit receives data packets sent by other logic processing units, and votes to generate the fault status of this module; Communication unit: Receives data packets forwarded by the logic unit and other communication units, filters them, and then forwards them to other communication units connected to the communication unit.
[0015] The present application also provides a third implementation, a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of a redundant serial ring link communication method described in any one of claims 1 to 8 are implemented.
[0016] The beneficial effects of the present application are as follows: the present application discloses a redundant serial ring link communication method, which adopts a serial ring link, realizes the communication of each channel in the module and the redundant communication between redundant modules through the communication unit on each channel, and the data chain saw is simple. Through the setting of the serial ring link and the data filtering mechanism of the serial ring link, each logic processing unit can obtain the data of other logic processing units, and after data voting, the validity of each channel data between redundant modules is judged, so as to determine the working / standby state of the module, and avoid the double working / double standby state of the module caused by the right grabbing behavior of the working / standby state between modules. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present application is described with the aid of the following drawings: Figure 1 The redundant communication architecture diagram of the prior art is shown; Figure 2 A flow chart of the redundant serial ring link communication method of the present application is shown; Figure 3 The redundant serial ring link communication architecture diagram of the present application is shown; Figure 4 The data filtering flow chart of this application is shown; Figure 5 The data flow diagram at time T0 of this application is shown; Figure 6 The data flow diagram at time T1 of this application is shown; Figure 7 The data flow diagram at time T2 of the present application is shown. DETAILED DESCRIPTION
[0018] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below in conjunction with the accompanying drawings through specific implementation methods. It is understood that the specific embodiments described below are only used to explain the relevant inventions, rather than to limit the invention. It should also be noted that the embodiments and features in the embodiments of this application can be combined with each other in the absence of conflict; for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0019] As known from the background technology, existing safety instrument systems such as Figure 1 As shown in the figure, the three channels in the module with 2oo3 architecture design work independently, and the data between channels is obtained through the communication link for voting. In the case of redundant configuration, the local module exchanges data with the opposite module. Among them, the communication between channels in the module is carried out through the channel communication module, and the redundant communication between modules is carried out through the redundant communication module. The overall communication link hardware design is complex. In addition, the working / standby module is scrambled through the communication between the redundant modules. When the redundant communication channel is abnormal, it is easy to cause the module to be in a dual working / dual standby state, affecting the normal operation of the system.
[0020] In view of the above problems, the present application provides a redundant serial ring link communication method, such as Figure 2 As shown, including: S1: The communication unit receives the data packets sent by the logic processing unit and forwards them to other communication units connected to it; S2: After receiving the data packets forwarded by other communication units, the communication unit filters the data packets and forwards the filtered data packets to other communication units connected to it.
[0021] The schematic diagram of the redundant serial ring link circuit of the present invention is as follows Figure 3 As shown, the module with 2oo3 architecture design is taken as an example for explanation, and other multiplexed modules, such as 2oo4 architecture, etc., are also applicable to the communication method provided by this application, and the communication link connection method therein is similar, and the specific data flow process is not repeated in this embodiment. Figure 3In the embodiment, the redundant module includes three signal acquisition channels, each of which is provided with a logic processing unit and a communication unit, wherein the logic processing unit can be a component for logic processing such as a CPU / MCU. In this embodiment, the MCU is used as the logic processing unit and the FPGA is used as the communication unit for illustration. After the MCU collects and processes the field data through the acquisition channel, it sends the data packet to the FPGA, and the FPGA then transmits the data within the module and between the redundant modules through the BLVDS high-speed bus. In this embodiment, in order to facilitate the understanding of the data transmission between channels, the correspondence between each channel and the corresponding logic processing unit and communication unit is shown in the following table. In actual applications, the names of the corresponding channels between the redundant modules are consistent, all of which are channel A, and the corresponding MCU and FPGA are also consistent. The correspondence table of this embodiment is only for more convenient understanding of the method created by the present invention.
[0022] aisle Logical Processing Unit Communication unit A MCU-A FPGA-A B MCU-B FPGA-B C MCU-C FPGA-C D MCU-D FPGA-D E MCU-E FPGA-E F MCU-F FPGA-F Among them, in S1, after receiving the data packet sent by the MCU, the FPGA forwards the data packet to other FPGAs connected to it. The data packet sending process of MCU-A is taken as an example to illustrate. After receiving the data packet sent by MCU-A, FPGA-A forwards the data through the serial ring link between modules. As can be seen from the figure, other communication modules directly connected to FPGA-A include FPGA-B, FPGA-C and FPGA-D. Similarly, MCU-B transmits the data packet of channel B to FPGA-A, FPGA-C and FPGA-E connected to it through FPGA-B. After receiving the data packet sent by each logic processing unit MCU, the communication module FPGA will store it locally and replace the originally stored data packet to ensure that the data packet stored locally in the FPGA is the latest data packet and ensure the validity of the data. The MCU can obtain the data packet processed by the MCU on other channels through the FPGA on the channel.
[0023] Furthermore, in order to prevent the FPGA from repeatedly sending the same data packet, each FPGA will filter the data packet after receiving the data packet forwarded by other FPGAs. The data filtering method is to set a header in the data packet for identifying the source of the data packet, and the header includes the module address and channel number of the source of the data packet, and a sequence number for identifying whether the data packet is repeated.
[0024] The corresponding channels of the redundantly configured modules collect the same field data, and the channels in the modules are all A / B / C channels. In this embodiment, the channels of the redundant modules are represented by channels A / B / C / D / E / F, respectively, only to distinguish the data flow between the channels more conveniently. Therefore, in practical applications, in order to distinguish the data of each channel between the redundant modules, the MCU adds the module address and channel number of the data source in the header of the data packet after processing the channel data. Through the module address and channel number information, the data packets of different channels on different modules can be accurately identified. In order to identify whether the data packets from the same source are repeated, the MCU adds a sequence number to the header information, and the sequence number of the data packet increases by 1 every time the MCU sends a data packet to the FPGA. Taking the sequence number data byte as 4 bytes as an example, when the system starts running, the MCU normally collects field data, completes the data collection for the first time, and sends a data packet to the FPGA, the sequence number 0x0000 of the data packet is added to the header of the data packet, and the sequence number increases by 1 each time a data packet is sent subsequently. When it is added to 0xFFFF, when the MCU collects new data again, the serial number of the new data packet will start counting from 0x0000 again.
[0025] Therefore, if Figure 4 As shown, the method for the communication unit in S2 to filter the data packet is: S201: receiving data packets forwarded by other communication units; S202: Determine whether the module address and channel number of the data packet are repeated, if so, execute S203, if not, execute S205; S203: Determine whether the data packet sequence number is greater than the local sequence number, if so, execute S205, if not, execute S204; S204: Filter and discard the data packet; S205: The data packet is stored locally, and forwarded to other communication units connected to the same communication unit.
[0026] After the communication unit receives the data packet again, it compares the data packet with the data packet of the same local module address and channel number. If the sequence number is greater than the sequence number of the locally stored data packet, it means that the data packet is the latest data packet. The communication module stores the data packet locally and replaces the original locally stored data packet of the same module address and channel number, thereby ensuring that each channel in the local storage of the communication module is the latest data packet to ensure data validity. Among them, when the communication module receives the data packet for the first time, since there is no data packet of the corresponding channel in the local storage, the communication module directly stores and forwards the data packet locally. Further, when the communication module receives a sequence number of 0x0000, since the sequence number is updated again, the sequence number of the locally stored data packet is 0xFFFF at this time. In order to ensure the continuous updating of the data packet, the communication unit directly replaces the local sequence number of 0xFFFF with the data packet with the sequence number of 0x0000. The communication unit can save the latest data packet sent by the logical processing unit on each channel. The logical processing unit can obtain data packets of all channels in this module and redundant modules through the communication unit.
[0027] In order to facilitate the filtering and forwarding process of the channel data in this embodiment, it is assumed that the FPGA's receiving and sending delay is 0. Taking the data flow of channel A as an example, the data flow process at each moment is as follows: Figure 5 , Figure 6 and Figure 7 As shown. At time T0, the data packet processed by MCU-A on channel A is forwarded to FPGA-B, FPGA-C, and FPGA-D through FPGA-A. At this time, FPGA-B, FPGA-C, and FPGA-D receive the channel A data packet sent by FGPA-A for the first time and store the data packet locally. MCU-B, MCU-C, and MCU-D can obtain the data of channel A through FPGA-B, FPGA-C, and FPGA-D respectively.
[0028] The data flow at time T1 is as follows Figure 6 As shown, after FPGA-B receives the data packet on channel A, it filters the data packet and confirms that there is no data packet of channel A in the local storage or that a data packet of channel A is sequenced in the data packet of channel A that is larger than the data packet of the local storage. Then, FPGA-B will store the data packet locally, replace the original data packet of channel A, and forward the data packet of channel A to FPGA-A, FPGA-C, and FPGA-E. Figure 6In , N represents the packet filtering shield to avoid repeated forwarding of packets. Since FPGA-A and FPGA-C have stored the data packet of channel A locally, and the module address and channel number of the data packet are the same as those of the data packet forwarded by FPGA-B, and the sequence number in the data packet is also the same, after FPGA-A and FPGA-C receive the data packet forwarded by FPGA-B, they filter the data packet, discard the data packet, and no longer forward it twice, avoiding repeated circulation of the same data packet in the serial ring link. Similarly, FPGA-C and FPGA-D perform the same processing on the data packet of channel A forwarded by FPGA-A to ensure that the data packet generated by channel A in the latest cycle is stored locally.
[0029] The data flow at time T2 is as follows Figure 7 As shown in the figure, the N on the way indicates that the data packet is filtered and shielded, and it is no longer forwarded repeatedly in the serial ring link. At time T2, FPGA-D will receive the data packet of channel A again through FPGA-E and FPGA-F, and it will process the data and filter out the two data packets after confirming that the data packet is a duplicate data packet; FPGA-E will receive the data packet of channel A again through FPGA-F, and it will process the data and filter out the data packet after confirming that the data packet is a duplicate data packet; FPGA-F will receive the data packet of channel A again through FPGA-E, and it will process the data and filter out the data packet.
[0030] Through the serial ring link and data filtering mechanism created by the present invention, the communication unit FPGA of each channel can store the latest data generated by each channel in the link, and the MCU can obtain the data of each channel in the current module and the redundant module through the FPGA. In addition, the MCU determines whether the data of the channel where the MCU is located is normal by voting and outputting the data of all channels of the current module. And according to the voting of the data of each channel of the current module, the fault state of the module is determined.
[0031] Take the left module as an example, where the channel data is "0" for normal data, and "1" for abnormal data. The overall status of the module is classified by the data status of channel A, channel B, and channel C: No fault: The data of the three channels are all normal, and the overall status of the module is no fault; Minor fault: data of one of the three channels is abnormal, and the overall status of the module is a minor fault; Major fault: Data in two or more of the three channels is abnormal, and the overall status of the module is a major fault.
[0032] Channel A data Channel B data Channel C data Module overall status 0 0 0 No trouble 0 0 1 Minor fault 0 1 0 Minor fault 0 1 1 Major Failure 1 0 0 Minor fault 1 0 1 Major Failure 1 1 0 Major Failure 1 1 1 Major Failure The channel data will put the overall status of the module in the respective channel data and pass it to the channel in the right module. The right module channel will compare the module status at the local end with the module status at the opposite end to obtain the module data validity under the redundant configuration, as shown in the following table: Left module channel status Right module channel status No trouble Minor fault Major Failure No trouble All effective Left module is valid Left module is valid Minor fault Right module is valid All effective Left module is valid Major Failure Right module is valid Right module is valid None Similarly, the left module obtains the data of the right module, and the validity of the module data is consistent with the above method. The data selection is based on the principle that no fault is greater than a minor fault, and a minor fault is greater than a major fault to judge the data validity.
[0033] 1) When both the left and right modules of the analog signal output are fault-free, the operation and processing data of the modules on both sides are valid, and the previous module is kept to output signals. If they are powered on simultaneously, the left module is selected to output signals by default, and the right module does not output signals; 2) If the fault level of the left module is lower than that of the right module, the left module signal is output and the right module signal is not output; 3) If the fault level of the right module is lower than that of the left module, the right module signal is output and the left module signal is not output; 4) If both the left and right modules have minor faults, keep the previous module outputting signals; 5) If both the left module and the right module are in serious fault, both modules will not output any signal.
[0034] Through the above data selection mechanism design, the dual modules in the redundant configuration no longer engage in "grabbing power" behavior for working standby, but instead make validity judgments through data interaction and then select the corresponding module output signal.
[0035] In summary, the beneficial effects of the method of the present invention are: 1. Through the serial ring link communication mode of the present invention, the data on the channel can be transmitted outward through the communication link on the communication unit, and according to the data filtering mechanism provided by the present invention, it is ensured that the data received by other channels is valid and non-repetitive, and the data chain saw between channels and modules is simple.
[0036] 2. Through the channel communication mechanism provided by the present invention, the logic processing unit on each channel can obtain the data validity of all channels on the module, and vote on the data to determine the fault state of the module. Through the redundant communication mechanism, the redundant module does not need to distinguish between the working and standby states. By determining the fault state of the redundant module, it is determined whether the redundant module is transmitting data to the outside, avoiding the dual working / dual standby state of the module caused by the right grabbing behavior of the working / standby state between the modules.
[0037] Another embodiment of the present invention is a redundant serial ring link communication device, comprising at least two redundantly configured modules, wherein the modules include at least three signal acquisition channels, and the modules include: The logic processing unit is used to collect data and forward it through the communication unit; the communication unit receives data packets sent by other logic processing units, and votes to generate the fault status of this module; Communication unit: Receives data packets forwarded by the logic unit and other communication units, filters them, and then forwards them to other communication units connected to the communication unit.
[0038] Through the serial link connection between the communication units and the data filtering mechanism between the communication units, the simplicity of the data chain saw is met while ensuring the validity of the communication data within the serial link, avoiding data anomalies caused by a single link failure and affecting the normal operation of the system.
[0039] A third embodiment of the present invention is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a redundant serial ring link communication method described in any one of claims 1 to 8 are implemented.
[0040] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several distinct components and by means of a suitably programmed computer. The use of the words first, second, third, etc., is for convenience of expression only and does not imply any order. These words may be understood as part of the component name.
[0041] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0042] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments after knowing the basic creative concept. Therefore, the claims should be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0043] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention should also include these modifications and variations.
Claims
1. A redundant serial ring link communication method, characterized in that: S1: The communication unit receives the data packets sent by the logic processing unit and forwards them to other communication units connected to it; S2: After receiving the data packets forwarded by other communication units, the communication unit filters the data packets and forwards the filtered data packets to other communication units connected to it.
2. The communication method according to claim 1, characterized in that: The communication unit is communicatively connected with other communication units of the module and communication units on corresponding channels of the redundant module.
3. The communication method according to claim 1, characterized in that: The data packet includes a header for identifying a source of the data packet, the header includes a module address and a channel number of the source of the data packet, and the header also includes a sequence number for identifying whether the data packet is repeated.
4. The communication method according to claim 3, characterized in that: Each time the logic processing unit sends a data packet to the communication unit, the sequence number on the data packet increases by 1.
5. The communication method according to claim 3, characterized in that: The method for filtering data packets by the communication unit is: S201: receiving data packets forwarded by other communication units; S202: Determine whether the module address and channel number of the data packet are repeated, if so, execute S203, if not, execute S205; S203: Determine whether the data packet sequence number is greater than the local sequence number, if so, execute S205, if not, execute S204; S204: Filter and discard the data packet; S205: The data packet is stored locally, and forwarded to other communication units connected to the same communication unit.
6. The communication method according to claim 1, characterized in that: The logic processing unit is an MCU, and the communication unit is an FPGA.
7. The communication method according to claim 1, characterized in that: The logic processing unit obtains data packets sent by the logic processing units of the module and the redundant module through the communication unit. After obtaining the data packets of all channels of the module, the logic processing unit performs voting output to determine the fault status of the module.
8. The communication method according to claim 7, characterized in that: The logic processing unit sends the fault status and data packet to the redundant module through the communication unit, and receives the fault status and data packet sent by the redundant module to generate the working / standby status of the module.
9. A redundant serial ring link communication device, comprising at least two redundantly configured modules, wherein the modules include at least three signal acquisition channels, characterized in that: The modules include: The logic processing unit is used to collect data and forward it through the communication unit; the communication unit receives data packets sent by other logic processing units, and votes to generate the fault status of this module; Communication unit: Receives data packets forwarded by the logic unit and other communication units, filters them, and then forwards them to other communication units connected to the communication unit.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a redundant serial ring link communication method described in any one of claims 1 to 8 are implemented.