CN114070667A - Method for calling data of Modbus protocol equipment - Google Patents

Method for calling data of Modbus protocol equipment Download PDF

Info

Publication number
CN114070667A
CN114070667A CN202111352807.8A CN202111352807A CN114070667A CN 114070667 A CN114070667 A CN 114070667A CN 202111352807 A CN202111352807 A CN 202111352807A CN 114070667 A CN114070667 A CN 114070667A
Authority
CN
China
Prior art keywords
data
calling
polling
partition
devices
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
CN202111352807.8A
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.)
Zhangjiakou Anzhikewei New Energy Co ltd
Original Assignee
Zhangjiakou Anzhikewei New Energy 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 Zhangjiakou Anzhikewei New Energy Co ltd filed Critical Zhangjiakou Anzhikewei New Energy Co ltd
Priority to CN202111352807.8A priority Critical patent/CN114070667A/en
Publication of CN114070667A publication Critical patent/CN114070667A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • 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/403Bus networks with centralised control, e.g. polling
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a method for calling data of Modbus protocol equipment, which comprises the following steps: under the condition that a plurality of Modbus devices are handled on the same channel, different calling frequencies are managed for each data area of each device, so that the devices with high data updating frequency requirements can be called more quickly, and the devices with low data updating frequency can be called more slowly. The method for calling by adopting Modbus protocol equipment data simultaneously configures the update cycle configuration of calling local partition data to be updated when configuring a data area, and inserts polling data between calling long-cycle data to quickly update the polling data; therefore, bandwidth resources are allocated according to needs, and updating of equipment data in different service periods is met.

Description

Method for calling data of Modbus protocol equipment
Technical Field
The invention particularly relates to a method for calling data of Modbus protocol equipment, and belongs to the technical field of Modbus protocol communication.
Background
Because the Modbus protocol supports traditional RS-232, RS-422, RS-485 and Ethernet devices; in the prior art, various industrial devices such as a PLC, a DCS, an intelligent instrument, a frequency converter and the like use a Modbus protocol as a communication protocol between the industrial devices; through the protocol, control devices produced by different manufacturers can be connected into an industrial network for centralized monitoring; the serial bus is widely applied to a master-slave Modbus protocol due to the limitation of unbalanced transmission characteristics; as shown in fig. 1, the master-slave protocol strictly follows a request response mechanism, and particularly when a master queries data from each slave in a bus, it needs to initiate requests from device node to device node and from register to register; in practical application, the Modbus bus data round training is called, and data instantaneity cannot be guaranteed in a multi-equipment and multi-data scene; as shown in fig. 2, when a plurality of Modbus devices are connected in a hand-in-hand manner on the same channel, the data call policy of the communication manager to each device is a polling call, and when too many devices are connected in a hand-in-hand manner, the time for polling the channel device is prolonged; devices with a relatively high update period under such conditions are subject to physical conditions; the effectiveness of data updating cannot be well met.
Disclosure of Invention
In order to solve the problems, the invention provides a method for calling data of equipment adopting a Modbus protocol, and the data of different calling requirements are met by reasonably distributing bandwidth resources in the same channel.
The invention relates to a method for calling data by adopting Modbus protocol equipment, which comprises the following steps: under the condition that a plurality of Modbus devices are handled on the same channel, different calling frequencies are managed for each data area of each device, so that the devices with high data updating frequency requirements can be called more quickly, and the devices with low data updating frequency can be called more slowly.
Further, the method specifically comprises the following steps:
A. configuring access equipment template information, configuring names, function codes, register addresses, data types, coefficients, partitions and bit information of each point of equipment according to an equipment point table in a specification provided by the access equipment, and finally additionally configuring a partition calling period on a partition;
B. configuring communication link information: reading a link configuration file, and initializing link information including a link number, a baud rate, parity check and a port number;
C. configuring the device template into the communication link: adding the device template configured in the step A and the device address of the corresponding device in the link;
D. regrouping the device configurations in the link by partitions: classifying and sequencing all partitions of all devices in the configured current link according to a calling period, wherein a sequenced list is used as a configuration index of calling data; calling partition data of each device according to the configuration index;
E. calling data and storing the calling data in a database: and analyzing the returned message data obtained by calling each time according to the configuration point table and performing data value storage operation.
Further, the calling period of the step A is configured to be of an integer type of 0-60 minutes in units of minutes.
Further, the cycle configuration of step D is specifically as follows:
when the time is configured to be 0 minute, the system calls the data of the partition in a polling mode, and the data are called fastest in the case; if the configuration is 1 minute, the polling is suspended at every whole minute, and the 1 minute partition data is updated; if the configuration is 2 minutes, starting every two minutes, pausing polling, and after the partition of the 1 minute period is updated, restarting polling the data for one period, pausing polling; starting to update the partition data for a 2 minute period; and so on; and continuing to start polling after completion.
Compared with the prior art, the method for calling by adopting Modbus protocol equipment data configures the update cycle configuration of calling partition data to be updated when a data area is configured, and inserts polling data between calling long cycle data to quickly update the polling data; therefore, bandwidth resources are allocated according to needs, and updating of equipment data in different service periods is met.
Drawings
FIG. 1 is a schematic diagram of Modbus bus data training in the prior art.
FIG. 2 is a schematic diagram of connecting multiple Modbus devices by hand on the same channel in the prior art.
Fig. 3 is a main flow chart of a method for calling data of equipment adopting a Modbus protocol.
Detailed Description
Example 1:
the method for calling the Modbus protocol device data as shown in fig. 3 specifically includes the following steps: under the condition that a plurality of Modbus devices are handled on the same channel, different calling frequencies are managed for each data area of each device, so that the devices with high data updating frequency requirements can be called more quickly, and the devices with low data updating frequency can be called more slowly.
The method specifically comprises the following steps:
A. configuring access equipment template information, configuring names, function codes, register addresses, data types, coefficients, partitions and bit information of each point of equipment according to an equipment point table in a specification provided by the access equipment, and finally additionally configuring a partition calling period on a partition; the call cycle is configured in units of minutes as an integer type from 0 to 60 minutes.
B. Configuring communication link information: reading a link configuration file, and initializing link information including a link number, a baud rate, parity check and a port number;
C. configuring the device template into the communication link: adding the device template configured in the step A and the device address of the corresponding device in the link;
D. regrouping the device configurations in the link by partitions: classifying and sequencing all partitions of all devices in the configured current link according to a calling period, wherein a sequenced list is used as a configuration index of calling data; calling partition data of each device according to the configuration index;
E. calling data and storing the calling data in a database: and analyzing the returned message data obtained by calling each time according to the configuration point table and performing data value storage operation.
The cycle configuration of step D is specifically as follows: when the time is configured to be 0 minute, the system calls the data of the partition in a polling mode, and the data are called fastest in the case; if the configuration is 1 minute, the polling is suspended at every whole minute, and the 1 minute partition data is updated; if the configuration is 2 minutes, starting every two minutes, pausing polling, and after the partition of the 1 minute period is updated, restarting polling the data for one period, pausing polling; starting to update the partition data for a 2 minute period; and so on; and continuing to start polling after completion.
Example 2:
by adopting the data calling method, 5 slow devices and 5 fast devices, 10 slow devices and 10 fast devices, 5 slow devices and 10 fast devices, 10 slow devices and 5 fast devices are respectively used for testing on one link of a communication manager with the same model, and the result shows that the data updating period of each device is stable on the set updating period; the calling speed of the fast equipment is obviously improved, the calling speed of the slow equipment is limited, the period control is effective, and the service requirement is met.
The above-described embodiments are merely preferred embodiments of the present invention, and all equivalent changes or modifications of the structures, features and principles described in the claims of the present invention are included in the scope of the present invention.

Claims (4)

1. A method for calling data of Modbus protocol equipment is characterized by comprising the following steps: under the condition that a plurality of Modbus devices are handled on the same channel, different calling frequencies are managed for each data area of each device, so that the devices with high data updating frequency requirements can be called more quickly, and the devices with low data updating frequency can be called more slowly.
2. The method for calling Modbus protocol equipment data according to claim 1, wherein the method comprises the following steps: the method specifically comprises the following steps:
A. configuring access equipment template information, configuring names, function codes, register addresses, data types, coefficients, partitions and bit information of each point of equipment according to an equipment point table in a specification provided by the access equipment, and finally additionally configuring a partition calling period on a partition;
B. configuring communication link information: reading a link configuration file, and initializing link information including a link number, a baud rate, parity check and a port number;
C. configuring the device template into the communication link: adding the device template configured in the step A and the device address of the corresponding device in the link;
D. regrouping the device configurations in the link by partitions: classifying and sequencing all partitions of all devices in the configured current link according to a calling period, wherein a sequenced list is used as a configuration index of calling data; calling partition data of each device according to the configuration index;
E. calling data and storing the calling data in a database: and analyzing the returned message data obtained by calling each time according to the configuration point table and performing data value storage operation.
3. The method for calling Modbus protocol equipment data according to claim 1, wherein the method comprises the following steps: the calling period of the step A is configured to be of an integer type of 0-60 minutes in units of minutes.
4. The method for calling Modbus protocol device data according to claim 1, wherein the cycle configuration of the step D is as follows:
when the time is configured to be 0 minute, the system calls the data of the partition in a polling mode, and the data are called fastest in the case; if the configuration is 1 minute, the polling is suspended at every whole minute, and the 1 minute partition data is updated; if the configuration is 2 minutes, starting every two minutes, pausing polling, and after the partition of the 1 minute period is updated, restarting polling the data for one period, pausing polling; starting to update the partition data for a 2 minute period; and so on; and continuing to start polling after completion.
CN202111352807.8A 2021-11-16 2021-11-16 Method for calling data of Modbus protocol equipment Pending CN114070667A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111352807.8A CN114070667A (en) 2021-11-16 2021-11-16 Method for calling data of Modbus protocol equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111352807.8A CN114070667A (en) 2021-11-16 2021-11-16 Method for calling data of Modbus protocol equipment

Publications (1)

Publication Number Publication Date
CN114070667A true CN114070667A (en) 2022-02-18

Family

ID=80272667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111352807.8A Pending CN114070667A (en) 2021-11-16 2021-11-16 Method for calling data of Modbus protocol equipment

Country Status (1)

Country Link
CN (1) CN114070667A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7188202B1 (en) * 2003-09-29 2007-03-06 Emc Corporation Techniques for accessing devices through a set of serial buses
WO2012128220A1 (en) * 2011-03-18 2012-09-27 パナソニック株式会社 Monitoring system, monitoring device, program for monitoring device, terminal device, and program for terminal device
CN104158699A (en) * 2014-08-08 2014-11-19 广州新科佳都科技有限公司 Data acquisition method based on priority and segmentation
CN104637265A (en) * 2015-02-06 2015-05-20 宁波永耀信息科技有限公司 Dispatch-automated multilevel integration intelligent watching alarming system
CN106789445A (en) * 2017-02-06 2017-05-31 凌云天博光电科技股份有限公司 The state polling method and system of the network equipment in a kind of CHINA RFTCOM Co Ltd
CN110287135A (en) * 2019-06-14 2019-09-27 北京和利时系统工程有限公司 A kind of bus polling method and device
CN110719332A (en) * 2019-10-17 2020-01-21 北京旷视科技有限公司 Data transmission method, device, system, computer equipment and storage medium
CN111245633A (en) * 2018-11-29 2020-06-05 北京天诚同创电气有限公司 Configuration file of microgrid main equipment and operation method thereof
CN112399425A (en) * 2019-08-16 2021-02-23 武汉所为科技有限公司 Lora communication method and Lora communication system
CN113359557A (en) * 2021-06-11 2021-09-07 北京空间飞行器总体设计部 Method for controlling data acquisition time sequence
CN113438129A (en) * 2021-06-22 2021-09-24 上海哔哩哔哩科技有限公司 Data acquisition method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7188202B1 (en) * 2003-09-29 2007-03-06 Emc Corporation Techniques for accessing devices through a set of serial buses
WO2012128220A1 (en) * 2011-03-18 2012-09-27 パナソニック株式会社 Monitoring system, monitoring device, program for monitoring device, terminal device, and program for terminal device
CN104158699A (en) * 2014-08-08 2014-11-19 广州新科佳都科技有限公司 Data acquisition method based on priority and segmentation
CN104637265A (en) * 2015-02-06 2015-05-20 宁波永耀信息科技有限公司 Dispatch-automated multilevel integration intelligent watching alarming system
CN106789445A (en) * 2017-02-06 2017-05-31 凌云天博光电科技股份有限公司 The state polling method and system of the network equipment in a kind of CHINA RFTCOM Co Ltd
CN111245633A (en) * 2018-11-29 2020-06-05 北京天诚同创电气有限公司 Configuration file of microgrid main equipment and operation method thereof
CN110287135A (en) * 2019-06-14 2019-09-27 北京和利时系统工程有限公司 A kind of bus polling method and device
CN112399425A (en) * 2019-08-16 2021-02-23 武汉所为科技有限公司 Lora communication method and Lora communication system
CN110719332A (en) * 2019-10-17 2020-01-21 北京旷视科技有限公司 Data transmission method, device, system, computer equipment and storage medium
CN113359557A (en) * 2021-06-11 2021-09-07 北京空间飞行器总体设计部 Method for controlling data acquisition time sequence
CN113438129A (en) * 2021-06-22 2021-09-24 上海哔哩哔哩科技有限公司 Data acquisition method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
肖国强等: "网格资源监控中的自适应轮询策略", 《计算机工程》 *

Similar Documents

Publication Publication Date Title
CN112468372B (en) Method and device for detecting equipment state in power line communication network
CN108616402B (en) Management method and system of remote equipment
CN110417870A (en) configuration file management method, device, equipment and storage medium
JPH06309257A (en) System and method for monitoring and maintaining snmp table
CN109656688B (en) Method, system and server for realizing distributed business rules
CN112416969B (en) Parallel task scheduling system in distributed database
CN107835266B (en) Method for automatically allocating addresses to same nodes on communication bus
CN109039764B (en) Network parameter configuration method of distributed storage system
CN104506462A (en) MAC (Media Access Control) address management method and equipment in distributed switch
CN112311628A (en) Network speed measuring method, system, network equipment and storage medium
WO2020249345A1 (en) Method for providing control applications, and configuration controller
CN110474845A (en) Flow entry eliminates method and relevant apparatus
CN115129463A (en) Computing power scheduling method, device, system and storage medium
CN109391548A (en) List item moving method, device and network communicating system
CN110290228B (en) Internet protocol IP address allocation method and device
CN107784009A (en) Data query, data query processing method and processing device
Ammar et al. Dynamic SDN controllers-switches mapping for load balancing and controller failure handling
CN114070667A (en) Method for calling data of Modbus protocol equipment
CN107612753A (en) Processing method, device and the radio reception device of wireless messages
CN114448801B (en) Method for creating real-time channel group, network topology, equipment and storage medium
CN114173396B (en) Method and device for determining terminal networking time, electronic equipment and storage medium
Pu et al. Practical implementation of an OPC UA multi-server aggregation and management architecture for IIoT
CN115118635A (en) Time delay detection method, device, equipment and storage medium
CN109495324B (en) Virtual training communication network construction method and system
CN1330147C (en) Automatic discovering method of resilient packet ring (RPR) equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220218

RJ01 Rejection of invention patent application after publication