CN115473761A - Communication method, system, equipment and medium of CAN bus based on DCS system - Google Patents

Communication method, system, equipment and medium of CAN bus based on DCS system Download PDF

Info

Publication number
CN115473761A
CN115473761A CN202211115884.6A CN202211115884A CN115473761A CN 115473761 A CN115473761 A CN 115473761A CN 202211115884 A CN202211115884 A CN 202211115884A CN 115473761 A CN115473761 A CN 115473761A
Authority
CN
China
Prior art keywords
protocol stack
bus
dcs
protocol
monitoring result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211115884.6A
Other languages
Chinese (zh)
Other versions
CN115473761B (en
Inventor
田青旺
俞冠中
刘玉升
靳子洋
王楠
田钢
刘佳秀
韦雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Nuclear Power Automation System Engineering Co Ltd
Original Assignee
State Nuclear Power Automation System Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Nuclear Power Automation System Engineering Co Ltd filed Critical State Nuclear Power Automation System Engineering Co Ltd
Priority to CN202211115884.6A priority Critical patent/CN115473761B/en
Publication of CN115473761A publication Critical patent/CN115473761A/en
Application granted granted Critical
Publication of CN115473761B publication Critical patent/CN115473761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/407Bus networks with decentralised control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention discloses a communication method, a system, equipment and a medium of a CAN bus based on a DCS (distributed control system), wherein the CAN bus is provided with a plurality of protocol stacks, each protocol stack comprises a first protocol stack and a second protocol stack, the first protocol stack is used for acquiring interactive data of the DCS, the second protocol stack is used for monitoring the data interaction of the first protocol stack and outputting a monitoring result, and the communication method comprises the following steps: acquiring a monitoring result of the second protocol stack; setting the first protocol stack according to the monitoring result; and communicating with the DCS according to the interactive data of the first protocol stack. The second protocol stack is arranged to monitor the first protocol stack to obtain a monitoring result, and the first protocol stack is arranged according to the monitoring result, so that the reliable first protocol stack obtains interaction data of the DCS to communicate with the DCS, the reliability and fault tolerance of communication are guaranteed, and high-reliability application scenes such as a power plant are met.

Description

Communication method, system, equipment and medium of CAN bus based on DCS system
Technical Field
The invention belongs to the technical field of distributed industrial control, and particularly relates to a communication method, a communication system, communication equipment and a communication medium of a CAN (controller area network) bus based on a DCS (distributed control system).
Background
With the development of information science and computer technology, digital control is realized in most industrial fields at present, and the development is towards intellectualization. Among them, intelligent instruments such as intelligent sensors and intelligent actuators based on a CAN bus (controller area network) are increasingly widely used in industrial control fields such as power plants.
With the increase in the amount of instrumentation of the CAN bus, the DCS (distributed control system) needs to be changed from the original closed system to an open system. Therefore, the DCS system needs a data interaction interface with the CAN bus smart meter. The DCS system CAN not only obtain input and output real-time data (including switching value data or analog value data) of the CAN bus intelligent instrument from the interface, but also obtain other important information such as CAN bus working state information, diagnosis information and the like from the data. The CAN communication module needs to have higher reliability requirement, and if the CAN communication module (CAN master station) fails to work, the DCS loses the monitoring and management of all CAN intelligent instruments (CAN slave stations) on a CAN bus. Such a fault situation can have serious consequences if it occurs in a critical facility in a power plant scenario. In the prior art, data interaction between a DCS system and a CAN bus is generally realized by using a CAN bus protocol stack chip, and the method depends on a specific chip supplier.
Disclosure of Invention
The invention provides a communication method, a system, equipment and a medium based on a CAN bus of a DCS (distributed control system) in order to overcome the defects that the CAN bus communication based on the DCS depends on a chip and the reliability is poor in the prior art.
The invention solves the technical problems through the following technical scheme:
as a first aspect of the present invention, a communication method for a CAN bus based on a DCS system is provided, where the CAN bus is provided with a plurality of protocol stacks, each protocol stack includes a first protocol stack and a second protocol stack, the first protocol stack is used to acquire interaction data of the DCS system, the second protocol stack is used to monitor data interaction of the first protocol stack and output a monitoring result, and the communication method includes:
acquiring a monitoring result of the second protocol stack;
setting the first protocol stack according to the monitoring result;
and communicating with the DCS according to the interactive data of the first protocol stack.
Preferably, the step of obtaining the listening result of the second protocol stack includes:
selecting one protocol stack from a plurality of protocol stacks as the first protocol stack;
and selecting one or more protocol stacks from a plurality of protocol stacks as the second protocol stack.
Preferably, the step of obtaining the listening result of the second protocol stack further includes:
receiving protocol stack configuration information of the DCS;
and configuring the first protocol stack and the second protocol stack according to the protocol stack configuration information.
Preferably, if a plurality of protocol stacks are selected from the plurality of protocol stacks as the second protocol stack, the step of obtaining the monitoring result of the second protocol stack includes:
counting the monitoring result of the second protocol stack;
and if the same number of the monitoring results reaches a preset threshold value, outputting the monitoring results.
Preferably, the step of setting the first protocol stack according to the listening result includes:
judging the online state of the first protocol stack according to the monitoring result;
and setting the first protocol stack according to the online state.
Preferably, the monitoring result includes a heartbeat time interval and a heartbeat loss frequency, and the step of determining the online state of the first protocol stack according to the monitoring result includes:
if the heartbeat time interval is lower than a preset interval threshold value and the heartbeat loss frequency is lower than a preset frequency threshold value, judging that the state of the first protocol stack is on-line;
and if the heartbeat time interval is higher than a preset interval threshold value and/or the heartbeat loss frequency is higher than a preset frequency threshold value, judging that the state of the first protocol stack is offline.
Preferably, the step of setting the first protocol stack according to the online status comprises:
and when the online state of the first protocol stack is offline, selecting one protocol stack from the second protocol stack to be set as the first protocol stack.
As a second aspect of the present invention, a communication system based on a CAN bus of a DCS system is provided, where the CAN bus is provided with a plurality of protocol stacks, each protocol stack includes a first protocol stack and a second protocol stack, the first protocol stack is used to acquire interaction data of the DCS system, the second protocol stack is used to monitor data interaction of the first protocol stack and output a monitoring result, and the communication system includes:
the acquisition module is used for acquiring the monitoring result of the second protocol stack;
the protocol stack setting module is used for setting the first protocol stack according to the monitoring result;
and the communication module is used for communicating with the DCS system according to the interactive data of the first protocol stack.
As a third aspect of the present invention, there is provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the communication method based on the CAN bus of the DCS system when executing the computer program.
As a fourth aspect of the present invention, there is provided a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the communication method based on the CAN bus of the DCS system described above.
The positive progress effects of the invention are as follows:
according to the communication method, the system, the equipment and the medium of the CAN bus based on the DCS, the second protocol stack is arranged to monitor the first protocol stack to obtain the monitoring result, and the first protocol stack is arranged according to the monitoring result, so that the reliable first protocol stack is used for obtaining the interactive data of the DCS to communicate with the DCS, the reliability and the fault tolerance of the communication of the CAN bus are ensured, and high-reliability application scenes such as a power plant are met. Furthermore, the method uses a software method to replace the traditional method of using a protocol stack chip to carry out data interaction between the DCS system and the CAN bus, and gets rid of the dependence on a specific supplier.
Drawings
Fig. 1 is a schematic flowchart of a communication method based on a CAN bus of a DCS system according to embodiment 1 of the present invention;
fig. 2 is a schematic sub-flow diagram of a communication method based on a CAN bus of the DCS system according to embodiment 1 of the present invention;
fig. 3 is another sub-flow diagram of the communication method based on the CAN bus of the DCS system according to embodiment 1 of the present invention;
fig. 4 is a hardware configuration diagram of a communication method based on a CAN bus of the DCS system in embodiment 1 of the present invention;
fig. 5 is a structure diagram of an address space of a memory in the communication method based on the CAN bus of the DCS system in embodiment 1 of the present invention;
fig. 6 is a schematic block diagram of a communication system based on a CAN bus of the DCS system according to embodiment 2 of the present invention;
fig. 7 is a schematic structural diagram of an electronic device in embodiment 3 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
This embodiment provides a communication method of a CAN bus based on a DCS system, where the CAN bus is provided with a plurality of protocol stacks, each protocol stack includes a first protocol stack and a second protocol stack, the first protocol stack is used to obtain interaction data of the DCS system, and the second protocol stack is used to monitor data interaction of the first protocol stack and output a monitoring result, as shown in fig. 1, the communication method includes:
step 101, obtaining a monitoring result of the second protocol stack.
And step 102, setting the first protocol stack according to the monitoring result.
And 103, communicating with the DCS according to the interactive data of the first protocol stack.
The second protocol stack is arranged to monitor the first protocol stack to obtain a monitoring result, and the first protocol stack is arranged according to the monitoring result, so that the reliable first protocol stack obtains interaction data of the DCS to communicate with the DCS, the reliability and fault tolerance of CAN bus communication are guaranteed, and high-reliability application scenes of a power plant are met. Furthermore, the method uses a software method to replace the traditional method of using a protocol stack chip to carry out data interaction between the DCS system and the CAN bus, and gets rid of the dependence on a specific supplier.
Specifically, as shown in fig. 2, step 101 includes:
step 1001, selecting a protocol stack as a first protocol stack.
In this step, a plurality of protocol stacks on the CAN bus are selected, and one protocol stack is selected from the plurality of protocol stacks as a first protocol stack.
Step 1002, selecting one or more protocol stacks as second protocol stacks.
In this step, one or more protocol stacks may be selected from the plurality of protocol stacks to be set as the second protocol stack, which may satisfy a plurality of protocol stack scenarios.
After the selection is finished, the following steps are executed:
step 1003, receiving protocol stack configuration information of the DCS system.
And 1004, configuring the first protocol stack and the second protocol stack according to the protocol stack configuration information.
In one embodiment, the protocol stack configuration information includes an operating mode of the CAN bus protocol stack: the system comprises a main working mode or a hot backup working mode, wherein a protocol stack in the main working mode is a first protocol stack, and a protocol stack in the hot backup working mode is a second protocol stack. The protocol stack configuration information also comprises CAN bus baud rate, CAN master station heartbeat time interval setting, CAN master station heartbeat loss allowable times setting, CAN slave station heartbeat time interval setting and CAN slave station heartbeat loss times setting. Taking the first protocol stack as an example, writing a configuration event ID in a sending mailbox space of a memory of the first protocol stack, sending an interrupt signal by the memory to trigger the first protocol stack to generate interrupt processing, and reading a message in a receiving mailbox space in the memory. If the message is a configuration event ID, the first protocol stack reads the configuration data space of the memory, acquires the configuration message of the protocol stack, configures the receiving and sending mode of the baud rate required by communication, and configures the heartbeat time interval and the heartbeat loss frequency by sending the CAN message. The second protocol stack is configured to monitor the first protocol stack only through the protocol configuration information, obtain a monitoring result and do not send any CAN message to any slave station on the CAN bus. And completing the configuration of the first protocol stack and the second protocol stack according to the protocol stack configuration information so as to monitor the first protocol stack by the second protocol stack in the subsequent implementation and set the first protocol stack to communicate with the DCS.
In an embodiment, if a plurality of protocol stacks are selected from a plurality of protocol stacks as the second protocol stack, step 101 includes:
and counting the monitoring result of the second protocol stack.
And if the number of the same monitoring results reaches a preset threshold value, outputting the monitoring results, and outputting the monitoring results when the number of the same monitoring results exceeds one half of the number of all the monitoring results, so that errors of final results caused by different monitoring results of a plurality of second protocol stacks are prevented, the setting of the first protocol stack is influenced, and the accuracy of the monitoring results is ensured.
Specifically, as shown in fig. 3, step 102 further includes:
step 1021, judging the online state of the first protocol stack according to the monitoring result.
In this step, the monitoring result includes a heartbeat time interval and a heartbeat loss frequency. If the heartbeat time interval is lower than a preset interval threshold value and the heartbeat loss frequency is lower than a preset frequency threshold value, judging that the state of the first protocol stack is on-line;
and if the heartbeat time interval is higher than a preset interval threshold value and/or the heartbeat loss frequency is higher than a preset frequency threshold value, judging that the state of the first protocol stack is offline.
The second protocol stack judges the online state of the first protocol stack by monitoring the heartbeat time interval and the heartbeat loss frequency, so that the first protocol stack is convenient to set subsequently.
Step 1022, setting the first protocol stack according to the online status.
In this step, when the online state of the first protocol stack is offline, one protocol stack is selected from the second protocol stack and set as the first protocol stack, so that the offline first protocol stack is replaced, normal communication between the first protocol stack and the DCS system is ensured, and reliability and fault tolerance of communication are improved.
The communication method of the CAN bus based on the DCS system in this embodiment is further described below with reference to an example of a dual-redundant CAN bus including a first protocol stack and a second protocol stack:
as shown in fig. 4, the hardware architecture of this example specifically includes: the system comprises a dual-redundancy power supply module, a main control module, a communication transmission module 0, a communication transmission module 1, a dual-port RAM module 0, a dual-port RAM module 1, a CAN bus protocol stack module 0 and a CAN bus protocol stack module 1.
Specifically, the input end of the dual-redundancy power supply module is connected with two paths of external power supplies, the external power supplies are converted into rated voltages required by the main control module, the communication transmission module 0, the communication transmission module 1, the dual-port RAM module 0, the dual-port RAM module 1, the CAN bus protocol stack module 1 and the CAN bus protocol stack module 2, and all module hardware is powered.
The communication transmission module 0 and the communication transmission module 1 are connected with the port of the main control module through a communication port, and are used for receiving a control instruction of the DCS system control unit, forwarding the control instruction to the main control module and sending data or information of the main control module to the DCS system control unit.
The dual-port RAM module 0 and the dual-port RAM module 1 are used for enabling the main control module to perform data interaction with the CAN bus protocol stack module 0 and the CAN bus protocol stack module 1. As shown in fig. 5, the address space of the dual port RAM module 0 and the dual port RAM module 1 should be divided into at least 8 address space areas. The master control module can read and write data and information in arbitrary addresses stored in the dual port RAM module 0 and the dual port RAM module 1. The CAN bus protocol stack module 0, namely the first protocol stack CAN read the data and information stored in the dual-port RAM module 0 and write the data and information into any address in the memory of the dual-port RAM module 0; the CAN bus protocol stack module 1, i.e. the second protocol stack, CAN read the data and information stored in the dual port RAM module 1 and CAN write the data and information into any address stored in the dual port RAM module 1.
The master control module obtains the DCS system protocol stack configuration information received by the communication transmission module 0 and the communication transmission module 1, and configures the CAN bus protocol stack module 0, namely the first protocol stack and the CAN bus protocol stack module 1, namely the CAN bus communication baud rate of the second protocol stack. And if the CAN bus protocol stack module 0 is configured to be the working mode of a CAN master station, the CAN bus protocol stack module 1 is configured to be the working mode of a CAN monitoring station.
The communication method of the CAN bus based on the DCS is realized by the CAN bus protocol stack module 0 and the CAN bus protocol stack module 1. Specifically, if the CAN bus protocol stack is a dual redundancy design, then: the dual-redundancy CAN bus communication module needs to be provided with a first protocol stack to realize communication and control of the intelligent instrument on the CAN bus. Meanwhile, the CAN bus communication module also needs a silent second protocol stack for monitoring the heartbeat information of a CAN master station on the CAN bus, wherein the heartbeat information comprises a heartbeat time interval and heartbeat loss times.
In one embodiment, the hardware of the main control module CAN be a microcontroller (single chip microcomputer/MCU) or a Microprocessor (MPU), and the hardware of the CAN protocol stack module 0 and the hardware of the CAN protocol stack module 1 CAN be a microcontroller (single chip microcomputer/MCU) or a Microprocessor (MPU), wherein the architecture of the microcontroller CAN be ARM or AVR (both microcontroller architectures). The architecture of the microprocessor can be ARM, X86, powerPC, MIPS (all microprocessor architectures).
The specific communication method comprises the following steps: the protocol stack of the CAN bus executes step 1003 to receive CAN protocol stack configuration information by waiting for an interrupt. Taking the CAN bus protocol stack module 0 as an example, when the main control module sends a mailbox space write configuration event ID in the dual-port RAM module 0, the dual-port RAM module 0 sends an interrupt signal to trigger the CAN bus protocol stack module 0 to generate interrupt processing, and the dual-port RAM module 0 is read in the CAN bus protocol stack embedded software interrupt processing function to receive a message in the mailbox space. If the message is a configuration event ID, the CAN bus protocol stack module 0 reads the configuration data space of the dual port RAM module 0 to obtain a protocol stack configuration message.
After the protocol stack configuration information is obtained, step 1004 is executed to configure the first protocol stack and the second protocol stack according to the protocol stack configuration information. If the CAN protocol stack module 0 is configured to be in a main working mode, namely the CAN protocol stack module is set to be a first protocol stack, CAN communication is initialized to be in a receiving and sending mode of configuring the baud rate required, a CAN slave station is configured by sending a CAN message, and the heartbeat time interval of the CAN slave station is configured. If the interrupt is generated in the dual-port RAM module 0, the message is acquired as the output event ID in the receiving mailbox of the dual-port RAM module 0, and the CAN bus protocol stack module 0 reads the output data from the output address space of the CAN slave station of the dual-port RAM module 0 and sends the output data to the designated CAN slave station through the CAN message. The CAN bus protocol stack embedded software running on the CAN bus protocol module 0 receives CAN messages from CAN slave stations in CAN receiving interruption, and writes input real-time data into CAN slave station input real-time data space of the dual-port RAM module 0 if the CAN messages are input real-time data; and if the CAN message is alarm information, writing the alarm information into the CAN slave station alarm information space of the port RAM module 0.
If the CAN bus protocol stack 0 module is configured to be in the hot standby working mode, namely, the CAN bus protocol stack 0 module is set to be in the second protocol stack, the CAN communication is initialized to be in the receiving mode of configuring the baud rate required, only step 101 is executed, the CAN messages on the CAN bus are monitored, specifically, the CAN messages comprise heartbeat time intervals and heartbeat loss times, and no CAN message is sent to any CAN slave station on the CAN bus.
Then, step 102 is executed, and the first protocol stack is set according to the monitoring result, specifically, the method includes: and 1021, judging the online state of the first protocol stack according to the monitoring result. If the number of the second protocol stacks is more than one, firstly counting the monitoring results of the second protocol stacks, if the number of the same monitoring results reaches a preset threshold value, outputting the monitoring results, and generally outputting the monitoring results when the number of the same monitoring results exceeds one half of the number of all the monitoring results.
If the first protocol stack is in the offline state, step 1022 is executed to set the first protocol stack according to the online state. And writing a master station fault event ID into a sending mailbox of the dual-port RAM module 0. And switching the working mode into a main working mode, namely a first protocol stack, reinitializing the CAN communication into a transceiving mode with the baud rate required by configuration, and sending the heartbeat of the main station to the CAN bus according to the heartbeat time interval of the main station required by the configuration.
After the first protocol stack is set, step 103 is executed, communication is performed with the DCS system according to the interactive data of the first protocol stack, and the first protocol stack reads the information in the dual port RAM module 0 at regular time and sends the information to the DCS system.
In one embodiment, the method is applicable to a plurality of CAN application layer protocols including: CANopen protocol, iCAN protocol, deviceNet protocol, J1939 protocol (all CAN application layer protocols), etc. The method can analyze and package CANopen protocol messages, iCAN protocol messages, deviceNet protocol messages, J1939 protocol messages and other protocol messages.
According to the communication method of the CAN bus based on the DCS, the second protocol stack is arranged to monitor the first protocol stack to obtain the monitoring result, and the first protocol stack is arranged according to the monitoring result, so that the reliable first protocol stack CAN obtain the interactive data of the DCS to communicate with the DCS, the reliability and fault tolerance of the communication of the CAN bus are guaranteed, and high-reliability application scenes of a power plant are met. Furthermore, the method uses a software method to replace a traditional method of using a protocol stack chip to carry out data interaction between a DCS system and a CAN bus, and the dependence on a specific supplier is eliminated.
Example 2
This embodiment provides a communication system based on CAN bus of DCS system, be equipped with a plurality of protocol stack on the CAN bus, the protocol stack includes first protocol stack and second protocol stack, first protocol stack is used for obtaining the interactive data of DCS system, the second protocol stack is used for monitoring first protocol stack data is mutual, and output monitoring result, as shown in fig. 6, communication system includes:
the obtaining module 201 is configured to obtain a monitoring result of the second protocol stack.
And a protocol stack setting module 202, configured to set the first protocol stack according to the monitoring result.
And a communication module 203, configured to communicate with the DCS system according to the interactive data of the first protocol stack.
The second protocol stack is arranged to monitor the first protocol stack to obtain a monitoring result, and the first protocol stack is arranged according to the monitoring result, so that the reliable first protocol stack obtains interaction data of the DCS to communicate with the DCS, the reliability and fault tolerance of CAN bus communication are guaranteed, and high-reliability application scenes of a power plant are met. Furthermore, the method uses a software method to replace the traditional method of using a protocol stack chip to carry out data interaction between the DCS system and the CAN bus, and gets rid of the dependence on a specific supplier.
Specifically, the method comprises the following steps:
a selecting unit 2001, configured to select one protocol stack as a first protocol stack and one or more protocol stacks as second protocol stacks.
The receiving unit 2002 is configured to receive protocol stack configuration information of the DCS system.
A configuration unit 2003, configured to configure the first protocol stack and the second protocol stack according to the protocol stack configuration information.
In an embodiment, if a plurality of protocol stacks are selected from a plurality of protocol stacks as the second protocol stack, the obtaining module 201 further includes:
the counting unit 2011 is configured to count a monitoring result of the second protocol stack.
And if the number of the same monitoring results reaches a preset threshold value, outputting the monitoring results, and outputting the monitoring results when the number of the same monitoring results exceeds one-half of the number of all the monitoring results.
Specifically, the protocol stack setting module 202 includes:
the determining unit 2021 is configured to determine an online state of the first protocol stack according to the monitoring result.
The monitoring result comprises a heartbeat time interval and a heartbeat loss frequency, and if the heartbeat time interval is lower than a preset interval threshold value and the heartbeat loss frequency is lower than a preset frequency threshold value, the state of the first protocol stack is judged to be on-line;
and if the heartbeat time interval is higher than a preset interval threshold value and/or the heartbeat loss frequency is higher than a preset frequency threshold value, judging that the state of the first protocol stack is offline.
The second protocol stack judges the online state of the first protocol stack by monitoring the heartbeat time interval and the heartbeat loss frequency, so that the first protocol stack is convenient to set subsequently.
A setting unit 2022, configured to set the first protocol stack according to the online status.
When the online state of the first protocol stack is offline, one protocol stack is selected from the second protocol stack and set as the first protocol stack, so that the offline first protocol stack is replaced, normal communication between the first protocol stack and the DCS is guaranteed, and the reliability and fault tolerance of communication are improved.
It should be noted that the working principle of the communication system based on the CAN bus of the DCS system in this embodiment is the same as the working principle of the communication method based on the CAN bus of the DCS system in embodiment 1, and therefore, no further description is provided here.
Example 3
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the electronic device implements the communication method based on the CAN bus of the DCS system. The electronic device 30 shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
The electronic device 30 may be embodied in the form of a general purpose computing device, which may be, for example, a server device. The components of the electronic device 30 may include, but are not limited to: the at least one processor 31, the at least one memory 32, and a bus 33 connecting the various system components (including the memory 32 and the processor 31).
The bus 33 includes a data bus, an address bus, and a control bus.
The memory 32 may include volatile memory, such as Random Access Memory (RAM) 321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
Memory 32 may also include a program/utility 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 31 executes various functional applications and data processing, such as the above-described communication method based on the CAN bus of the DCS system, by running a computer program stored in the memory 32.
The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). Such communication may be through input/output (I/O) interfaces 35. Also, model-generating device 30 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via network adapter 36. As shown, network adapter 36 communicates with the other modules of model-generating device 30 via bus 33. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the model-generating device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 4
The present embodiment provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the communication method based on the CAN bus of the DCS system as in the above-described embodiments.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible embodiment, the invention CAN also be implemented in the form of a program product comprising program code for causing a terminal device to execute a communication method implementing the CAN bus of the DCS-based system as described in the above embodiments, when said program product is run on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may be executed entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes or modifications to these embodiments may be made by those skilled in the art without departing from the principle and spirit of this invention, and these changes and modifications are within the scope of this invention.

Claims (10)

1. A communication method of a CAN bus based on a DCS system is provided with a plurality of protocol stacks, the protocol stacks comprise a first protocol stack and a second protocol stack, the first protocol stack is used for obtaining interaction data of the DCS system, the second protocol stack is used for monitoring the interaction of the first protocol stack data and outputting a monitoring result, and the communication method is characterized by comprising the following steps:
acquiring a monitoring result of the second protocol stack;
setting the first protocol stack according to the monitoring result;
and communicating with the DCS according to the interactive data of the first protocol stack.
2. The DCS-based CAN bus communication method of claim 1, wherein said step of obtaining a snoop result of said second protocol stack is preceded by the step of:
selecting one protocol stack from a plurality of protocol stacks as the first protocol stack;
and selecting one or more protocol stacks from a plurality of protocol stacks as the second protocol stack.
3. The DCS-based CAN bus communication method of claim 1, wherein the step of obtaining the snoop results of the second protocol stack is preceded by the step of:
receiving protocol stack configuration information of the DCS;
and configuring the first protocol stack and the second protocol stack according to the protocol stack configuration information.
4. The communication method of the CAN bus based on the DCS system of claim 2, wherein if a plurality of protocol stacks are selected from a plurality of the protocol stacks as the second protocol stack, the step of obtaining the snoop result of the second protocol stack comprises:
counting the monitoring result of the second protocol stack;
and if the same number of the monitoring results reaches a preset threshold value, outputting the monitoring results.
5. The method of claim 4, wherein the step of setting the first protocol stack according to the snoop result comprises:
judging the online state of the first protocol stack according to the monitoring result;
and setting the first protocol stack according to the online state.
6. The DCS-based CAN bus communication method of claim 5, wherein the monitoring result includes a heartbeat time interval and a number of times of heartbeat loss, and the step of determining the online status of the first protocol stack according to the monitoring result includes:
if the heartbeat time interval is lower than a preset interval threshold value and the heartbeat loss frequency is lower than a preset frequency threshold value, judging that the state of the first protocol stack is on-line;
and if the heartbeat time interval is higher than a preset interval threshold value and/or the heartbeat loss frequency is higher than a preset frequency threshold value, judging that the state of the first protocol stack is offline.
7. The DCS-bus based communication method of claim 6, wherein said step of setting said first protocol stack according to said presence state comprises:
and when the online state of the first protocol stack is offline, selecting one protocol stack from the second protocol stack to be set as the first protocol stack.
8. The utility model provides a communication system based on CAN bus of DCS system, be equipped with a plurality of protocol stack on the CAN bus, the protocol stack includes first protocol stack and second protocol stack, first protocol stack is used for acquireing the mutual data of DCS system, the second protocol stack is used for monitoring first protocol stack data interaction to output monitoring result, its characterized in that, communication system includes:
the acquisition module is used for acquiring the monitoring result of the second protocol stack;
the protocol stack setting module is used for setting the first protocol stack according to the monitoring result;
and the communication module is used for communicating with the DCS system according to the interactive data of the first protocol stack.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the communication method based on the CAN bus of the DCS system of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the communication method based on the CAN bus of the DCS system as set forth in any one of claims 1 to 7.
CN202211115884.6A 2022-09-14 2022-09-14 Communication method, system, equipment and medium of CAN bus based on DCS system Active CN115473761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211115884.6A CN115473761B (en) 2022-09-14 2022-09-14 Communication method, system, equipment and medium of CAN bus based on DCS system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211115884.6A CN115473761B (en) 2022-09-14 2022-09-14 Communication method, system, equipment and medium of CAN bus based on DCS system

Publications (2)

Publication Number Publication Date
CN115473761A true CN115473761A (en) 2022-12-13
CN115473761B CN115473761B (en) 2024-03-15

Family

ID=84333606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211115884.6A Active CN115473761B (en) 2022-09-14 2022-09-14 Communication method, system, equipment and medium of CAN bus based on DCS system

Country Status (1)

Country Link
CN (1) CN115473761B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110082430A (en) * 2010-01-11 2011-07-19 한국해양대학교 산학협력단 Protocol conversion apparatus for network monitoring
CN103197652A (en) * 2013-04-12 2013-07-10 北京四方继保自动化股份有限公司 Profibus communication control device for heat-engine plant integrated system
CN105743755A (en) * 2016-04-19 2016-07-06 上海君协光电科技发展有限公司 Dual-redundant CAN bus communication system
CN105785905A (en) * 2016-04-15 2016-07-20 北京开疆智能自动化科技有限公司 Configurable field bus system and configuration method thereof
KR101813067B1 (en) * 2017-09-06 2017-12-28 홍석민 SCADA MAINTENANCE MANAGING SYSTEM AND A GATEWAY WITH IoT MONITORING FUNCTION
CN108599986A (en) * 2015-11-24 2018-09-28 广东欧珀移动通信有限公司 Processing method, application processor and the mobile terminal of network communicating function exception
US20190319894A1 (en) * 2016-12-30 2019-10-17 Huawei Technologies Co., Ltd. Heterogeneous multi-protocol stack method, apparatus, and system
CN114697194A (en) * 2022-02-17 2022-07-01 清华大学 Blocking type event notification method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110082430A (en) * 2010-01-11 2011-07-19 한국해양대학교 산학협력단 Protocol conversion apparatus for network monitoring
CN103197652A (en) * 2013-04-12 2013-07-10 北京四方继保自动化股份有限公司 Profibus communication control device for heat-engine plant integrated system
CN108599986A (en) * 2015-11-24 2018-09-28 广东欧珀移动通信有限公司 Processing method, application processor and the mobile terminal of network communicating function exception
CN105785905A (en) * 2016-04-15 2016-07-20 北京开疆智能自动化科技有限公司 Configurable field bus system and configuration method thereof
CN105743755A (en) * 2016-04-19 2016-07-06 上海君协光电科技发展有限公司 Dual-redundant CAN bus communication system
US20190319894A1 (en) * 2016-12-30 2019-10-17 Huawei Technologies Co., Ltd. Heterogeneous multi-protocol stack method, apparatus, and system
KR101813067B1 (en) * 2017-09-06 2017-12-28 홍석민 SCADA MAINTENANCE MANAGING SYSTEM AND A GATEWAY WITH IoT MONITORING FUNCTION
CN114697194A (en) * 2022-02-17 2022-07-01 清华大学 Blocking type event notification method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
许宁;: "DCS在电厂控制系统的应用及展望", 电站系统工程, no. 01, pages 60 - 61 *
陈娅娟;孙汉旭;贾庆轩;叶平;: "一种新型冗余CAN网络通信协议栈的研制", 测控技术, no. 11, pages 4 - 48 *

Also Published As

Publication number Publication date
CN115473761B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
CN102035862B (en) Configuration node fault transfer method and system in SVC cluster
US5367670A (en) Computer system manager for monitoring events and operating parameters and generating alerts
US20140068134A1 (en) Data transmission apparatus, system, and method
EP0520766A2 (en) Innate bus monitor for computer system manager
CN102124450A (en) Method and systems for synchronization of process control servers
CN109271330A (en) General BMC system based on integrated information system
CN111740879A (en) Data acquisition and data forwarding gateway implementation method
CN210129215U (en) Dual-redundancy electromechanical management computer architecture
EP3014817A1 (en) Hardware management communication protocol
CN113377701B (en) Serial port control system based on complex programmable logic device CPLD and communication method thereof
CN102480396B (en) Server system and connection method thereof
CN105677589A (en) Access control method, access control device and access control system
CN115473761B (en) Communication method, system, equipment and medium of CAN bus based on DCS system
CN116089124A (en) Communication method, device and medium of simulation system
CN113487182B (en) Device health state evaluation method, device, computer device and medium
CN115687026A (en) Multi-node server fault early warning method, device, equipment and medium
CN112711527B (en) Debugging method and device for real-time process, target machine and storage medium
CN115705267A (en) Monitoring acquisition equipment, and main/standby switching method and system based on monitoring acquisition equipment
CN110733037B (en) Signal processing method and device, storage medium and processor
CN210111691U (en) Distributed new energy storage system
CN113900718A (en) Method, system and device for decoupling asset information of BMC (baseboard management controller) and BIOS (basic input/output system)
CN114301941B (en) Management method and device of power equipment and storage medium
CN219204558U (en) Network video recorder and network video recorder system
CN111524053B (en) Information acquisition method, device, equipment and medium of air quality prediction system
CN117687859B (en) Abnormality detection device, abnormality detection system, abnormality detection server and abnormality detection method for PCIe device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant