CN118233239A - MODBUS communication method and system based on thermal power DCS - Google Patents

MODBUS communication method and system based on thermal power DCS Download PDF

Info

Publication number
CN118233239A
CN118233239A CN202410308250.5A CN202410308250A CN118233239A CN 118233239 A CN118233239 A CN 118233239A CN 202410308250 A CN202410308250 A CN 202410308250A CN 118233239 A CN118233239 A CN 118233239A
Authority
CN
China
Prior art keywords
modbus
master station
modbus master
configuration file
station
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.)
Pending
Application number
CN202410308250.5A
Other languages
Chinese (zh)
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.)
Xian Thermal Power Research Institute Co Ltd
Original Assignee
Xian Thermal Power Research Institute 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 Xian Thermal Power Research Institute Co Ltd filed Critical Xian Thermal Power Research Institute Co Ltd
Priority to CN202410308250.5A priority Critical patent/CN118233239A/en
Publication of CN118233239A publication Critical patent/CN118233239A/en
Pending legal-status Critical Current

Links

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention belongs to the technical field of communication of a distributed control system, and particularly discloses a MODBUS communication method and system based on a thermal power DCS. The method comprises the following steps: receiving a configuration file of a MODBUS master station issued by a tool end; the controller forwards the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol, and the controller is used for analyzing after the MODBUS master station receives the configuration file of the MODBUS master station; receiving a virtual MODBUS master card information configuration file under an MODBUS master station issued by a tool end, and issuing the virtual MODBUS master card information configuration file under the MODBUS master station to a controller; the controller forwards the virtual MODBUS master card information configuration file to the MODBUS master station through a matching protocol, and the MODBUS master station receives and analyzes the virtual MODBUS master card information configuration file; after analysis is successful, the controller and the MODBUS master station, and the MODBUS master station and the MODBUS slave station carry out periodic communication and data interaction. The method can be applied to the occasions with strict unidirectional communication requirements so as to meet the safety requirements of industrial control networks with higher requirements.

Description

MODBUS communication method and system based on thermal power DCS
Technical Field
The invention belongs to the technical field of communication of a distributed control system, and particularly relates to a MODBUS communication method and system based on a thermal power DCS.
Background
A decentralized control system is a new type of control device that uses computer technology to centrally monitor, operate, manage and decentralized control a production process, and a controller acts as the brain of the decentralized control system that controls various parts geographically distributed over a control area and performs control algorithms and configurations of various devices, processing and network communications between engineering PCs, which are implemented through simplex or redundant configurations to better control the performance of complex processes. The reliability, stability and high timeliness of the controller are the guarantee of high reliability, flexibility, coordination and stability of the distributed control system; therefore, the design and implementation of any one of the functions in the controller must be premised on reliability, stability, and high timeliness.
In order to meet the complex field requirements, more and more interactions exist between the decentralized control system and the third party equipment, and due to the requirements of the decentralized control system on safety and stability, the data interaction between the decentralized control system and the third party equipment should be on the premise that the normal data interaction process in the decentralized control system is not affected. In the decentralized control system, the controller is mainly responsible for data interaction with the engineering PC and the field IO, and in order to meet the data uniformity, the controller should be mainly responsible for communication with the third party device, so how to design the data flow and the communication mode between the third party device and the decentralized control system is a problem.
Disclosure of Invention
Aiming at the defects, the invention aims to provide a MODBUS communication method and a MODBUS communication system based on a thermal power DCS, which can be applied to occasions with strict unidirectional communication requirements so as to meet the requirements of industrial control network safety with higher requirements.
In order to achieve the above purpose, the invention adopts the following technical means:
the first aspect of the invention provides a MODBUS communication method based on a thermal power DCS, which is characterized by comprising the following steps:
Receiving a configuration file of a MODBUS master station issued by a tool end, wherein the tool end firstly configures MODBUS master station information, after configuration is completed, the configuration file of the MODBUS master station is formed, and the tool end issues the configuration file to a controller;
The controller forwards the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol, and the controller is used for analyzing after the MODBUS master station receives the configuration file of the MODBUS master station;
Receiving a virtual MODBUS master card information configuration file under an MODBUS master station issued by a tool end, and issuing the virtual MODBUS master card information configuration file under the MODBUS master station to a controller;
the controller forwards the virtual MODBUS master card information configuration file to the MODBUS master station through a matching protocol, and the MODBUS master station receives and analyzes the virtual MODBUS master card information configuration file;
after analysis is successful, the controller and the MODBUS master station, and the MODBUS master station and the MODBUS slave station carry out periodic communication and data interaction.
As a further improvement of the invention, the configuration file of the MODBUS master station comprises the station number of the MODBUS master station and the application network IP.
As a further improvement of the invention, the controller forwarding the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol specifically comprises:
after receiving the configuration file of the MODBUS master station issued by the tool end, the controller forwards the configuration file to the MODBUS master station through a matching protocol according to the station number of the MODBUS master station and the stored link IP of the MODBUS master station.
As a further improvement of the invention, the analysis of the MODBUS master station after receiving the configuration file of the MODBUS master station specifically comprises the following steps:
After receiving the configuration file of the MODBUS master station, the MODBUS master station daemon analyzes the configuration file of the MODBUS master station in the starting process, including analyzing the station number of the MODBUS master station and the application network IP; and after the analysis is successful, the analysis information is shared to the MODBUS master station process.
As a further improvement of the invention, the virtual MODBUS master card under the MODBUS master station has the following meanings: a plurality of MODBUS virtual main cards can be built under one MODBUS main station, one virtual main card is considered as one card piece, and a plurality of MODBUS slave stations can be configured under one card piece and used for defining communication between the MODBUS main station and the MODBUS slave stations;
the virtual MODBUS master card information includes: MODBUS slave station information and communication data configuration information related to the slave station information;
The MODBUS slave station information includes: the MODBUS slave station applies the network IP address, port number, register information and communication data request instruction code and the maximum delay time of the communication link;
The communication data configuration information related to the slave station information comprises: the communication data comprises a label name, a data type, communication data register position information and real-time value information.
As a further improvement of the invention, the controller forwards the information configuration file of the virtual MODBUS main card to the MODBUS master station through a matching protocol, and the analysis of the information configuration file of the virtual MODBUS main card received by the MODBUS master station specifically comprises the following steps:
The MODBUS master station registers a card related to communication data in the virtual MODBUS master card information configuration file, reads MODBUS slave station information related to the card, and stores the slave station information to the registered virtual card after analysis is completed.
And storing a communication data check code related to the registered virtual card at the registered virtual card, wherein the check code represents the updating state of communication data in the card, and the check code is unchanged when the communication data configuration information is not modified. When the MODBUS master station communicates data, firstly comparing the communication data with the total check code of the communication data in the MODBUS master station stored last time, if the check codes are consistent, the communication data in the MODBUS master station is not required to be analyzed in the updating, otherwise, the communication data in the MODBUS master station is not required to be analyzed;
when the communication data in the MODBUS master station is analyzed, reading all variable information related to the communication data in the communication data configuration information, and storing the information to a registered virtual card;
as a further improvement of the invention, after the analysis is successful, the periodic communication between the controller and the MODBUS master station, and between the MODBUS master station and the MODBUS slave station specifically comprises the following steps:
the MODBUS master station polls the registered virtual card and the MODBUS slave station information stored in the registered virtual card, and periodically requests or outputs communication data to the MODBUS slave station according to the information;
when communication data is requested to the MODBUS slave station, the MODBUS slave station returns a corresponding communication packet to the MODBUS master station when the link is normal, the MODBUS master station MODBUS standard protocol analyzes the communication packet, and after analysis, a communication data value is written into a communication data position of a registered virtual card according to the position information of a communication data register;
When the communication data is output to the MODBUS slave station, the communication data at the registered virtual card is assembled into an MODBUS standard data packet according to the position information of the communication data register, and the MODBUS standard data packet is sent to the MODBUS slave station.
The controller periodically requests or transmits communication data to the MODBUS master station through a matching protocol, the MODBUS master station transmits the communication data at the virtual card related to the communication data to the controller after receiving the request data packet, and the controller transmits the communication data to the upper computer after receiving the corresponding communication data, and the upper computer displays the communication data; when the upper computer sets a value to the MODBUS slave station, the upper computer sends the value to the controller through a matching protocol, the controller sends a communication data packet to the rear MODBUS master station, and the MODBUS master station stores the communication data in the communication data packet to the communication data at the virtual card according to the register position information to periodically output the communication data to the MODBUS slave station.
A second aspect of the present invention provides a MODBUS communication system based on a thermal power DCS, including:
the master station receiving module is used for receiving the configuration file of the MODBUS master station issued by the tool end, the tool end firstly configures the MODBUS master station, the configuration file of the MODBUS master station is formed after configuration is completed, and the tool end issues the configuration file to the controller;
The master station forwarding module is used for forwarding the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol by the controller and analyzing after the MODBUS master station receives the configuration file of the MODBUS master station;
the slave station receiving module is used for receiving the virtual MODBUS master card information configuration file under the MODBUS master station issued by the tool end, and issuing the virtual MODBUS master card information configuration file under the MODBUS master station to the controller;
The slave station forwarding module is used for forwarding the virtual MODBUS master card information configuration file to the MODBUS master station through a matching protocol by the controller, and the MODBUS master station receives and analyzes the virtual MODBUS master card information configuration file;
and the communication module is used for carrying out periodic communication and data interaction between the controller and the MODBUS master station as well as between the MODBUS master station and the MODBUS slave station.
A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the MODBUS communication method based on thermal power DCS when executing the computer program.
A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the MODBUS communication method based on thermal power DCS.
Compared with the prior art, the invention has the following beneficial effects:
In the method, a controller respectively obtains a configuration file of a MODBUS master station and information of a MODBUS slave station, and then forwards the configuration file and the information of the MODBUS slave station to the MODBUS master station for analysis through a matching protocol, and after the analysis is successful, the controller performs periodic communication and data interaction with the MODBUS master station and the MODBUS slave station. The data in the whole process is uniformly transmitted through the controller, so that the uniformity of the data is realized. The method realizes safe two-way communication between the third party equipment and the third party equipment, and can be applied to occasions with strict one-way communication so as to meet the requirements of industrial control network safety with higher requirements.
Drawings
FIG. 1 is a flow chart of a MODBUS communication method based on a thermal power DCS;
FIG. 2 is a schematic illustration of a MODBUS communication system based on thermal power DCS;
Fig. 3 is a schematic diagram of an electronic device according to the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Modbus is a serial communication protocol, and is a common connection mode between industrial electronic devices.
As shown in fig. 1, a first object of the present invention is to provide a MODBUS communication method based on a thermal power DCS, including:
S1, receiving a configuration file of a MODBUS master station issued by a tool end, wherein the tool end firstly configures MODBUS master station information, after configuration is completed, the configuration file of the MODBUS master station is formed, and the tool end issues the configuration file to a controller;
S2, the controller forwards the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol, and the MODBUS master station is used for analyzing after receiving the configuration file of the MODBUS master station;
s3, receiving a virtual MODBUS master card information configuration file under the MODBUS master station issued by the tool end, and issuing the virtual MODBUS master card information configuration file under the MODBUS master station to the controller;
S4, the controller forwards the virtual MODBUS master card information configuration file to the MODBUS master station through a matching protocol, and the MODBUS master station receives and analyzes the virtual MODBUS master card information configuration file;
And S5, after analysis is successful, the controller and the MODBUS master station, and the MODBUS master station and the MODBUS slave station carry out periodic communication and data interaction.
The matching protocol and the third party equipment identity serving as the MODBUS slave station realize safe two-way communication between the third party equipment and the third party equipment, and can be applied to occasions with strict one-way communication so as to meet the safety requirement of industrial control networks with higher requirements.
The present invention will be described in detail with reference to specific examples.
The embodiment provides a MODBUS communication method based on a thermal power DCS, which comprises the following steps:
S1, configuring a MODBUS master station by a tool end, and after the configuration is completed, issuing a configuration file of the MODBUS master station to a controller;
In step S1, the configuring the MODBUS master station by the tool end, and after the configuring, issuing the configuration file of the MODBUS master station to the controller specifically includes:
The information in the configuration file of the MODBUS master station comprises the station number of the MODBUS master station and the IP of the application network, the application network of the MUDBUS master station is redundant for the reliability of communication, and the tool end transmits the configuration file of the MODBUS master station to the controller through a matching protocol.
S2, the controller forwards the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol, and the MODBUS master station analyzes after receiving the configuration file of the MODBUS master station;
In step S2, the controller forwards the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol specifically includes:
after receiving the configuration file of the MODBUS master station issued by the tool end, the controller forwards the configuration file to the MODBUS master station through a matching protocol according to the station number of the MODBUS master station and the stored link IP of the MODBUS master station.
After the MODBUS master station receives the configuration file of the MODBUS master station, the method specifically comprises the following steps:
After receiving the configuration file of the MODBUS master station, the MODBUS master station daemon analyzes the configuration file of the MODBUS master station in the starting process, including analyzing the station number of the MODBUS master station and the application network IP; and after the analysis is successful, the analysis information is shared to the MODBUS master station process.
S3, configuring MODBUS slave station information by the tool end, and after configuration is completed, transmitting the MODBUS slave station information to the controller;
In step S3, the tool end configures MODBUS slave station information, and after the configuration is completed, the MODBUS slave station information is issued to the controller, which specifically includes:
The virtual MODBUS master card under the MODBUS master station has the following meanings: a plurality of MODBUS virtual main cards can be built under one MODBUS main station, one virtual main card is considered as one card piece, and a plurality of MODBUS slave stations can be configured under one card piece and used for defining communication between the MODBUS main station and the MODBUS slave stations;
the virtual MODBUS master card information includes: MODBUS slave station information and communication data configuration information related to the slave station information;
The MODBUS slave station information includes: the MODBUS slave station applies the network IP address, port number, register information and communication data request instruction code and the maximum delay time of the communication link;
The communication data configuration information related to the slave station information comprises: the communication data comprises a label name, a data type, communication data register position information and real-time value information.
S4, the controller forwards the MODBUS slave station information and the communication data configuration information to the MODBUS master station through a matching protocol, and the MODBUS master station starts to analyze the MODBUS slave station information and the communication data configuration information after receiving the MODBUS slave station information;
In step S4, after receiving the corresponding communication data configuration information, the MODBUS master station starts to analyze, where the analysis process is as follows:
The controller forwards the virtual MODBUS master card information configuration file to the MODBUS master station through a matching protocol, and the MODBUS master station receives the virtual MODBUS master card information configuration file to analyze specifically comprises the following steps:
The MODBUS master station registers a card related to communication data in the virtual MODBUS master card information configuration file, reads MODBUS slave station information related to the card, and stores the slave station information to the registered virtual card after analysis is completed.
And storing a communication data check code related to the registered virtual card at the registered virtual card, wherein the check code represents the updating state of communication data in the card, and the check code is unchanged when the communication data configuration information is not modified. When the MODBUS master station communicates data, firstly comparing the communication data with the total check code of the communication data in the MODBUS master station stored last time, if the check codes are consistent, the communication data in the MODBUS master station is not required to be analyzed in the updating, otherwise, the communication data in the MODBUS master station is not required to be analyzed;
when the communication data in the MODBUS master station is analyzed, reading all variable information related to the communication data in the communication data configuration information, and storing the information to the registered virtual card.
The inclusion relation of each item of information in the MODBUS master station is as follows:
10 MODBUS cards can be constructed under one MODBUS master station to serve as the master station in MODBUS communication, namely 10 MODBUS master stations; each MODBUS master station may contain a plurality of communication data; while each MODBUS master station may communicate with a plurality of MODBUS slaves.
The communication data configuration information contains information of all the above items.
The controller forwards the MODBUS slave station information and the communication data configuration information to the MODBUS master station through a matching protocol, and the MODBUS master station starts to analyze the MODBUS slave station information and the communication data configuration information after receiving the MODBUS slave station information specifically comprises the following steps:
When the communication data of the tool end is changed or the corresponding MODBUS slave station information is changed, the communication data configuration information needs to be issued to the controller again, after the controller issues the communication data configuration information to the controller through the matching protocol, the controller issues the communication data configuration information to the MODBUS master station through the matching protocol, and the MODBUS master station analyzes the communication data configuration information.
And S5, after analysis is successful, the MODBUS master station and the MODBUS slave station are in periodic communication with the controller.
In step S5, after the analysis is successful, the periodic communication between the MODBUS master station and the MODBUS slave station and the controller specifically includes:
after analysis is successful, the periodic communication between the controller and the MODBUS master station and between the MODBUS master station and the MODBUS slave station specifically comprises the following steps:
the MODBUS master station polls the registered virtual card and the MODBUS slave station information stored in the registered virtual card, and periodically requests or outputs communication data to the MODBUS slave station according to the information;
when communication data is requested to the MODBUS slave station, the MODBUS slave station returns a corresponding communication packet to the MODBUS master station when the link is normal, the MODBUS master station MODBUS standard protocol analyzes the communication packet, and after analysis, a communication data value is written into a communication data position of a registered virtual card according to the position information of a communication data register;
When the communication data is output to the MODBUS slave station, the communication data at the registered virtual card is assembled into an MODBUS standard data packet according to the position information of the communication data register, and the MODBUS standard data packet is sent to the MODBUS slave station.
The controller periodically requests or transmits communication data to the MODBUS master station through a matching protocol, the MODBUS master station transmits the communication data at the virtual card related to the communication data to the controller after receiving the request data packet, and the controller transmits the communication data to the upper computer after receiving the corresponding communication data, and the upper computer displays the communication data; when the upper computer sets a value to the MODBUS slave station, the upper computer sends the value to the controller through a matching protocol, the controller sends a communication data packet to the rear MODBUS master station, and the MODBUS master station stores the communication data in the communication data packet to the communication data at the virtual card according to the register position information to periodically output the communication data to the MODBUS slave station.
As shown in fig. 2, the present invention further provides a MODBUS communication system based on a thermal power DCS, including:
the master station receiving module is used for receiving a configuration file of the MODBUS master station issued by the tool end, the tool end firstly configures MODBUS master station information, after configuration is completed, a configuration file of the MODBUS master station is formed, and the tool end issues the configuration file to the controller;
The master station forwarding module is used for forwarding the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol by the controller and analyzing after the MODBUS master station receives the configuration file of the MODBUS master station;
The slave station receiving module is used for receiving the virtual MODBUS master card information configuration file under the MODBUS master station issued by the tool end, and issuing the virtual MODBUS master card information configuration file under the MODBUS master station to the controller;
The slave station forwarding module is used for forwarding the virtual MODBUS master card information configuration file to the MODBUS master station through a matching protocol by the controller, and the MODBUS master station receives and analyzes the virtual MODBUS master card information configuration file;
and the communication module is used for carrying out periodic communication and data interaction between the controller and the MODBUS master station, and between the MODBUS master station and the MODBUS slave station after the analysis is successful.
The system comprises a communication part at the side of the decentralized control system, and a communication part between the side of the decentralized control system and the third party equipment. The distributed control system side controller is communicated with the MODBUS master station by adopting a matching protocol, and the distributed control system is communicated with the third party equipment by adopting a standard MODBUS communication protocol through the MODBUS master station, namely, the distributed control system performs data interaction with the third party equipment through the MODBUS master station. The self-defined matching protocol and the identity of the third party equipment serving as the MODBUS slave station realize safe two-way communication between the third party equipment and the third party equipment, and can be applied to occasions with strict one-way communication so as to meet the safety requirements of industrial control networks with higher requirements.
As shown in fig. 3, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the MODBUS communication method based on thermal power DCS when executing the computer program.
The MODBUS communication method based on the thermal power DCS comprises the following steps:
Receiving a configuration file of a MODBUS master station issued by a tool end, wherein the tool end firstly configures MODBUS master station information, after configuration is completed, the configuration file of the MODBUS master station is formed, and the tool end issues the configuration file to a controller;
The controller forwards the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol, and the controller is used for analyzing after the MODBUS master station receives the configuration file of the MODBUS master station;
Receiving a virtual MODBUS master card information configuration file under an MODBUS master station issued by a tool end, and issuing the virtual MODBUS master card information configuration file under the MODBUS master station to a controller;
the controller forwards the virtual MODBUS master card information configuration file to the MODBUS master station through a matching protocol, and the MODBUS master station receives and analyzes the virtual MODBUS master card information configuration file;
after analysis is successful, the controller and the MODBUS master station, and the MODBUS master station and the MODBUS slave station carry out periodic communication and data interaction.
The invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the MODBUS communication method based on the thermal power DCS when being executed by a processor.
The MODBUS communication method based on the thermal power DCS comprises the following steps:
Receiving a configuration file of a MODBUS master station issued by a tool end, wherein the tool end firstly configures MODBUS master station information, after configuration is completed, the configuration file of the MODBUS master station is formed, and the tool end issues the configuration file to a controller;
The controller forwards the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol, and the controller is used for analyzing after the MODBUS master station receives the configuration file of the MODBUS master station;
Receiving a virtual MODBUS master card information configuration file under an MODBUS master station issued by a tool end, and issuing the virtual MODBUS master card information configuration file under the MODBUS master station to a controller;
the controller forwards the virtual MODBUS master card information configuration file to the MODBUS master station through a matching protocol, and the MODBUS master station receives and analyzes the virtual MODBUS master card information configuration file;
after analysis is successful, the controller and the MODBUS master station, and the MODBUS master station and the MODBUS slave station carry out periodic communication and data interaction.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical aspects of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the above embodiments, it should be understood by those of ordinary skill in the art that: modifications and equivalents may be made to the specific embodiments of the invention without departing from the spirit and scope of the invention, which is intended to be covered by the claims.

Claims (10)

1. The MODBUS communication method based on the thermal power DCS is characterized by comprising the following steps of:
Receiving a configuration file of a MODBUS master station issued by a tool end, wherein the tool end firstly configures MODBUS master station information, after configuration is completed, the configuration file of the MODBUS master station is formed, and the tool end issues the configuration file to a controller;
The controller forwards the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol, and the controller is used for analyzing after the MODBUS master station receives the configuration file of the MODBUS master station;
Receiving a virtual MODBUS master card information configuration file under an MODBUS master station issued by a tool end, and issuing the virtual MODBUS master card information configuration file under the MODBUS master station to a controller;
the controller forwards the virtual MODBUS master card information configuration file to the MODBUS master station through a matching protocol, and the MODBUS master station receives and analyzes the virtual MODBUS master card information configuration file;
after analysis is successful, the controller and the MODBUS master station, and the MODBUS master station and the MODBUS slave station carry out periodic communication and data interaction.
2. The MODBUS communication method based on thermal power DCS according to claim 1, wherein:
the configuration file of the MODBUS master station comprises the station number of the MODBUS master station and the application network IP.
3. The MODBUS communication method based on thermal power DCS according to claim 1, wherein:
The controller forwards the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol, and the method specifically comprises the following steps:
after receiving the configuration file of the MODBUS master station issued by the tool end, the controller forwards the configuration file to the MODBUS master station through a matching protocol according to the station number of the MODBUS master station and the stored link IP of the MODBUS master station.
4. The MODBUS communication method based on thermal power DCS according to claim 1, wherein:
After the MODBUS master station receives the configuration file of the MODBUS master station, the method specifically comprises the following steps:
After receiving the configuration file of the MODBUS master station, the MODBUS master station daemon analyzes the configuration file of the MODBUS master station in the starting process, including analyzing the station number of the MODBUS master station and the application network IP; and after the analysis is successful, the analysis information is shared to the MODBUS master station process.
5. The MODBUS communication method based on thermal power DCS according to claim 1, wherein:
The virtual MODBUS master card under the MODBUS master station has the following meanings: a plurality of MODBUS virtual main cards can be built under one MODBUS main station, one virtual main card is considered as one card piece, and a plurality of MODBUS slave stations can be configured under one card piece and used for defining communication between the MODBUS main station and the MODBUS slave stations;
the virtual MODBUS master card information includes: MODBUS slave station information and communication data configuration information related to the slave station information;
The MODBUS slave station information includes: the MODBUS slave station applies the network IP address, port number, register information and communication data request instruction code and the maximum delay time of the communication link;
The communication data configuration information related to the slave station information comprises: the communication data comprises a label name, a data type, communication data register position information and real-time value information.
6. The MODBUS communication method based on thermal power DCS according to claim 1, wherein:
The controller forwards the virtual MODBUS master card information configuration file to the MODBUS master station through a matching protocol, and the MODBUS master station receives the virtual MODBUS master card information configuration file to analyze specifically comprises the following steps:
The MODBUS master station registers a card related to communication data in the virtual MODBUS master card information configuration file, reads MODBUS slave station information related to the card, and stores the slave station information to the registered virtual card after analysis is completed;
Storing a communication data check code related to the registered virtual card at the registered virtual card, wherein the check code represents the update state of communication data in the card, and the check code is unchanged when the communication data configuration information is not modified; when the MODBUS master station communicates data, firstly comparing the communication data with the total check code of the communication data in the MODBUS master station stored last time, if the check codes are consistent, the communication data in the MODBUS master station is not required to be analyzed in the updating, otherwise, the communication data in the MODBUS master station is not required to be analyzed;
when the communication data in the MODBUS master station is analyzed, reading all variable information related to the communication data in the communication data configuration information, and storing the information to the registered virtual card.
7. The MODBUS communication method based on thermal power DCS according to claim 1, wherein:
after analysis is successful, the periodic communication between the controller and the MODBUS master station and between the MODBUS master station and the MODBUS slave station specifically comprises the following steps:
the MODBUS master station polls the registered virtual card and the MODBUS slave station information stored in the registered virtual card, and periodically requests or outputs communication data to the MODBUS slave station according to the information;
when communication data is requested to the MODBUS slave station, the MODBUS slave station returns a corresponding communication packet to the MODBUS master station when the link is normal, the MODBUS master station MODBUS standard protocol analyzes the communication packet, and after analysis, a communication data value is written into a communication data position of a registered virtual card according to the position information of a communication data register;
When communication data is output to the MODBUS slave station, the communication data at the registered virtual card is assembled into an MODBUS standard data packet according to the position information of the communication data register and is sent to the MODBUS slave station;
The controller periodically requests or transmits communication data to the MODBUS master station through a matching protocol, the MODBUS master station transmits the communication data at the virtual card related to the communication data to the controller after receiving the request data packet, and the controller transmits the communication data to the upper computer after receiving the corresponding communication data, and the upper computer displays the communication data; when the upper computer sets a value to the MODBUS slave station, the upper computer sends the value to the controller through a matching protocol, the controller sends a communication data packet to the rear MODBUS master station, and the MODBUS master station stores the communication data in the communication data packet to the communication data at the virtual card according to the register position information to periodically output the communication data to the MODBUS slave station.
8. A MODBUS communication system based on thermal power DCS, comprising:
the master station receiving module is used for receiving the configuration file of the MODBUS master station issued by the tool end, the tool end firstly configures the MODBUS master station, the configuration file of the MODBUS master station is formed after configuration is completed, and the tool end issues the configuration file to the controller;
The master station forwarding module is used for forwarding the configuration file of the MODBUS master station to the MODBUS master station through a matching protocol by the controller and analyzing after the MODBUS master station receives the configuration file of the MODBUS master station;
the slave station receiving module is used for receiving the virtual MODBUS master card information configuration file under the MODBUS master station issued by the tool end, and issuing the virtual MODBUS master card information configuration file under the MODBUS master station to the controller;
The slave station forwarding module is used for forwarding the virtual MODBUS master card information configuration file to the MODBUS master station through a matching protocol by the controller, and the MODBUS master station receives and analyzes the virtual MODBUS master card information configuration file;
and the communication module is used for carrying out periodic communication and data interaction between the controller and the MODBUS master station as well as between the MODBUS master station and the MODBUS slave station.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the thermal power DCS-based MODBUS communication method of any one of claims 1 to 7 when the computer program is executed by the processor.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the MODBUS communication method based on thermal power DCS as claimed in any one of claims 1 to 7.
CN202410308250.5A 2024-03-18 2024-03-18 MODBUS communication method and system based on thermal power DCS Pending CN118233239A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410308250.5A CN118233239A (en) 2024-03-18 2024-03-18 MODBUS communication method and system based on thermal power DCS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410308250.5A CN118233239A (en) 2024-03-18 2024-03-18 MODBUS communication method and system based on thermal power DCS

Publications (1)

Publication Number Publication Date
CN118233239A true CN118233239A (en) 2024-06-21

Family

ID=91503442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410308250.5A Pending CN118233239A (en) 2024-03-18 2024-03-18 MODBUS communication method and system based on thermal power DCS

Country Status (1)

Country Link
CN (1) CN118233239A (en)

Similar Documents

Publication Publication Date Title
CN101341450B (en) Method, communication network, and control unit for the cyclical transmission of data
CN108989358B (en) Method for acquiring running data of textile machine based on TCP/IP protocol
CN107276711B (en) EtherCAT master station device
CN101808051B (en) Application integration gateway and control method thereof
CN106982222A (en) The multi-protocol data cut-in method and device that can configure under a kind of industrial 4.0 environment
CN104216761A (en) Method for using shared device in device capable of operating two operation systems
CN110933170A (en) Multi-device linkage control method and device of ZigBee gateway and storage medium
CN111464447B (en) Method and device for synchronizing forwarding tables of ultra-bandwidth multi-core Ethernet switching chips
CN103929377A (en) Wired network and wireless network combined dispatching method and system and related devices
CN114285695B (en) Communication method, device, apparatus, system and storage medium
CN102984258A (en) Internet of things data transmission method and adapter
CN104394018A (en) Communication device and active-standby system data online exchange method for hot master control panel backup
CN114500151B (en) Motion control communication system and communication method based on CAN bus
CN101986614A (en) Logistics application-oriented universal industry service bus system and implement method thereof
CN106850554B (en) Method and device for dual-system directional connection
CN105357148A (en) Method and system for preventing output message of network exchange chip from being disordered
CN113542216A (en) Automatic conversion method and device for interface protocol
CN118233239A (en) MODBUS communication method and system based on thermal power DCS
CN106445852B (en) A kind of task communicator and method based on from monitoring framework
CN110113430B (en) Communication method between mobile phone and raspberry pie based on cloud database
CN105207866B (en) Communication means and airconditioning control network based on airconditioning control network-based control terminal
CN103944738B (en) A kind of interchanger for supporting Function Extension
CN106708701B (en) Central maintenance device and method based on ARINC659 bus
CN110032536A (en) Two be MCU method of data synchronization, apparatus and system
CN114513792A (en) Remote network control method and device based on eSIM card

Legal Events

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