CN112311808A - Method for automatically mapping Modbus protocol data to OPCUA address space - Google Patents

Method for automatically mapping Modbus protocol data to OPCUA address space Download PDF

Info

Publication number
CN112311808A
CN112311808A CN202011253177.4A CN202011253177A CN112311808A CN 112311808 A CN112311808 A CN 112311808A CN 202011253177 A CN202011253177 A CN 202011253177A CN 112311808 A CN112311808 A CN 112311808A
Authority
CN
China
Prior art keywords
data
opcua
node
address
mapping table
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
CN202011253177.4A
Other languages
Chinese (zh)
Other versions
CN112311808B (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.)
Shanghai Electrical Apparatus Research Institute Group Co Ltd
Shanghai Motor System Energy Saving Engineering Technology Research Center Co Ltd
Original Assignee
Shanghai Electrical Apparatus Research Institute Group Co Ltd
Shanghai Motor System Energy Saving Engineering Technology Research Center 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 Shanghai Electrical Apparatus Research Institute Group Co Ltd, Shanghai Motor System Energy Saving Engineering Technology Research Center Co Ltd filed Critical Shanghai Electrical Apparatus Research Institute Group Co Ltd
Priority to CN202011253177.4A priority Critical patent/CN112311808B/en
Publication of CN112311808A publication Critical patent/CN112311808A/en
Application granted granted Critical
Publication of CN112311808B publication Critical patent/CN112311808B/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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • 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/40006Architecture of a communication node
    • 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/40228Modbus
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention relates to a method for automatically mapping Modbus protocol data to an OPCUA address space. The invention integrates the data acquired by the Modbus protocol into an upper layer visual management system by utilizing the characteristics that the OPCUA protocol is cross-platform, is suitable for long-distance transmission and has a data structure which is popular and clear, and is convenient for non-professional people to remotely inquire and manage. The method provided by the invention is compatible with the universality of the Modbus protocol in an industrial field, avoids the defects of the Modbus protocol during data integration, and provides a reliable industrial data integration scheme for an enterprise collaborative manufacturing system.

Description

Method for automatically mapping Modbus protocol data to OPCUA address space
Technical Field
The invention relates to a method for automatically mapping Modbus protocol data to an OPCUA address space, which is applied to data standardization integration in collaborative manufacturing, relates to communication technologies including an OPCUA protocol and a Modbus protocol, and belongs to the field of intelligent manufacturing and industrial internet communication.
Background
The Modbus protocol invented by Schneider in 1979 is the first bus protocol that is really widely used in industrial fields around the world. The protocol supports traditional RS-232/RS-422/RS-485 and Ethernet devices, and most industrial devices including PLC, DSC, intelligent instruments and the like generally adopt Modbus as a communication standard until now.
OPCUA is a new generation of OPC architecture specification that was released by the OPC foundation in 7 months 2006. OPC is widely used in systems such as DCS, PLC, SCADA, etc., as a de facto industrial integration standard, but OPC technology does not have cross-platform property due to its dependence on microsoft PC platform. And the method also has limitations in application environment, reliability and real-time property. OPC UA adds the concept of address space, enlarges the attribute range of DA data model, adds safety model and does not limit the new characteristics of realizing platform, so that it can be integrated from field equipment layer, process control layer and enterprise management layer, and can expect OPCUA to be widely used as the substitute of OPC technology.
Although the Modbus protocol standard is widely popularized, the Modbus protocol standard has strong specialization. Any skilled person in the deep area also needs to read the Modbus communication message manual of each manufacturer's device in detail to know the information such as the register address structure, data type, etc. of the specific device. In addition, the request result of the Modbus protocol is directly embodied in a 16-system message, which has poor readability, and a professional serial port analysis tool is usually required to analyze the return value of each register in the message. These innate constraints pose a certain level of impediment to the integration of data by current collaborative manufacturing systems. In the opua protocol, all data points are stored in the opua address space and organized in a tree; each data point corresponds to a node element in the tree diagram and has a specific name and type definition; the user clicks a specific node element, so that basic information such as the length, the current value, the readable and writable attribute and the like of the node element can be checked; even non-professional people can easily read and modify the information of the OPCUA address space, and the structure is clear, simple and clear and convenient to manage. The cross-platform nature of the opua protocol also has led to its wider and wider application in various smart manufacturing, industrial internet system data integration solutions.
Under the background of the rapid development of the intelligent manufacturing and industrial internet industries, the demands of cloud, data visualization and integration on industrial data are increasingly urgent. The conventional Modbus protocol is also a field bus protocol, and is limited by the factors such as limited data transmission range and poor data readability, which cannot meet the above requirements.
Disclosure of Invention
The purpose of the invention is: an industrial data integration scheme based on the OPCUA protocol is provided.
In order to achieve the above object, the technical solution of the present invention is to provide a method for automatically mapping Modbus protocol data to an OPCUA address space, an applied platform architecture is composed of an upper management system, an embedded gateway middleware and an industrial field device layer, wherein the embedded gateway middleware is a bridge connecting the upper management system and the industrial field device layer, an OPCUA server deployed by the embedded gateway middleware and an OPCUA client deployed in the upper management system are connected by a TCP protocol, the embedded gateway middleware and the industrial field device layer communicate by a Modbus protocol, the industrial field device layer deploys N industrial field devices supporting the Modbus protocol, and the method is characterized in that a register address space of the industrial field device supporting the Modbus protocol is automatically mapped to the OPCUA protocol address space by an address mapping table, the method specifically comprises the following steps:
step 1, a user inputs an IP address and a port number of an OPCUA server deployed by embedded gateway middleware in OPCUA client software, and after TCP connection is established with the OPCUA server, an OPCUA address space is read and displayed in a display interface of the OPCUA client software;
step 2, the user inputs the configuration information needed by generating the mapping relation table, wherein the configuration information comprises equipment attribute information, message information and data point information, and the method comprises the following steps:
selecting M industrial field devices needing to be communicated from N industrial field devices, and configuring relevant device attribute information of each industrial field device, wherein the relevant device attribute information comprises a device ID, a device name, a device type and communication port configuration information of the mth industrial field device, and M is 1,2, … and M;
the message information comprises a message ID, a Modbus function code and a CRC check bit;
the data point information comprises a data point ID, a register offset address, a data type, a data length and a corresponding OPCUA data point name, and each Modbus data point is associated with the corresponding OPCUA data point through the corresponding OPCUA data point name;
and 3, automatically generating an address mapping table file based on the configuration information input in the step 2 and then sending the address mapping table file to the embedded gateway middleware, wherein:
the address mapping table file is embedded and organized with a configuration file data structure according to the hierarchical relation from equipment to messages to data points, wherein M pieces of equipment data are provided, each piece of equipment data comprises an equipment ID field, an equipment name field, an equipment type field and a configuration information field, and J pieces of message data are embedded in each piece of equipment data; each message data comprises a message ID field, a Modbus function code field and a CRC check bit field, and each message data is nested with K data point data; each data point data comprises a data point ID field, a register offset address field, a data type field, a data length field and a corresponding OPCUA data point name field;
step 4, after the embedded gateway middleware finishes downloading the address mapping table, storing the address mapping table into an address mapping table cache region;
step 5, a Modbus message checker in the embedded gateway middleware reads an address mapping table in an address mapping table cache region, establishes a Modbus communication message queue according to a data structure in the address mapping table, calls a Modbus communication module to traverse the Modbus communication message queue by the embedded gateway middleware, executes Modbus test requests one by one, and proves the legality of the address mapping table and the normal operation of M pieces of industrial field equipment after all the Modbus test requests are executed and expected response messages are obtained;
step 6, after proving the validity of the address mapping table, the OPCUA server in the embedded gateway middleware reads the address mapping table, and automatically generates an OPCUA address space according to the data structure in the address mapping table for the OPCUA client of the upper management software to access and manage, wherein the specific execution process of the OPCUA address space generation policy comprises the following steps:
601, grouping the devices according to the device Type field in the address mapping table, wherein each group of devices of different types is newly added with a corresponding packet node of a Folder Type in an OPCUA address space;
step 602, mapping an Object type opua device node under its corresponding packet node for each device in each packet;
step 603, adding a data point root node of a Folder Type and a device attribute node of an Object Type under each OPCUA device node;
step 604, in the device attribute node, mapping a plurality of Property type single attribute nodes according to the device data structure in the address mapping table and the difference of the groups to which the devices belong, wherein each single attribute node is used for recording port configuration information of the current device under the current group;
under the data point root node, grouping the data points according to Modbus function code fields in an address mapping table, dividing the data points into three groups of input registers, holding registers and switch registers, and mapping a Folder Type register root node respectively;
step 605, under the register root node, mapping a register node of Object type for each data point according to the corresponding OPCUA data point name in the address mapping table, where the name of the register node is the corresponding OPCUA data point name;
step 606, under the register node, mapping a plurality of single attribute nodes of Property type and a value node of Object type according to the attribute information of the data point in the address mapping table, wherein:
the single attribute node of the Property type comprises an offset address node, a data type node and a data length node;
the value node of the Object type holds the current value of the register with the corresponding opuua data point name.
Preferably, an ethernet communication mode or a 4G communication mode is adopted between the OPCUA client deployed in the upper management system and the OPCUA server deployed in the embedded gateway middleware;
and an RS485 communication mode, an RS232 communication mode, an RS422 communication mode or an Ethernet communication mode is adopted between the embedded gateway middleware and the industrial field device layer.
Preferably, in step 2, if the mth industrial field device is a serial device, the communication port configuration information includes a slave station address of the Modbus, a serial port number, a serial port baud rate, a stop bit, a data bit, a check bit, and an acquisition period;
if the mth industrial field device is the internet access device, the communication port configuration information comprises a device IP address, a port number and an acquisition period;
in step 3, if the mth industrial field device is a serial device, the device type field of the device data corresponding to the mth industrial field device in the address mapping table file is a serial device, and the configuration information field comprises a Modbus slave station address, a serial port number, a serial port baud rate, a stop bit, a data bit, a check bit and an acquisition period;
if the mth industrial field device is the internet access device, the device type field of the device data corresponding to the mth industrial field device in the address mapping table file is the internet access device, and the configuration information field comprises a device IP address, a port number and an acquisition period.
Preferably, in step 604, for the serial device, the single attribute node includes a slave station address node, a serial number node, a baud rate node, a stop bit node, a check bit node, and a data bit node; for the internet access device, the single attribute node comprises an IP address node and a port number node.
Preferably, in step 2, the user inputs the configuration information in a configuration interface of the mapping relation generator;
in step 3, the mapping relation generator automatically generates the address mapping table file in the XML or JSON format, and the address mapping table file is issued to the mapping relation downloader of the embedded gateway middleware through the data channel of the IOT suite.
The invention relates to a method for automatically mapping Modbus protocol data to an OPCUA address space; the data collected by the Modbus protocol is integrated into an upper visual management system by utilizing the characteristics that the OPCUA protocol is cross-platform, suitable for remote transmission and has a popular and easily understood data structure, so that the remote query and management of non-professionals are facilitated. The method provided by the invention is compatible with the universality of the Modbus protocol in an industrial field, avoids the defects of the Modbus protocol during data integration, and provides a reliable industrial data integration scheme for an enterprise collaborative manufacturing system.
Currently, the application of the Modbus protocol in an industrial field is very common, and inherent restriction factors such as narrow communication range and poor readability of the Modbus protocol are increasingly prominent along with the emergence of the data integration requirement of the collaborative manufacturing system. The invention compares the characteristics of the Modbus protocol and the OPCUA protocol and the data structures thereof, provides a mapping method from the Modbus register address space to the OPCUA address space, and makes up the defects of the Modbus protocol in the remote data integration on the premise of taking the strong data acquisition capacity of the Modbus protocol into account by utilizing the characteristics of the OPCUA which is cross-platform, suitable for remote transmission and high in visualization degree. And a set of specific and reliable technical solution is provided by combining with actual development experience. The integration of the industrial field data of the collaborative manufacturing system provides a reference idea.
The invention designs a method for converting a Modbus protocol data structure into an OPCUA address space on the basis of using the thought of the Modbus protocol data structure. The invention provides a detailed Modbus address mapping table structure and an OPCUA address space node distribution schematic diagram, and has stronger feasibility and practicability.
The address space mapping strategy provided by the invention can effectively and automatically map the Modbus data address space to the OPCUA address space, so that the OPCUA can be fully compatible with the traditional Modbus configuration message and adapt to most industrial data acquisition application scenes. The Modbus and the OPCUA are organically combined and do not interfere with each other, the system modules are closely related and are low in coupling, and certain innovativeness is achieved.
The invention designs an address mapping strategy and method between Modbus and OPCUA protocols by using the idea of applying a digital twin concept to an intelligent manufacturing multi-terminal industrial equipment inspection monitoring system. Simulating the one-to-one corresponding relation between the physical entity equipment state and the online state information in the digital twin, and linking the concepts of equipment addresses, messages, register addresses and the like in the Modbus with tree nodes in an OPCUA address space one by one to form a mapping relation which is dynamically changed and can be influenced by interaction; provides a flexible, efficient and high-reliability method for mutual conversion between the two.
Drawings
FIG. 1 is an industrial data integration scheme architecture based on the OPCUA protocol;
FIG. 2 is a data structure of a Modbus address mapping table;
FIG. 3 is an OPCUA address space data structure;
fig. 4 is a workflow of an industrial data integration scheme system based on the OPCUA protocol.
Detailed Description
The invention will be further illustrated with reference to the following specific examples. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and such equivalents may fall within the scope of the present invention as defined in the appended claims.
The platform architecture applied by the method for automatically mapping Modbus protocol data to the OPCUA address space is shown in figure 1, and comprises three layers of modules, including: the system comprises an upper management system, an embedded gateway middleware and an industrial field device layer.
The OPCUA client terminal deployed in the upper management system is connected with the OPCUA server terminal deployed in the embedded gateway middleware by adopting a TCP protocol, and an Ethernet/4G communication mode is supported. The embedded gateway middleware and the industrial field device layer adopt Modbus protocol communication to support RS485/RS232/RS 422/Ethernet. The embedded gateway middleware is a bridge connecting an upper management system and industrial field equipment, and mapping conversion of bottom layer Modbus data to upper layer OPCUA data is realized inside the gateway.
The upper management system comprises two modules: a graphical display interface and a mapping relation generator.
And the graphical display interface, namely the OPCUA client, is connected with an OPCUA server deployed in the embedded gateway middleware through a TCP protocol. The graphical display interface is responsible for providing a visual OPCUA address space for a user, so that the user can inquire and manage the attribute, data point and state information of the field device connected with the embedded gateway middleware.
The mapping relation generator provides a configuration interface of the mapping relation from the Modbus address space to the OPCUA address space for a user, and the operation which can be completed by the user comprises the following steps:
1) add/delete devices;
2) adding/deleting device messages;
3) adding/deleting message data points;
4) configuring the attribute of the equipment (for serial equipment, the configuration items comprise equipment ID, equipment name, equipment type, Modbus slave station address, serial port number, serial port baud rate, stop bit, data bit, check bit and acquisition period; for the internet access device, the configuration items comprise a device ID, a device name, a device type, a device IP address, a port number and a collection period);
5) configuring messages (configuration items comprise message ID, Modbus function codes and CRC check bits);
6) configuration data points (configuration items include data point ID, register offset address, data type, length, corresponding opuua data point name).
After the user configuration is finished, clicking to generate the mapping relation table, and generating the Modbuss-OPCUA address relation mapping table in the XML or JSON format by the mapping relation generator. The address mapping table is stored in a file or a database of an upper management system and can be downloaded by the embedded gateway middleware.
As shown in fig. 2, the mapping relationship table is characterized in that the configuration file data structure is embedded and organized according to the hierarchical relationship of the device- > message- > data point. Wherein each Modbus data point must be its associated corresponding opuua data point name.
The embedded gateway middleware comprises four modules: the device comprises a mapping relation downloader, a Modbus message checker, a Modbus communication module and an OPCUA address space generator.
And a TCP connection is established between the mapping relation downloader and a mapping relation generator in the upper management system, and a signal given by the mapping relation generator is monitored in real time. And after the user configures and generates the address mapping table in the upper management system, the mapping relation downloader automatically downloads the address mapping table to the embedded gateway middleware locally.
The Modbus message checker is responsible for analyzing the address mapping table and automatically generating Modbus communication messages of all the devices according to the data structures in the address mapping table. And then, sending test requests to the Modbus communication messages one by one through the Modbus communication module. When all Modbus test requests have returned data, the test is considered to pass, the user configuration is correct, and the equipment connection is normal; otherwise, the address mapping table is considered as illegal.
The Modbus communication module is responsible for traditional Modbus data acquisition task, supports two kinds of connected modes of Modbus RTU/Modbus TCP. Modbus messages depended on by the work are automatically generated by the Modbus checker through an address mapping table downloaded by the analysis mapping relation downloader.
The OPCUA address space generator is an OPCUA server, and reads a local legal address mapping table file of the embedded gateway middleware when the OPCUA address space generator is started or detects configuration update every time, and dynamically generates the OPCUA address space according to a data structure in the address mapping table file.
As shown in fig. 3, the OPCUA address space generation policy is characterized by grouping devices (net-port or serial devices) according to the device type field in the Modbus address mapping table shown in fig. 2. Further, grouping the equipment data points according to the Modbus message function codes: mapping data points in the 02 or 04 function code message to an input register group; 03. mapping data points in the 06 or 10 functional code message to a holding register group; 01. the 05 or 0f function can be code mapped to a bank of switch registers. Further, instantiating a data point node in the OPCUA address space, first map the packet header fields (e.g., connection type, device set, data point set) to the Folder Tpye type OPCUA node. Further, entity fields (such as devices and data points) in the Modbus address mapping table are mapped to OPCUA nodes of Object type. Further, attribute fields (such as serial port baud rate, register address and the like) in the Modbus address mapping table are mapped to the OPCUA node of the Property type and are subordinate to the OPCUA node of the Object type on which the OPCUA node depends.
Thus, complete translation from the Modbus protocol data structure to the OPCUA address space is achieved. The conversion process is based on the analysis and reconstruction of the loaded Modbus address mapping table by an OPCUA server in the embedded gateway, and the process is completely automatic and standardized without any manual intervention.
Specifically, the method for automatically mapping Modbus protocol data to the OPCUA address space provided by the invention comprises the following steps:
step 1, inputting the IP address and the port number of the OPCUA server of the communication gateway in the OPCUA client software, establishing TCP connection with the OPCUA server, reading the OPCUA address space and displaying the OPCUA address space in a display interface of the OPCUA client software.
The mapping relation generator configuration page can be developed by adopting a current mainstream IOT suite such as Kaa and Things Board, and the WEB page of the mapping relation generator configuration page supports a user to configure communication gateway attributes, serial port parameters, equipment lists, equipment attributes, message lists, message attributes, data point lists and data point attributes in a customized manner. The gateway attribute comprises a gateway serial number, an identity check character string and the like; the serial port parameters comprise serial port numbers, serial port baud rates, check bits, data bits and stop bits; the device attributes comprise a device ID, a device type, a device name, an acquisition period, a ModbusTCP communication IP address, a port number and the like; the message attributes comprise a message ID, a Modbus function code, a CRC check bit and the like; data point attributes include the associated OPCUA data point name, data type, data length, register offset address, etc.
And 2, after the user configuration is finished, the mapping relation generator automatically generates an address mapping table file in an XML or JSON format and transmits the address mapping table file to a mapping relation downloader of the embedded gateway middleware through a data channel of the IOT suite.
The embedded gateway middleware internally comprises an OPCUA server, a mapping relation downloader, a Modbus message verifier, a Modbus communication module and an address mapping table cache region.
And 3, after the mapping relation downloader finishes downloading the address mapping table, storing the address mapping table into an address mapping table cache region. The address mapping table cache region can be realized by commonly used databases such as mysql, sqlite and the like, or directly stored in a file form.
And 4, reading the address mapping table by the Modbus message checker, and establishing a Modbus communication message queue according to a data structure in the address mapping table. And calling a Modbus communication module to traverse the queue to execute Modbus test requests one by one, wherein the step is to set appropriate timeout response time and a repeated execution strategy. And after all Modbus test requests are executed and expected response messages are obtained, the legality of the address mapping table and the normal operation of the communication gateway connecting equipment are proved.
And 5, after the validity of the address mapping table is proved, the OPCUA server reads the address mapping table, and automatically generates an OPCUA address space according to the data structure in the address mapping table and the tree diagram strategy provided by the diagram 3, so that the OPCUA client of the upper management software can access and manage the OPCUA address space. As shown in fig. 3, the specific execution process of the OPCUA address space generation policy includes the following steps:
step 501, grouping the devices according to the device Type field in the address mapping table, dividing the devices into a serial device group and a network port device group, and adding a corresponding packet node of the Folder Type in the OPCUA address space in each group.
Step 502, mapping an Object type opuca device node under its corresponding packet node for each device.
Step 503, adding a data point root node of the Folder Type and a device attribute node of the Object Type under the device node.
Step 504, in the device Property node, according to the device data structure in the address mapping table, according to the different groups to which the devices belong, mapping a plurality of Property type single Property nodes. For serial equipment, the single attribute nodes comprise slave station address nodes, serial number nodes, baud rate nodes, stop bit nodes, check bit nodes and data bit nodes of the equipment; for the internet access device, the single attribute nodes comprise an IP address node and a port number node.
Under the data point root node, grouping the data points according to the function code field in the address mapping table, dividing the data points into three groups of input registers, holding registers and switch registers, and mapping a Folder Type register root node respectively.
And step 505, under the root node of the register, mapping a register node of an Object type for each data point according to the OPCUA data point name in the address mapping table, wherein the name of the register node is the data point name of the OPCUA address space associated with the Modbus data point in the address mapping table.
Step 506, under the register node, mapping a plurality of single attribute nodes of Property type and a value node of Object type according to the attribute information of the data point in the address mapping table.
The single attribute nodes include offset address nodes, data type nodes (supported data types include BOOL switching numbers, FLOAT single precision floating points, DOUBLE DOUBLE precision floating points, UNSIGNED INT 32 bit UNSIGNED integers, SIGNED INT 32 bit SIGNED integers, UNSIGNED SHORT 16 bit UNSIGNED integers, SIGNED SHORT 16 bit SIGNED integers, UNSIGNED CHAR 8 bit UNSIGNED integers, SIGNED CHAR 8 bit SIGNED integers), data length nodes.
The value node stores the current value of the register.
The invention designs a method for automatically mapping and converting a Modbus address space to an OPCUA address space. The method aims to solve the problems of narrow application and transmission occasions and poor readability of the Modbus protocol by utilizing the characteristics of cross-platform, long-distance transmission and visualization of the OPCUA protocol; a reliable data integration solution is provided for a collaborative manufacturing system.

Claims (5)

1. A method for automatically mapping Modbus protocol data to an OPCUA address space is characterized in that a register address space of industrial field equipment supporting a Modbus protocol is automatically mapped to the OPCUA protocol address space through an address mapping table by the method, and the method specifically comprises the following steps:
step 1, a user inputs an IP address and a port number of an OPCUA server deployed by embedded gateway middleware in OPCUA client software, and after TCP connection is established with the OPCUA server, an OPCUA address space is read and displayed in a display interface of the OPCUA client software;
step 2, the user inputs the configuration information needed by generating the mapping relation table, wherein the configuration information comprises equipment attribute information, message information and data point information, and the method comprises the following steps:
selecting M industrial field devices needing to be communicated from N industrial field devices, and configuring relevant device attribute information of each industrial field device, wherein the relevant device attribute information comprises a device ID, a device name, a device type and communication port configuration information of the mth industrial field device, and M is 1,2, … and M;
the message information comprises a message ID, a Modbus function code and a CRC check bit;
the data point information comprises a data point ID, a register offset address, a data type, a data length and a corresponding OPCUA data point name, and each Modbus data point is associated with the corresponding OPCUA data point through the corresponding OPCUA data point name;
and 3, automatically generating an address mapping table file based on the configuration information input in the step 2 and then sending the address mapping table file to the embedded gateway middleware, wherein:
the address mapping table file is embedded and organized with a configuration file data structure according to the hierarchical relation from equipment to messages to data points, wherein M pieces of equipment data are provided, each piece of equipment data comprises an equipment ID field, an equipment name field, an equipment type field and a configuration information field, and J pieces of message data are embedded in each piece of equipment data; each message data comprises a message ID field, a Modbus function code field and a CRC check bit field, and each message data is nested with K data point data; each data point data comprises a data point ID field, a register offset address field, a data type field, a data length field and a corresponding OPCUA data point name field;
step 4, after the embedded gateway middleware finishes downloading the address mapping table, storing the address mapping table into an address mapping table cache region;
step 5, a Modbus message checker in the embedded gateway middleware reads an address mapping table in an address mapping table cache region, establishes a Modbus communication message queue according to a data structure in the address mapping table, calls a Modbus communication module to traverse the Modbus communication message queue by the embedded gateway middleware, executes Modbus test requests one by one, and proves the legality of the address mapping table and the normal operation of M pieces of industrial field equipment after all the Modbus test requests are executed and expected response messages are obtained;
step 6, after proving the validity of the address mapping table, the OPCUA server in the embedded gateway middleware reads the address mapping table, and automatically generates an OPCUA address space according to the data structure in the address mapping table for the OPCUA client of the upper management software to access and manage, wherein the specific execution process of the OPCUA address space generation policy comprises the following steps:
601, grouping the devices according to the device Type field in the address mapping table, wherein each group of devices of different types is newly added with a corresponding packet node of a Folder Type in an OPCUA address space;
step 602, mapping an Object type opua device node under its corresponding packet node for each device in each packet;
step 603, adding a data point root node of a Folder Type and a device attribute node of an Object Type under each OPCUA device node;
step 604, in the device attribute node, mapping a plurality of Property type single attribute nodes according to the device data structure in the address mapping table and the difference of the groups to which the devices belong, wherein each single attribute node is used for recording port configuration information of the current device under the current group;
under the data point root node, grouping the data points according to Modbus function code fields in an address mapping table, dividing the data points into three groups of input registers, holding registers and switch registers, and mapping a Folder Type register root node respectively;
step 605, under the register root node, mapping a register node of Object type for each data point according to the corresponding OPCUA data point name in the address mapping table, where the name of the register node is the corresponding OPCUA data point name;
step 606, under the register node, mapping a plurality of single attribute nodes of Property type and a value node of Object type according to the attribute information of the data point in the address mapping table, wherein:
the single attribute node of the Property type comprises an offset address node, a data type node and a data length node;
the value node of the Object type holds the current value of the register with the corresponding opuua data point name.
2. The method according to claim 1, wherein an ethernet communication manner or a 4G communication manner is adopted between the OPCUA client deployed in the upper management system and the OPCUA server deployed in the embedded gateway middleware;
and an RS485 communication mode, an RS232 communication mode, an RS422 communication mode or an Ethernet communication mode is adopted between the embedded gateway middleware and the industrial field device layer.
3. The method for automatically mapping Modbus protocol data to the OPCUA address space according to claim 1, wherein in the step 2, if the mth industrial field device is a serial device, the communication port configuration information includes Modbus slave station address, serial port number, serial baud rate, stop bit, data bit, check bit and collection period;
if the mth industrial field device is the internet access device, the communication port configuration information comprises a device IP address, a port number and an acquisition period;
in step 3, if the mth industrial field device is a serial device, the device type field of the device data corresponding to the mth industrial field device in the address mapping table file is a serial device, and the configuration information field comprises a Modbus slave station address, a serial port number, a serial port baud rate, a stop bit, a data bit, a check bit and an acquisition period;
if the mth industrial field device is the internet access device, the device type field of the device data corresponding to the mth industrial field device in the address mapping table file is the internet access device, and the configuration information field comprises a device IP address, a port number and an acquisition period.
4. The method according to claim 3, wherein in step 604, for a serial device, the single attribute nodes include a slave address node, a serial number node, a baud rate node, a stop bit node, a check bit node, and a data bit node; for the internet access device, the single attribute node comprises an IP address node and a port number node.
5. The method for automatically mapping Modbus protocol data to the opuua address space of claim 1, wherein in step 2, the user inputs the configuration information in a configuration interface of the mapping relation generator;
in step 3, the mapping relation generator automatically generates the address mapping table file in the XML or JSON format, and the address mapping table file is issued to the mapping relation downloader of the embedded gateway middleware through the data channel of the IOT suite.
CN202011253177.4A 2020-11-11 2020-11-11 Method for automatically mapping Modbus protocol data to OPCUA address space Active CN112311808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011253177.4A CN112311808B (en) 2020-11-11 2020-11-11 Method for automatically mapping Modbus protocol data to OPCUA address space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011253177.4A CN112311808B (en) 2020-11-11 2020-11-11 Method for automatically mapping Modbus protocol data to OPCUA address space

Publications (2)

Publication Number Publication Date
CN112311808A true CN112311808A (en) 2021-02-02
CN112311808B CN112311808B (en) 2023-03-21

Family

ID=74325731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011253177.4A Active CN112311808B (en) 2020-11-11 2020-11-11 Method for automatically mapping Modbus protocol data to OPCUA address space

Country Status (1)

Country Link
CN (1) CN112311808B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113114667A (en) * 2021-04-09 2021-07-13 杭州海兴泽科信息技术有限公司 Terminal communication configuration system, method, device and medium
CN113259230A (en) * 2021-05-12 2021-08-13 苏州和欣致远节能科技有限公司 BACnet gateway with multiple Modbus ports and communication method thereof
CN114070732A (en) * 2021-11-17 2022-02-18 远景智能国际私人投资有限公司 Data processing method, device, equipment and medium based on Internet of things
CN114095535A (en) * 2021-11-16 2022-02-25 河钢数字技术股份有限公司 Method for automatically mapping time sequence variable of physical equipment into digital model
CN114201088A (en) * 2021-11-12 2022-03-18 南京航空航天大学 OPCUA protocol conversion method based on online configuration
US11308020B2 (en) * 2019-07-25 2022-04-19 Beckhoff Automation Gmbh Method for data communication between fieldbus devices and a control desk of an automation system, and automation system
CN114710363A (en) * 2022-05-05 2022-07-05 国能锅炉压力容器检验有限公司 OPC protocol communication system and method penetrating physical isolation equipment
CN115086362A (en) * 2022-05-18 2022-09-20 中国科学院沈阳自动化研究所 Intelligent transmission control method of heterogeneous edge equipment under multiple complex modes
CN115174306A (en) * 2022-07-04 2022-10-11 北京广利核系统工程有限公司 Modbus communication memory optimization method, communication method and related device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102354175A (en) * 2011-08-01 2012-02-15 李遇浦 Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor
CN103399528A (en) * 2013-03-06 2013-11-20 中国电力科学研究院 Automatic generation method for Modbus slave-station simulator system
CN104635708A (en) * 2015-02-12 2015-05-20 机械工业仪器仪表综合技术经济研究所 OPC UA (Unified Architecture) data acquisition module based on I-MX287 processor
CN104932364A (en) * 2015-06-03 2015-09-23 太原科技大学 OPC UA conversion apparatus of Modbus communication protocol, and method
CN105530240A (en) * 2015-11-27 2016-04-27 机械工业仪器仪表综合技术经济研究所 Method for automatically mapping multiple industrial protocols to OPC UA address space
CN106302338A (en) * 2015-05-26 2017-01-04 机械工业仪器仪表综合技术经济研究所 A kind of KNX-Modbus Transmission Control Protocol transfer gateway based on Cortex-M processor
US20180338348A1 (en) * 2017-05-22 2018-11-22 Honeywell International Inc. Legacy modbus communication devices
CN109459995A (en) * 2018-12-17 2019-03-12 国家计算机网络与信息安全管理中心 A kind of condition monitoring system and monitoring method towards a variety of industrial ethernet protocols
CN109765866A (en) * 2019-01-25 2019-05-17 北京交通大学 A kind of industrial network system and its data processing method based on OPC UA
CN110309058A (en) * 2019-05-24 2019-10-08 平安银行股份有限公司 Business end test method, device, computer installation and computer storage medium
CN110658752A (en) * 2019-09-16 2020-01-07 北京中能云联科技有限公司 Data acquisition system applied to remote cloud monitoring
CN110995804A (en) * 2019-11-24 2020-04-10 华南理工大学 Industrial heterogeneous network information interaction method based on software definition

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102354175A (en) * 2011-08-01 2012-02-15 李遇浦 Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor
CN103399528A (en) * 2013-03-06 2013-11-20 中国电力科学研究院 Automatic generation method for Modbus slave-station simulator system
CN104635708A (en) * 2015-02-12 2015-05-20 机械工业仪器仪表综合技术经济研究所 OPC UA (Unified Architecture) data acquisition module based on I-MX287 processor
CN106302338A (en) * 2015-05-26 2017-01-04 机械工业仪器仪表综合技术经济研究所 A kind of KNX-Modbus Transmission Control Protocol transfer gateway based on Cortex-M processor
CN104932364A (en) * 2015-06-03 2015-09-23 太原科技大学 OPC UA conversion apparatus of Modbus communication protocol, and method
CN105530240A (en) * 2015-11-27 2016-04-27 机械工业仪器仪表综合技术经济研究所 Method for automatically mapping multiple industrial protocols to OPC UA address space
US20180338348A1 (en) * 2017-05-22 2018-11-22 Honeywell International Inc. Legacy modbus communication devices
CN109459995A (en) * 2018-12-17 2019-03-12 国家计算机网络与信息安全管理中心 A kind of condition monitoring system and monitoring method towards a variety of industrial ethernet protocols
CN109765866A (en) * 2019-01-25 2019-05-17 北京交通大学 A kind of industrial network system and its data processing method based on OPC UA
CN110309058A (en) * 2019-05-24 2019-10-08 平安银行股份有限公司 Business end test method, device, computer installation and computer storage medium
CN110658752A (en) * 2019-09-16 2020-01-07 北京中能云联科技有限公司 Data acquisition system applied to remote cloud monitoring
CN110995804A (en) * 2019-11-24 2020-04-10 华南理工大学 Industrial heterogeneous network information interaction method based on software definition

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11308020B2 (en) * 2019-07-25 2022-04-19 Beckhoff Automation Gmbh Method for data communication between fieldbus devices and a control desk of an automation system, and automation system
CN113114667B (en) * 2021-04-09 2023-06-06 杭州海兴泽科信息技术有限公司 Terminal communication configuration system, method, device and medium
CN113114667A (en) * 2021-04-09 2021-07-13 杭州海兴泽科信息技术有限公司 Terminal communication configuration system, method, device and medium
CN113259230B (en) * 2021-05-12 2022-11-22 苏州和欣致远节能科技有限公司 BACnet gateway with multiple Modbus ports and communication method thereof
CN113259230A (en) * 2021-05-12 2021-08-13 苏州和欣致远节能科技有限公司 BACnet gateway with multiple Modbus ports and communication method thereof
CN114201088A (en) * 2021-11-12 2022-03-18 南京航空航天大学 OPCUA protocol conversion method based on online configuration
CN114095535A (en) * 2021-11-16 2022-02-25 河钢数字技术股份有限公司 Method for automatically mapping time sequence variable of physical equipment into digital model
CN114095535B (en) * 2021-11-16 2024-02-06 河钢数字技术股份有限公司 Method for automatically mapping time sequence variable of physical equipment into digital model
CN114070732A (en) * 2021-11-17 2022-02-18 远景智能国际私人投资有限公司 Data processing method, device, equipment and medium based on Internet of things
CN114070732B (en) * 2021-11-17 2024-01-05 远景智能国际私人投资有限公司 Data processing method, device, equipment and medium based on Internet of things
CN114710363A (en) * 2022-05-05 2022-07-05 国能锅炉压力容器检验有限公司 OPC protocol communication system and method penetrating physical isolation equipment
CN115086362A (en) * 2022-05-18 2022-09-20 中国科学院沈阳自动化研究所 Intelligent transmission control method of heterogeneous edge equipment under multiple complex modes
CN115086362B (en) * 2022-05-18 2023-08-18 中国科学院沈阳自动化研究所 Intelligent transmission control method for heterogeneous edge equipment in multiple complex modes
CN115174306A (en) * 2022-07-04 2022-10-11 北京广利核系统工程有限公司 Modbus communication memory optimization method, communication method and related device
CN115174306B (en) * 2022-07-04 2023-07-25 北京广利核系统工程有限公司 Modbus communication memory optimization method, communication method and related device

Also Published As

Publication number Publication date
CN112311808B (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN112311808B (en) Method for automatically mapping Modbus protocol data to OPCUA address space
CN104932364B (en) The OPC UA conversion equipments and method of a kind of Modbus communications protocol
US8739178B2 (en) Method of configuring intelligent electronic devices to facilitate standardized communication messages among a plurality of IEDS within a network
CN101944770B (en) Communication implementation method of virtual station grade IED mode between primary station and substation in fault information system 61850
CN105530240B (en) Method of a variety of industrial protocols to OPC UA address space automatic mapping
CN106790222B (en) MODBUS/full-interconnection manufacturing network information service adapter and implementation method thereof
CN107454092A (en) A kind of OPCUA and DDS protocol signals conversion equipment, communication system and communication means
CN108847979A (en) A kind of adaptive configuration system and method based on SCADA
CN111556163A (en) Multi-transmission protocol equipment monitoring system based on OPC UA
CN112039197A (en) Automatic mapping method of distribution room topological graph and computer readable storage medium
CN108462587A (en) A kind of network topology treating method and apparatus
CN104683190A (en) Webmaster managed network simulation system and webmaster managed network simulation method
CN111556074A (en) Communication protocol configuration method and device based on OPC UA
CN208401886U (en) Internet of things equipment data management system
CN112862232A (en) Integrated monitoring method and device for power wireless heterogeneous network
CN107071013A (en) A kind of the service response method and service system of intelligent substation access regulation and control main website
CN109150583A (en) A kind of management method and device of northbound interface
KR100808445B1 (en) System for inspecting and managing in remote power volume
CN104750468B (en) A kind of server-side topological data conversion method and conversion equipment
CN114095535A (en) Method for automatically mapping time sequence variable of physical equipment into digital model
CN111711695B (en) Distributed equipment management system based on cloud platform
CN109766090B (en) Integrated configuration method for program logic and secondary circuit
CN117060591A (en) Digital power grid system based on digital twin
CN102811144A (en) NMS topological discovery performance testing system and method
CN116305814A (en) Digital method, platform and system for Internet of things scene

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