Movatterモバイル変換


[0]ホーム

URL:


CN115277867B - Collector and power communication method and system of Modbus protocol equipment based on collector - Google Patents

Collector and power communication method and system of Modbus protocol equipment based on collector
Download PDF

Info

Publication number
CN115277867B
CN115277867BCN202210720438.1ACN202210720438ACN115277867BCN 115277867 BCN115277867 BCN 115277867BCN 202210720438 ACN202210720438 ACN 202210720438ACN 115277867 BCN115277867 BCN 115277867B
Authority
CN
China
Prior art keywords
protocol
modbus
collector
messages
serial port
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.)
Active
Application number
CN202210720438.1A
Other languages
Chinese (zh)
Other versions
CN115277867A (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.)
Qingdao Eastsoft Communication Technology Co Ltd
Original Assignee
Qingdao Eastsoft Communication Technology 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 Qingdao Eastsoft Communication Technology Co LtdfiledCriticalQingdao Eastsoft Communication Technology Co Ltd
Priority to CN202210720438.1ApriorityCriticalpatent/CN115277867B/en
Publication of CN115277867ApublicationCriticalpatent/CN115277867A/en
Application grantedgrantedCritical
Publication of CN115277867BpublicationCriticalpatent/CN115277867B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention belongs to the technical field of power distribution Internet of things, and discloses a collector and a power communication method and system of Modbus protocol equipment based on the collector, wherein the method comprises the following steps: expanding 645 protocol data, and containing serial port baud rate and check bit information of Modbus equipment in a data field of 645 protocol messages through protocol specification; the method comprises the steps that a collector is utilized to receive and analyze 645 protocol messages sent by an upper terminal, and the serial port baud rate and check bits are configured according to serial port configuration information; the collector converts the message protocol type into Modbus, and then sends Modbus messages to Modbus protocol equipment; after receiving the data returned by Modbus protocol equipment, the collector converts the protocol type into 645 type, and organizes 645 messages and sends the 645 messages back to the upper terminal. The invention expands 645 protocol to realize remote communication of Modbus protocol equipment.

Description

Collector and power communication method and system of Modbus protocol equipment based on collector
Technical Field
The invention belongs to the technical field of power distribution Internet of things, and particularly relates to a power communication method of Modbus protocol equipment based on a collector.
Background
Along with the continuous expansion of the application requirements of the power distribution internet of things technology, different equipment adaptation needs to be realized aiming at monitoring of electric quantity, switching value and environment quantity in a platform region, and wide internet of things access is realized.
HPLC is a high-speed power line carrier, also known as a broadband power line carrier, which is a broadband power line carrier technology for progressive data transmission over a voltage power line. The broadband power line carrier communication network uses a power line as a communication medium to realize the convergence, transmission and interaction of the power consumption information of the low-voltage electric user. The broadband power line carrier mainly adopts an Orthogonal Frequency Division Multiplexing (OFDM) technology, and the frequency band is 2MHz-12MHz. Compared with the traditional low-speed narrow-band power line carrier technology, the HPLC technology has the advantages of reaching bandwidth and high transmission rate, and can meet the higher requirements of the low-voltage power line carrier communication.
The 645 protocol was approved by the power industry department of the people's republic of China, 1998, for the communication protocol of multifunctional electric energy meters, beginning at 6 months. The data field transmission adopts the residual 3 coding principle; the method ensures the rapidness and convenience of data transmission in the aspects of data grouping and identification coding, and gives consideration to the expandability of information. The protocol standard is suitable for a point-to-point or one-master-multiple-slave data exchange mode between a rate device of the multifunctional electric energy meter in a local system and a handheld unit (HHU) or other data terminal equipment, physical connection, a communication link and application technical specifications between the rate device and the handheld unit (HHU) or other data terminal equipment are specified, and 645 protocol is the electric energy meter protocol which is most used in China at present.
In the existing and widely applied power line communication protocols at present, the protocol mainly comprises 645 protocol, 698 protocol and 376.2 protocol, and the transmission of Modbus protocol messages on a power line is not supported; in the prior art, the centralized meter reading scheme is that an RS485 electric energy meter is accessed by adopting a type I or type II collector scheme except a carrier module, and the intelligent meter reading system cannot be effectively accessed to an intelligent power distribution system aiming at equipment which does not have an uplink communication function such as a molded case circuit breaker, a micro-break after meter, an intelligent capacitor, a charging pile, various sensors and the like, so that the large data acquisition, application and control of the power equipment are limited, and if the equipment is completely replaced on site, the equipment cost and the construction cost are high, and the operability is not strong.
Therefore, an improvement is needed to be made on the communication method of the power equipment in the prior art so that the communication method can adapt to the communication of various equipment, and the wide internet of things in the field of power communication is realized.
Disclosure of Invention
In order to adapt to the actual demands in the field of power communication, the invention overcomes the defects existing in the prior art, and solves the technical problems that: a collector and a power communication method and system of Modbus protocol equipment based on the collector are provided, so that communication between remote communication and the Internet of things equipment of the Modbus protocol is realized.
In order to solve the technical problems, the invention adopts the following technical scheme: the power communication method of the Modbus protocol equipment based on the collector is realized based on the collector and comprises the following steps:
s1, expanding 645 protocol data, and containing serial port baud rate and check bit information of Modbus equipment in a data field of 645 protocol messages through protocol specification;
S2, a collector is utilized to receive 645 protocol messages sent by an upper terminal, then the 645 protocol messages are analyzed through the collector, serial port configuration information, register address information and Modbus messages in the 645 protocol messages are extracted, and serial port baud rate and check bits are configured according to the serial port configuration information;
s3, after the serial port configuration is completed, the collector converts the message protocol type into Modbus, and then the Modbus message is sent to Modbus protocol equipment;
And S4, after receiving the data returned by the Modbus protocol equipment, the collector converts the protocol type into 645 type, and organizes 645 messages and sends the 645 messages back to the upper terminal.
The collector comprises a message data analysis module, a carrier communication module, a wireless communication module and a 485 communication module.
The extended 645 protocol data format is as follows:
In the extended 645 protocol, the format of the uplink and downlink frame data fields is as follows:
Data contentData formatNumber of bytes
Data identificationBIN4
Register addressBIN4
Serial port controlBIN2
Modbus messageBINL
In the uplink frame and downlink frame data domains, the data bit format of the serial port control data is as follows:
in the step S3, when the Modbus message is sent to the Modbus protocol device, a step of setting a timer is further included.
In the step S4, if no data is acquired after the timeout, the acquirer stops receiving the Modbus message and starts the next cycle.
In the step S2, after receiving the 645 protocol packet sent by the upper terminal, the collector determines whether the packet is related to the Modbus, if so, analyzes the packet, and if not, completes the processing according to the normal service flow.
In addition, the invention also provides a collector for executing the method.
In addition, the invention also provides a Modbus protocol device communication system based on the collector, which comprises Modbus protocol devices, an upper terminal and the collector, wherein 645 protocol data of the upper terminal is expanded protocol data.
Compared with the prior art, the invention has the following beneficial effects:
1. The invention provides a collector and a power communication method and a power communication system of Modbus protocol equipment based on the collector, wherein a complete Modbus protocol message is contained in a data field of the 645 message by expanding 645 protocol, so that an upper terminal such as a concentrator and an intelligent power distribution terminal only needs to organize 645 message according to protocol specification, the message is transmitted to the collector through a power line, and after the collector receives the message, the collector analyzes according to protocol specification to extract the Modbus message, and the collector forwards the Modbus message to 485 and waits for a reply because the collector communicates with the Modbus equipment through 485; after receiving the reply, the received Modbus message is packed into 645 message according to the protocol regulation, and then is sent to the power line to be transmitted to the upper terminal.
2. Because the baud rate and check bits of communication of different Modbus protocol devices are different, most Modbus devices support baud rate configuration, some of the Modbus devices also support communication check bit configuration, and some of the Modbus devices are fixed and dead and cannot be changed. In view of diversity of Modbus equipment and lack of unified standards, the invention adopts a mode that communication parameters are read from top to bottom and the message is provided with configuration parameters, and the baud rate and check bit information are added into the data field of 645 protocol messages, so that the universality of the protocol is improved, and the invention can be applied to various Modbus protocol equipment. When Modbus protocol equipment is replaced, only the upper terminal is required to modify the issued message, and the collector does not need to change the program, so that the program is more stable and efficient.
Drawings
Fig. 1 is a flow chart of a power communication method of a Modbus protocol device based on a collector according to a first embodiment of the present invention;
fig. 2 is a schematic circuit diagram of a collector according to a first embodiment of the present invention;
Fig. 3 is a schematic structural diagram of a communication system of Modbus protocol devices based on a collector according to a third embodiment of the present invention.
Description of the preferred embodiments
In order to make the technical solution and advantages of the present invention more apparent, a technical solution of the present invention will be clearly and completely described below with reference to specific embodiments and drawings, it being apparent that the described embodiments are some but not all embodiments of the present invention; all other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
The embodiment of the invention provides a power communication method of Modbus protocol equipment based on a collector, which is characterized by comprising the following steps of.
S1, expanding 645 protocol data, and including serial port baud rate and check bit information of Modbus equipment in a data field of 645 protocol messages according to protocol rules.
Specifically, in this embodiment, the protocol content is extended to 645 as follows: firstly, adapting the RS485 communication rate to various rates; secondly, the check bit is adapted to odd check, even check and no check; stop bits, data bits are adaptable; specifically, the extended 645 protocol data format is shown in table 1.
Table 1 expanded 645 protocol data format
Control code: 11H, 91H;
data field length: 4-byte data identification+4-byte register address+2-byte serial port control information+Modbus message length L.
Specifically, in this embodiment, the downlink frame data field format is shown in table 2.
Table 2 downstream frame data field format
Data contentData formatNumber of bytes
Data identificationBIN4
Register addressBIN4
Serial port controlBIN2
Modbus messageBINL
Wherein, include four parts:
1. And (3) data identification: 0x04B0FFFF;
2. Register address: and 4 bytes, which is used for storing the register address information of the modbus message sent at the time, because the reply frame of the modbus protocol does not have a register address.
3. Serial port control: 4 bits-baud rate, 2 bits-check, 1 bit-stop bit, 2 bits-data bit, 2 bits-stream control, the remainder reserved. The serial port control data format is shown in table 3.
Table 3 serial port control data format
Baud rate :{300bps(0),600bps(1),1200bps(2),2400bps(3),4800bps(4),7200bps(5),9600bps(6),19200bps(7),38400bps(8),57600bps(9),115200bps(10), adaptation (11),
Check bit: { no parity (0), odd parity (1), even parity (2) },
Data bits: {5 (0),6 (1),7 (2),8 (3) },
Stop bit: {1 (0),2 (1) },
Flow control: { none (0), hardware (1), software (2) }
4. Modbus message: complete Modbus message information
Specifically, in this embodiment, the format of the uplink frame data field is shown in table 4.
Table 2 uplink frame data field format
Wherein, include four parts:
1. And (3) data identification: 0x04B0FFFF;
2. Register address: and 4 bytes, which is used for storing the register address information of the modbus message sent at the time, because the reply frame of the modbus protocol does not have a register address.
3. Serial port control: 4 bits-baud rate, 2 bits-check, 1 bit-stop bit, 2 bits-data bit, 2 bits-stream control, the remainder reserved. The serial port control data format is the same as the downstream frame as shown in table 3.
4. Modbus message: complete Modbus message information.
S2, a collector is utilized to receive 645 protocol messages sent by an upper terminal, then the 645 protocol messages are analyzed through the collector, serial port configuration information, register address information and Modbus messages in the 645 protocol messages are extracted, and serial port baud rate and check bits are configured according to the serial port configuration information.
Specifically, in step S2, after receiving the 645 protocol packet sent by the upper terminal, the collector determines whether the packet is related to Modbus, if so, analyzes the packet, and if not, completes processing according to the normal service flow. The upper terminal can be a power distribution terminal or a concentrator, the collector has a power line carrier communication function, and after the concentrator or the power distribution terminal adds the address file of the collector equipment, the collector can communicate with the upper terminal according to a power line broadband carrier communication protocol. Specifically, the collector is a type II collector.
And S3, after the serial port configuration is completed, the collector converts the message protocol type into Modbus, and then the Modbus message is sent to the device adopting the Modbus protocol.
In the step S3, when the Modbus message is sent to the Modbus protocol device, a step of setting a timer is further included. The timer is set so as to facilitate the timeout processing and the serial port waiting receiving processing.
And S4, after receiving the return data sent by the Modbus protocol equipment, the collector converts the protocol type into 645 type, and organizes 645 messages to be sent back to the upper terminal.
In the step S4, if the return data is not received over time, the collector stops receiving the Modbus message and starts the next cycle.
In this embodiment, the collector checks each received 645 message conforming to the protocol format, monitors whether the data identifier of the 645 message is related to the Modbus protocol, i.e. determines whether the data identifier is 0x04b0ffff. If not, processing according to the normal business flow of the national network secondary mining program; if the communication protocol type is 0x04b0ffff, firstly extracting 645 information about serial port configuration in a message data field, carrying out serial port configuration according to a protocol, then extracting a complete Modbus protocol message in the data field, forwarding the complete Modbus protocol message to a 485 line, changing the communication protocol type into a Modbus protocol type by a program, waiting for a Modbus device to reply, and ending if data conforming to a Modbus protocol format is not received after timeout; if a message conforming to the protocol format is received, the protocol type is changed to be DLT645-07 protocol type, the message is organized to be 645 for replying, and the flow is ended.
Specifically, as shown in fig. 2, in this embodiment, the collector includes a message data parsing module, a carrier communication module, a wireless communication module, and a 485 communication module. The collector can receive the power line message through the carrier interface circuit, and the power line message is a message sent by the upper terminal. Specifically, after the upper terminal, for example, the concentrator or the power distribution terminal adds the device address file of the collector, the collector can communicate with the upper terminal according to the wideband carrier communication protocol of the voltage power line, and receive 645 protocol messages. In addition, the collector can also carry out wireless communication through the wireless module, so that the success rate and the reliability of communication are greatly ensured and improved, after 645 protocol messages conforming to a protocol format are received, a message data analysis module of the collector extracts related serial port configuration information, register address information and Modbus messages and records the related serial port configuration information, serial port baud rate and check bits are configured according to the serial port configuration information, after serial port configuration is completed, the Modbus messages are sent to Internet of things equipment of the Modbus protocol through 485 lines and a timer is started so as to carry out timeout processing and serial port waiting receiving processing, after the Modbus messages conforming to the protocol format are received by the serial ports, frame analysis and check are carried out according to the Modbus protocol format, after the Modbus messages conforming to the protocol format are received, the Modbus messages are organized into 645 protocol messages according to the protocol format and are sent to a power line, and therefore the whole communication flow is completed. Specifically, in this embodiment, the harvester model may be DCZL-PLCM 1667 type harvester.
Example two
An embodiment II of the present invention provides a collector for executing the power communication method described in the embodiment I, and in particular, an application program for implementing the power communication method described in the embodiment I is integrated therein.
Specifically, in this embodiment, a message data analysis module, a carrier communication module, a wireless communication module, and a 485 communication module are disposed in the collector. The message data analysis module can analyze Modbus messages and serial port configuration information contained in 645 protocol messages sent by the upper terminal, and then forwards the Modbus messages to related Modbus protocol devices through the 485 communication module and the wireless communication module according to the serial port configuration information.
Example III
As shown in fig. 3, a third embodiment of the present invention provides a communication system of a Modbus protocol device based on a collector, which includes a Modbus protocol device, an upper terminal, and a collector described in the second embodiment.
In summary, the invention is based on the collector including the carrier communication module and the 485 communication module, and extends the power line carrier communication protocol 645 protocol, so as to provide a communication external interface for the traditional internet of things device, thereby realizing the object connection function of the traditional Modbus protocol device. In view of diversity of Modbus devices and lack of unified standards, the invention adopts a mode that communication parameters are read from top to bottom and the message is provided with configuration parameters, and the baud rate and check bit information are added into the data field of 645 protocol messages, so that the universality of the program is improved.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (7)

CN202210720438.1A2022-06-232022-06-23Collector and power communication method and system of Modbus protocol equipment based on collectorActiveCN115277867B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210720438.1ACN115277867B (en)2022-06-232022-06-23Collector and power communication method and system of Modbus protocol equipment based on collector

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210720438.1ACN115277867B (en)2022-06-232022-06-23Collector and power communication method and system of Modbus protocol equipment based on collector

Publications (2)

Publication NumberPublication Date
CN115277867A CN115277867A (en)2022-11-01
CN115277867Btrue CN115277867B (en)2024-08-06

Family

ID=83761131

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210720438.1AActiveCN115277867B (en)2022-06-232022-06-23Collector and power communication method and system of Modbus protocol equipment based on collector

Country Status (1)

CountryLink
CN (1)CN115277867B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116320062A (en)*2023-04-062023-06-23青岛鼎信通讯股份有限公司 A protocol adaptive method between a photovoltaic protocol converter and a photovoltaic inverter
CN117714564B (en)*2024-02-052024-04-23成都汉度科技有限公司Universal DLT645 protocol analysis method and device based on java language

Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104217567A (en)*2014-09-162014-12-17江苏开放大学Water, electricity and gas multifunctional information collector

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US8069289B2 (en)*2008-07-312011-11-29Ametek, Inc.Modbus register data formatting
CN104950792B (en)*2015-07-012017-09-29重庆邮电大学Mixed networking method and industrial terminal equipment based on modbus agreements
CN105959288A (en)*2016-05-272016-09-21姹や寒Network protocol conversion method for power grid system and intercommunication method of power grid system
CN209963402U (en)*2019-07-092020-01-17四川零点自动化系统有限公司DL/T645-Modbus protocol conversion device based on embedded technology
CN111586027A (en)*2020-04-302020-08-25浙江省机电设计研究院有限公司Multi-protocol-adaptive Internet of things terminal and protocol self-adaption method thereof
CN114205193B (en)*2022-01-112024-10-08沈阳麦克奥迪能源科技有限公司Energy efficiency internet of things gateway for remote debugging configuration

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104217567A (en)*2014-09-162014-12-17江苏开放大学Water, electricity and gas multifunctional information collector

Also Published As

Publication numberPublication date
CN115277867A (en)2022-11-01

Similar Documents

PublicationPublication DateTitle
CN115277867B (en)Collector and power communication method and system of Modbus protocol equipment based on collector
EP2579227A1 (en)Data acquisition concentrator and data acquisition method
CN110474756B (en) A method for collecting electricity consumption information of smart grid
CN107204110A (en)A kind of method of the quick copy reading of meter data based on broadband network
CN106452506A (en)Method for one-off collection of a plurality of data items
CN104079488A (en)Ethernet two-layer head compression based transmission device and method
CN109495135A (en)A kind of debugging system and method based on power line carrier communication
CN100484257C (en)Method and device for arranging data
CN109525370B (en)Data packet sending method based on zigbee
CN107517210B (en) A wireless communication device for distribution network with adaptive conversion of multi-interface protocols
CN115190378A (en) A Data Acquisition Terminal Based on WI-SUN Communication
CN106781415A (en)A kind of automatic method and system for safeguarding centralized automatic meter-reading collector messaging parameter
CN103581228A (en)Method and system for device communication in Internet of Things
CN101566661A (en)Electricity quality online monitoring system based on transparent transmission technology
CN113437997B (en)Power line carrier communication method, device, equipment and medium
CN221380961U (en)Integrated double-circuit net gape and data gateway of Lora
CN101592740A (en)The Beidou satellite automatic sending system of weather data
CN117749900A (en)Photovoltaic equipment communication protocol self-adaption method
CN114157325B (en)Multi-head end communication conversion tail end device and system based on HPLC carrier network
CN216291294U (en)Single-pair Ethernet power information acquisition card supporting 5G communication
CN102081383B (en)Device and method for secure network protocol for field control
CN205247603U (en)Solve communication extension terminal of power consumption information collection system up channel blind area
CN212034143U (en) Multi-terminal data transmission device based on MQTT protocol and wireless communication technology
CN111953733A (en) A power distribution IoT system based on MQTT protocol
CN207283600U (en)A kind of cloud terminal device for being used for industrial Internet of Things

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp