CN112887181A - Extensible data acquisition unit of Modbus - Google Patents

Extensible data acquisition unit of Modbus Download PDF

Info

Publication number
CN112887181A
CN112887181A CN202110305773.0A CN202110305773A CN112887181A CN 112887181 A CN112887181 A CN 112887181A CN 202110305773 A CN202110305773 A CN 202110305773A CN 112887181 A CN112887181 A CN 112887181A
Authority
CN
China
Prior art keywords
modbus
data
chip
extensible
data collector
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
CN202110305773.0A
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.)
Guangxi Guogui Electric Co ltd
Shanghai Wanguo Information Technology Co ltd
Original Assignee
Guangxi Guogui Electric Co ltd
Shanghai Wanguo Information 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 Guangxi Guogui Electric Co ltd, Shanghai Wanguo Information Technology Co ltd filed Critical Guangxi Guogui Electric Co ltd
Priority to CN202110305773.0A priority Critical patent/CN112887181A/en
Publication of CN112887181A publication Critical patent/CN112887181A/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • 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/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • 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)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention relates to a Modbus extensible data acquisition unit, which comprises a power circuit module, a switch module, a network module, a main control module and a Modbus port, wherein the switch module is connected with the power circuit module; the main control module comprises a Modbus chip and an MCU chip; the MCU chip comprises a Flash storage function; the switch module and the network module establish a link through an LAN port, and transmit data by establishing a DHCP link; the network module and the MCU chip establish a link through the SPI; the MCU chip is connected with the Modbus chip through an RS 485; the main control module is connected with the Modbus port. The Modbus equipment can be configured independently, the breakdown of a single collector does not influence the whole data acquisition work, the stability and maintainability of the whole system are greatly improved, the workload is reduced, and the debugging cost is saved.

Description

Extensible data acquisition unit of Modbus
Technical Field
The invention belongs to the technical field of electronics, and particularly relates to an extensible data acquisition unit of a Modbus.
Background
In the middle of Modbus data acquisition's the application, the data acquisition mode that generally takes at present is for establishing ties Modbus to a bus, and the bus is connected with the Modbus switch, and the data acquisition procedure on upper strata realizes the data acquisition of bottom Modbus equipment through the Modbus switch, and the Modbus switch does not handle the original data of the Modbus equipment on bottom usually, and the processing work of data is accomplished by the host computer. The problems faced by this type of acquisition approach are:
1. different data adaptation processing needs to be carried out in upper computer software for various different Modbus devices on the bottom layer, all work is carried out by the upper computer, the stability of the upper computer is required to be high, and the breakdown of the upper computer can cause the blockage of all data acquisition work.
2. The traditional scheme lacks flexibility, and the Modbus switch usually has a fixed number of interfaces, and once the number of the interfaces of the device is increased after the type selection is determined, the problem of whether the number of the interfaces of the device is enough is faced.
3. Data tracing of bottom layer equipment is not friendly, Modbus adopts a slave machine ID form to respond to Modbus response, and for an upper computer, an upper layer system needs to record Modbus equipment corresponding to interfaces and slave machine numbers to enable data conversion to be normally carried out, and when the bottom layer Modbus equipment is newly added or replaced, debugging time and cost of the system are high.
Disclosure of Invention
The invention aims to provide an extensible Modbus data collector aiming at the defects in the prior art. According to the Modbus system and the Modbus method, the Modbus equipment can be configured independently, the breakdown of a single collector does not affect the whole data acquisition work, the stability and maintainability of the whole system are greatly improved, the workload is reduced, and the debugging cost is saved.
In order to achieve the purpose, the invention adopts the following technical scheme:
a Modbus extensible data collector comprises a power circuit module, a switch module, a network module, a main control module and a Modbus port; the main control module comprises a Modbus chip and an MCU chip; the MCU chip comprises a Flash storage function; the power circuit module provides power for the Modbus extensible data collector; the switch module and the network module establish a link through an LAN port, and transmit data by establishing a DHCP link; the network module and the MCU chip establish a link through the SPI; the MCU chip is connected with the Modbus chip through an RS 485; the main control module is connected with the Modbus port; the switch module is an Ethernet switch chip and is used for receiving data of the network module, and is connected with a switch module of another Modbus extensible data collector through a preset interface to form network interaction of the same level and finally upload the network interaction to the intelligent terminal, and the intelligent terminal locally calculates the data and then forwards the data to the cloud; the network module is an Ethernet chip; the network module and the upper layer terminal establish network connection through a Websocket protocol, and basic configuration information of the Modbus extensible data collector is uploaded into the upper layer terminal in a Websocket connection handshake phase; the MCU chip is a singlechip, and the singlechip transmits signals in a serial port form to the level conversion chip; the MCU chip carries out fragment query division on the read data address according to the basic information of the Modbus extensible data collector and initiates a data reading request to the Modbus equipment at the bottom layer; the Modbus chip is a level conversion chip and converts TTL signals of the serial port into 485 signals with strong anti-interference capability.
Further, the acquired Modbus device configuration information is stored in the MCU chip in a structural body form, and the stored structural body content is as follows: the name of the acquisition item, the Modbus register number required to be read by the acquisition item, the data type required to be converted after acquisition, the function code of acquisition operation, the data conversion parameter, the names of other acquisition items required to be multiplied by other acquisition items after acquisition and the data threshold range.
Further, the ethernet switching chip employs IP 175G. The IP175G adopts 0.18um technology and 128-PQFP packaging, and has stronger anti-interference capability.
Further, the Ethernet chip adopts W5500. W5500 is a high cost performance ethernet chip, and its unique complete hardware TCPIP protocol stack patent technology has solved the access problem of embedded ethernet, and is simple easy-to-use, safety and stability.
Further, the level conversion chip adopts MAX 232.
The working principle of the Modbus extensible data collector is as follows:
(1) establishing network connection between an Ethernet chip of the Modbus extensible data collector and an intelligent terminal through a Websocket protocol, uploading basic configuration information of the Modbus extensible data collector to the intelligent terminal in a Websocket connection handshake stage, and enabling the intelligent terminal to know the serial number and name information of the Modbus data collector according to the information; the Modbus port is connected with the bottom layer Modbus equipment;
(2) basic configuration information of the Modbus extensible data collector is controlled by the intelligent terminal, and the Ethernet chip transmits the basic configuration information to the single chip microcomputer for storage through serial communication of the SPI;
(3) the single chip microcomputer transmits a serial port type transmission signal to the level conversion chip, the level conversion chip is responsible for converting a TTL (transistor-transistor logic) signal of the serial port into a 485 signal with high anti-interference capability, and the single chip microcomputer firstly carries out fragment query and division on a register address of data stored in Modbus equipment according to basic configuration information content and then initiates a data reading request to the Modbus equipment at the bottom layer;
(4) the method comprises the steps that a Modbus extensible data collector starts to read, collect and initialize, the Modbus extensible data collector conducts slicing operation on Modbus equipment configuration information according to an address bit range to obtain slicing information, the collected Modbus equipment configuration and the slicing information are stored in a single chip microcomputer, initialization operation of the Modbus extensible data collector is completed, and the Modbus extensible data collector enters an uninterrupted equipment data polling collection stage;
(5) after reading the data of the Modbus equipment, automatically converting and organizing the low end of the data into a JSON data format according to basic configuration information, changing the original form of the data in a register value form, and giving data meanings;
(6) the converted JSON data packet is sent through an Ethernet chip, and the Ethernet chip transfers the data to an Ethernet switching chip through a DHCP link;
(7) the Ethernet switch chip receives data transmitted by the Ethernet chip, is connected with the Ethernet switch chip of another Modbus extensible data collector through a preset interface to form same-grade network interaction, and finally uploads the same-grade network interaction to the intelligent terminal, and the intelligent terminal conducts local calculation on the data and forwards the data to the cloud.
The technical scheme of the invention has the following beneficial effects:
after the expandable data collector of Modbus is configured through sending down, can convert the no data meaning's of register data of single Modbus equipment originally into the JSON data packet that has the data meaning, a plurality of Modbus equipment that hang under the expandable data collector of Modbus can independently dispose, thereby realize the data acquisition configuration control that becomes more meticulous of Modbus equipment, share the data conversion operation that originally was carried out by the host computer, and the collapse of the expandable data collector of single Modbus can not influence holistic data acquisition work, the stability and the maintainability of whole system obtain very big promotion. When needing to change bottom Modbus equipment, need not to combine whole system debugging Modbus equipment point position, only need issue Modbus equipment configuration to corresponding extended data collector of Modbus then the MCU chip will be handled voluntarily, simplify the work load of whole system when changing, increasing of processing Modbus equipment, practice thrift the debugging cost.
Drawings
FIG. 1 is a schematic view of the construction of the present invention.
FIG. 2 is a schematic diagram of data transmission connections of a plurality of Modbus extensible data collectors.
Detailed Description
The invention will be further explained with reference to the drawings.
Example 1:
an extended data collector of a Modbus, as shown in FIG. 1 and FIG. 2, includes a power circuit module, a switch module, a network module, a master control module and a Modbus port; the main control module comprises a Modbus chip and an MCU chip; the MCU chip comprises a Flash storage function; the power circuit module provides power for the Modbus extensible data collector; the switch module and the network module establish a link through an LAN port, and transmit data by establishing a DHCP link; the network module and the MCU chip establish a link through the SPI; the MCU chip is connected with the Modbus chip through an RS 485; the main control module is connected with the Modbus port; the switch module is an Ethernet switch chip and is used for receiving data of the network module, and is connected with a switch module of another Modbus extensible data collector through a preset interface to form network interaction of the same level and finally upload the network interaction to the intelligent terminal, and the intelligent terminal locally calculates the data and then forwards the data to the cloud; the network module is an Ethernet chip; the network module and the upper layer terminal establish network connection through a Websocket protocol, and basic configuration information of the Modbus extensible data collector is uploaded into the upper layer terminal in a Websocket connection handshake phase; the MCU chip is a singlechip, and the singlechip transmits signals in a serial port form to the level conversion chip; the MCU chip carries out fragment query division on the read data address according to the basic information of the Modbus extensible data collector and initiates a data reading request to the Modbus equipment at the bottom layer; the Modbus chip is a level conversion chip and converts TTL signals of the serial port into 485 signals with strong anti-interference capability.
Example 2:
the difference between this embodiment and embodiment 1 is only that the acquired Modbus device configuration information is stored in the MCU chip in the form of a structure, and the contents of the stored structure are: the name of the acquisition item, the Modbus register number required to be read by the acquisition item, the data type required to be converted after acquisition, the function code of acquisition operation, the data conversion parameter, the names of other acquisition items required to be multiplied by other acquisition items after acquisition and the data threshold range.
Example 3:
the difference between this embodiment and embodiment 2 is only that the ethernet switch chip employs IP 175G; the Ethernet chip adopts W5500; the level conversion chip adopts MAX 232.
The working method (working principle) of the Modbus extensible data collector of the embodiment is as follows:
(1) establishing network connection between an Ethernet chip of the Modbus extensible data collector and an intelligent terminal through a Websocket protocol, uploading basic configuration information of the Modbus extensible data collector to the intelligent terminal in a Websocket connection handshake stage, and enabling the intelligent terminal to know the serial number and name information of the Modbus data collector according to the information; the Modbus port is connected with the bottom layer Modbus equipment;
(2) basic configuration information of the Modbus extensible data collector is controlled by the intelligent terminal, and the Ethernet chip transmits the basic configuration information to the single chip microcomputer for storage through serial communication of the SPI;
(3) the single chip microcomputer transmits a serial port type transmission signal to the level conversion chip, the level conversion chip is responsible for converting a TTL (transistor-transistor logic) signal of the serial port into a 485 signal with high anti-interference capability, and the single chip microcomputer firstly carries out fragment query and division on a register address of data stored in Modbus equipment according to basic configuration information content and then initiates a data reading request to the Modbus equipment at the bottom layer;
(4) the method comprises the steps that a Modbus extensible data collector starts to read, collect and initialize, the Modbus extensible data collector conducts slicing operation on Modbus equipment configuration information according to an address bit range to obtain slicing information, the collected Modbus equipment configuration and the slicing information are stored in a single chip microcomputer, initialization operation of the Modbus extensible data collector is completed, and the Modbus extensible data collector enters an uninterrupted equipment data polling collection stage;
(5) after reading the data of the Modbus equipment, automatically converting and organizing the low end of the data into a JSON data format according to basic configuration information, changing the original form of the data in a register value form, and giving data meanings;
(6) the converted JSON data packet is sent through an Ethernet chip, and the Ethernet chip transfers the data to an Ethernet switching chip through a DHCP link;
(7) the Ethernet switch chip receives data transmitted by the Ethernet chip, is connected with the Ethernet switch chip of another Modbus extensible data collector through a preset interface to form same-grade network interaction, and finally uploads the same-grade network interaction to the intelligent terminal, and the intelligent terminal conducts local calculation on the data and forwards the data to the cloud.
The above embodiments are only exemplary embodiments of the present invention, and are not intended to limit the present invention, and the scope of the present invention is defined by the claims. Various modifications and equivalents may be made thereto by those skilled in the art within the spirit and scope of the present invention, and such modifications and equivalents should be considered as falling within the scope of the present invention.

Claims (6)

1. The utility model provides a Modbus extensible data collection station which characterized in that: the Modbus interface comprises a power circuit module, a switch module, a network module, a main control module and a Modbus port; the main control module comprises a Modbus chip and an MCU chip; the MCU chip comprises a Flash storage function;
the power circuit module provides power for the Modbus extensible data collector;
the switch module and the network module establish a link through an LAN port, and transmit data by establishing a DHCP link;
the network module and the MCU chip establish a link through the SPI;
the MCU chip is connected with the Modbus chip through an RS 485;
the main control module is connected with the Modbus port;
the switch module is an Ethernet switch chip and is used for receiving data of the network module, and is connected with a switch module of another Modbus extensible data collector through a preset interface to form network interaction of the same level and finally upload the network interaction to the intelligent terminal, and the intelligent terminal locally calculates the data and then forwards the data to the cloud;
the network module is an Ethernet chip; the network module and the upper layer terminal establish network connection through a Websocket protocol, and basic configuration information of the Modbus extensible data collector is uploaded into the upper layer terminal in a Websocket connection handshake phase;
the MCU chip is a singlechip, and the singlechip transmits signals in a serial port form to the level conversion chip; the MCU chip carries out fragment query division on the read data address according to the basic information of the Modbus extensible data collector and initiates a data reading request to the Modbus equipment at the bottom layer;
the Modbus chip is a level conversion chip and converts TTL signals of the serial port into 485 signals with strong anti-interference capability.
2. The Modbus extensible data collector of claim 1, wherein: the acquired Modbus equipment configuration information is stored in the MCU chip in the form of a structural body, and the content of the stored structural body is as follows: the name of the acquisition item, the Modbus register number required to be read by the acquisition item, the data type required to be converted after acquisition, the function code of acquisition operation, the data conversion parameter, the names of other acquisition items required to be multiplied by other acquisition items after acquisition and the data threshold range.
3. The Modbus extensible data collector of claim 1, wherein: the Ethernet switch chip adopts IP 175G.
4. The Modbus extensible data collector of claim 1, wherein: the Ethernet chip adopts W5500.
5. The Modbus extensible data collector of claim 1, wherein: the level conversion chip adopts MAX 232.
6. The working method of the Modbus extensible data collector according to any one of claims 1 to 5, wherein: the method comprises the following steps:
(1) establishing network connection between an Ethernet chip of the Modbus extensible data collector and an intelligent terminal through a Websocket protocol, uploading basic configuration information of the Modbus extensible data collector to the intelligent terminal in a Websocket connection handshake stage, and enabling the intelligent terminal to know the serial number and name information of the Modbus data collector according to the information; the Modbus port is connected with the bottom layer Modbus equipment;
(2) basic configuration information of the Modbus extensible data collector is controlled by the intelligent terminal, and the Ethernet chip transmits the basic configuration information to the single chip microcomputer for storage in a structural form through serial communication of the SPI; the contents of the stored structure are: the name of the acquisition item, the Modbus register number required to be read by the acquisition item, the data type required to be converted after acquisition, the function code of the acquisition operation, the data conversion parameter, the names of other acquisition items required to be multiplied by other acquisition items after acquisition and the data threshold range;
(3) the single chip microcomputer transmits a serial port type transmission signal to the level conversion chip, the level conversion chip is responsible for converting a TTL (transistor-transistor logic) signal of the serial port into a 485 signal with high anti-interference capability, and the single chip microcomputer firstly carries out fragment query and division on a register address of data stored in Modbus equipment according to basic configuration information content and then initiates a data reading request to the Modbus equipment at the bottom layer;
(4) the method comprises the steps that a Modbus extensible data collector starts to read, collect and initialize, the Modbus extensible data collector conducts slicing operation on Modbus equipment configuration information according to an address bit range to obtain slicing information, the collected Modbus equipment configuration and the slicing information are stored in a single chip microcomputer, initialization operation of the Modbus extensible data collector is completed, and the Modbus extensible data collector enters an uninterrupted equipment data polling collection stage;
(5) after reading the data of the Modbus equipment, automatically converting and organizing the low end of the data into a JSON data format according to basic configuration information, changing the original form of the data in a register value form, and giving data meanings;
(6) the converted JSON data packet is sent through an Ethernet chip, and the Ethernet chip transfers the data to an Ethernet switching chip through a DHCP link;
(7) the Ethernet switch chip receives data transmitted by the Ethernet chip, is connected with the Ethernet switch chip of another Modbus extensible data collector through a preset interface to form same-grade network interaction, and finally uploads the same-grade network interaction to the intelligent terminal, and the intelligent terminal conducts local calculation on the data and forwards the data to the cloud.
CN202110305773.0A 2021-03-23 2021-03-23 Extensible data acquisition unit of Modbus Pending CN112887181A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110305773.0A CN112887181A (en) 2021-03-23 2021-03-23 Extensible data acquisition unit of Modbus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110305773.0A CN112887181A (en) 2021-03-23 2021-03-23 Extensible data acquisition unit of Modbus

Publications (1)

Publication Number Publication Date
CN112887181A true CN112887181A (en) 2021-06-01

Family

ID=76041792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110305773.0A Pending CN112887181A (en) 2021-03-23 2021-03-23 Extensible data acquisition unit of Modbus

Country Status (1)

Country Link
CN (1) CN112887181A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168509A (en) * 2021-10-22 2022-03-11 中科苏州微电子产业技术研究院 Expansion control method and system of data acquisition chip

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168509A (en) * 2021-10-22 2022-03-11 中科苏州微电子产业技术研究院 Expansion control method and system of data acquisition chip

Similar Documents

Publication Publication Date Title
CN106131056B (en) Industrial wireless adapter and working method thereof
CN101673107B (en) Multi-path serial communication converter and distributed control system applied by same
CN203827378U (en) Serial server
CN102117537B (en) Meter reading gateway, meter reading system and meter reading method
CN103248526A (en) Communication equipment and method for achieving out-of-band monitoring and management, and master-slave switching method
CN103825883A (en) Multi-protocol conversion equipment based on wireless ZigBee, CAN bus and MODBUS/TCP and realization method thereof
US20230140769A1 (en) REMOTE RECONFIGURATION SYSTEM FOR INTERNET OF THINGS (IoT) INTELLIGENT SENSING TERMINAL
CN103945017A (en) Automatic mapping technique method and converting device based on Modbus-ZigBee protocol link addresses
CN112887181A (en) Extensible data acquisition unit of Modbus
CN104064012A (en) Automatic meter reading system
CN214380943U (en) Extensible data acquisition unit of Modbus
CN105353683A (en) MBUS-based multifunctional energy consumption data acquisition controller
CN204856858U (en) Smart electric meter based on it is wireless from network deployment and modbus communication protocol
CN202475477U (en) Transmit-receive automatic switching circuit for converting RS485 interface into serial port
CN105955902A (en) Serial-to-wireless communicator
CN116389610A (en) Data acquisition and edge computing system and method based on information creation environment
CN202918326U (en) Intelligent multi-serial switch
CN205139637U (en) Multi -functional energy consumption data acquisition controller based on MBUS
CN103064810B (en) A kind of method that realizes satellite serial communication
CN209765328U (en) industrial-grade remote IO module based on EtherCAT
CN112187766A (en) Modbus protocol conversion terminal configuration method and Modbus protocol conversion terminal
CN205003511U (en) Integration big dipper industry measurement and control terminal
CN204795120U (en) Split type extensible network message storage device
CN202872768U (en) Radar antenna pointing information forwarding device
CN109802877A (en) A kind of CAN bus based Communication System Design

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