CN102932222B - Support the communication converter of many main websites of RS485&Modbus data acquisition - Google Patents
Support the communication converter of many main websites of RS485&Modbus data acquisition Download PDFInfo
- Publication number
- CN102932222B CN102932222B CN201210387472.8A CN201210387472A CN102932222B CN 102932222 B CN102932222 B CN 102932222B CN 201210387472 A CN201210387472 A CN 201210387472A CN 102932222 B CN102932222 B CN 102932222B
- Authority
- CN
- China
- Prior art keywords
- modbus
- module
- data
- interface
- slave station
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
A kind of communication converter of supporting the data acquisition of many main websites of RS485 & Modbus, it comprises: ARM microprocessor, power supply/reset circuit, reserve link, UI circuit, SDRAM, NORFLASH, the one RS485 & Modbus interface, the 2nd RS485 & Modbus interface and the 3rd RS485 & Modbus interface, the signal output part of described power supply/reset circuit is connected with the signal input part of ARM microprocessor, the described signal output part of ARM microprocessor and the signal input part of reserve link are connected, ARM microprocessor also with UI circuit, SDRAM, NORFLASH, the one RS485 & Modbus interface, the 2nd RS485 & Modbus interface is connected with the 3rd RS485 & Modbus interface. this converter is taking ARM microprocessor as core, coordinates peripheral hardware interface circuit, realized 2 main website equipment and gathered the data in RS485 & Modbus bus simultaneously, thereby ensured that the data that each main website gathers are original, true.
Description
Technical field
The present invention relates to industrial field bus communication technical field, realized the communication converter of many main websites of a kind of RS485&Modbus of support data acquisition.
Background technology
Modbus serial protocol is proposed in 1979 by Modicon company at first, be the whole world first really for the bus protocol of industry spot, be one of most popular universal industrial standard agreement in the industrial circle whole world now.
Modbus serial communication is used MS master-slave technology, in a RS485&Modbus bus, only allow to exist between a home site and multiple slave site to carry out digital communication, this MS master-slave communication protocol of Modbus has determined can only exist at any time a main website to carry out data acquisition.
In industrial processes control or data collecting system, as different DCS systems, PLC system etc., multiple home sites need while situation of image data a RS485&Modbus bus a lot, addressing this is that general way is at present to allow a website as home site, after its image data, then send to other website through communication. But this method can not avoid data in adapter ring festival-gathering by people for distorting, cannot ensure primitiveness and the authenticity of data, be difficult to the application of data primitiveness and the exigent occasion of authenticity (as customs supervision). Thereby develop the communication converter that can realize the data acquisition of many main websites of RS485&Modbus, there is high using value.
Summary of the invention
The one RS485&Modbus of many main websites data acquisition equipment provided by the invention, it can be realized multiple main websites and gather the data in RS485&Modbus bus simultaneously, adopts general hardware interface circuit, have real-time, use the features such as flexible.
For achieving the above object, a kind of communication converter of supporting the data acquisition of many main websites of RS485&Modbus provided by the invention, it comprises: ARM microprocessor, power supply/reset circuit, reserve link, UI circuit, SDRAM, NORFLASH, the one RS485&Modbus interface, the 2nd RS485&Modbus interface and the 3rd RS485&Modbus interface, the signal output part of described power supply/reset circuit is connected with the signal input part of ARM microprocessor, the signal output part of ARM microprocessor is connected with the signal input part of reserve link, ARM microprocessor also with UI circuit, SDRAM, NORFLASH, the one RS485&Modbus interface, the 2nd RS485&Modbus interface is connected with the 3rd RS485&Modbus interface, wherein a RS485&Modbus interface is respectively used to be connected with two main websites with the 2nd RS485&Modbus interface, the 3rd RS485&Modbus interface is connected with field instrument bus, described ARM microprocessor comprises: profile module, slave station A module, slave station B module, image data module, acquisition management module, Modbus protocol stack module and master station module, described slave station A module is connected with the 2nd RS485&Modbus interface with a RS485&Modbus interface respectively with slave station B module, from corresponding main website acquisition signal, and this command signal is issued to acquisition management module, command signal is issued to master station module by acquisition management module, master station module is issued to each instrument by the command signal collecting by the 3rd RS485&Modbus interface, and read corresponding request data from instrument, instrumented data returns to image data module by acquisition management module, the instrumented data returning is write corresponding slave station data field by image data module.
Support a communication converter for many main websites of RS485&Modbus data acquisition, it is that the multiple main websites that realize as follows gather the data in RS485&Modbus bus simultaneously:
A, device power, power supply/reset circuit provides the required each road of equipment work power supply, and institute's solidification software code in operation NORFLASH, resets and operational system;
After B, the normal operation of system, by computer, equipment is carried out to basic parameter configuration;
After C, configuration successful, slave station modules A and slave station module B are by constantly reading its corresponding RS485&Modbus interface data, and whether detect corresponding main website has order to issue;
If detecting the A of main website or the B of main website, D has data distributing, by after this data receiver, deposit in SDRAM, call Modbus parsing module, according to " the industrial automation network standard of GBZ19582.2-2004 based on Modbus agreement ", these data are resolved, if these data are legal Modbus order, this instruction are forwarded to acquisition management module, and wait for this command response frame; If detect, the A of main website and B have data distributing simultaneously, decide according to the priority of system setting the sequencing reading;
E, acquisition management module issue Modbus order by slave station modules A and slave station module B and are forwarded to master station module, and wait for that master station module returns to this command response frame;
The Modbus order of obtaining from acquisition management module is issued to instrument by F, master station module, wait for after instrument response, read the response frame of this Modbus order from instrument, to after this response frame verification succeeds, this Modbus command response frame is sent to acquisition management module according to " the industrial automation network standard of GBZ19582.2-2004 based on Modbus agreement " defined method of calibration;
Read Modbus command response frame is sent the so far corresponding slave station module of frame by G, acquisition management module;
Whether H, slave station modules A and slave station module B are sent to separately corresponding Modbus main website by Modbus by response frame, and continue to detect corresponding main website and have order to issue, and return to step D.
Described reserve link comprises supervisory circuit and relay, the signal input part of described supervisory circuit is connected with the signal output part of ARM microprocessor, the signal output part of supervisory circuit is connected with the coil a of relay, the normally opened contact b of relay is connected with the 3rd RS485&Modbus interface with ARM microprocessor respectively, the normally-closed contact c of relay is connected with a RS485&Modbus interface and the 3rd RS485&Modbus interface respectively, in the time of system exception, the output of ARM microprocessor no signal, coil a power-off, normally opened contact b disconnects, normally-closed contact c closure, field instrument bus is directly connected with the A of main website, ensure the normal collection of data.
On described UI circuit, be provided with indicator lamp, after system configuration success, UI circuit is notified user configuration successful by this indicator lamp.
What described ARM microprocessor adopted is AT91RM9200 chip.
ARM microprocessor is responsible for supervision and the control of whole communication converter;
Power supply/reset circuit provides power supply and reseting logic for communication converter, and wherein reset circuit is realized external reset function in the time that converter system collapses;
Reserve link is in the time of communication converter fault, two lines of the RS485&Modbus interface that directly handle is communicated by letter with instrument, by a pair of normally-closed contact of auxiliary reclay, automatically switch in the bus with the RS485&Modbus interface of main website devices communicating, interim emergency communication measure is provided;
Various duties when UI circuit is the operation of user's prompt facility;
SDRAM moves memory headroom is provided for system;
NORFLASH is as external memory storage, for system is solidified code, power down save data provides memory space;
The one RS485&Modbus interface and the 2nd RS485&Modbus interface are responsible for and Liang Ge main website devices communicating, and the 3rd RS485&Modbus interface is responsible for communicating by letter with far distance instrument;
Profile module is for configuration device file, and configuration file comprises instrumentation tap parameter, main mouthful of parameter of converter, and converter is from mouth parameter etc., and configuration file is burnt in NORFLASH and preserves;
The data that image data module stores master station module gathers;
The Modbus acquisition that acquisition management module management slave station A module and slave station B module issue, and the data of management main website collection, upgrade the data in image data module;
Modbus protocol stack module is resolved the communications protocol of Modbus master station module and slave station A module and slave station B module;
What master station module was taked is the command area of thread continuous poll slave station A and slave station B; If discovery exists effective order in command area, this order is issued to Modbus bus; Reading after correct instrumented data, the data of returning to instrument are write to the data field of corresponding slave station.
The method that the present invention utilizes hardware circuit and software circuit to combine realizes the RS485&Modbus data acquisition of Liao Duo main website, and particularly, the present invention has following beneficial effect:
1. realize the function that Liao Liangge Modbus main website gathers the data in RS485&Modbus bus simultaneously, ensured primitiveness and the authenticity of each website image data, prevent data in intermediate link by people for distorting.
2. realized in communication converter faults itself situation, realized the function that automatically switches to main website by reserve link.
Brief description of the drawings
Fig. 1 is the structural representation of supporting the communication converter application system of many main websites of RS485&Modbus data acquisition.
Fig. 2 is the modular structure figure that supports many main websites of RS485&Modbus data acquisition communication converter.
Fig. 3 is the structural representation of supporting the reserve link of many main websites of RS485&Modbus data acquisition communication converter.
Fig. 4 is the workflow diagram of supporting many main websites of RS485&Modbus data acquisition communication converter.
Detailed description of the invention
Below in conjunction with instantiation and accompanying drawing, the present invention is described in detail, and in the present embodiment, ARM microprocessor adopts AT91RM9200, SDRAM to adopt K4S561632C, NORFLASH to adopt 28F128J3A.
As Fig. 1, shown in 2, a kind of communication converter of supporting the data acquisition of many main websites of RS485&Modbus, it comprises: ARM microprocessor, power supply/reset circuit, reserve link, UI circuit, SDRAM, NORFLASH, the one RS485&Modbus interface, the 2nd RS485&Modbus interface and the 3rd RS485&Modbus interface, the signal output part of described power supply/reset circuit is connected with the signal input part of ARM microprocessor, the signal output part of ARM microprocessor is connected with the signal input part of reserve link, ARM microprocessor also with UI circuit, SDRAM, NORFLASH, the one RS485&Modbus interface, the 2nd RS485&Modbus interface is connected with the 3rd RS485&Modbus interface, wherein a RS485&Modbus interface is respectively used to be connected with two main websites with the 2nd RS485&Modbus interface, the 3rd RS485&Modbus interface is connected with field instrument bus, and described ARM microprocessor comprises: profile module, slave station A module, slave station B module, image data module, acquisition management module, Modbus protocol stack module and master station module, described slave station A module is connected with the 2nd RS485&Modbus interface with a RS485&Modbus interface respectively with slave station B module, from corresponding main website acquisition signal, and this command signal is issued to acquisition management module, command signal is issued to master station module by acquisition management module, master station module is issued to each instrument by the command signal collecting by the 3rd RS485&Modbus interface, and read corresponding request data from instrument, instrumented data returns to image data module by acquisition management module, and the instrumented data returning is write corresponding slave station data field by image data module.
In the present embodiment using Distributed Control System (DCS) as the A of main website, Programmable Logic Controller (PLC) as the B of main website simultaneously from field instrument image data, instrument 1,2 ... N etc. are generally field instrument, as temperature sensor, pressure sensor, liquid level sensor etc.
As shown in Figure 3,4, when after device power, power supply/reset circuit provides the required Ge of the work road power supply whole system that simultaneously resets, institute's solidification software code in operation NORFLASH, operational system for whole equipment. After the normal operation of system, according to DCS, PLC and instrument communication relevant parameter, by man-machine interface, equipment is carried out to basic parameter configuration, initialize the communications parameters such as the baud rate, data bit, check bit, position of rest of three groups of RS485&Modbus buses, after configuration successful, UI circuit is notified user configuration successful by indicator lamp.
Slave station modules A in the Modbus of configuration successful Hou Duo main website data acquisition communication converter and slave station module B, whether by constantly reading its corresponding RS485&Modbus interface data, detecting corresponding main website has order to issue; If detect, the A of main website has data distributing, by after this data receiver, deposit in SDRAM, call Modbus parsing module, according to " the industrial automation network standard of GBZ19582.2-2004 based on Modbus agreement ", these data are resolved, if these data are legal Modbus order, this instruction are forwarded to acquisition management module, and wait for this command response frame; Acquisition management module issues Modbus order by slave station modules A and slave station module B successively and is forwarded to master station module, and waits for that master station module returns to this command response frame; The Modbus order of obtaining from acquisition management module is issued to instrument by master station module, after waiting for the instrument response time, read the response frame of this Modbus order from instrument, to after this response frame verification succeeds, this Modbus command response frame is sent to acquisition management module according to " the industrial automation network standard of GBZ19582.2-2004 based on Modbus agreement " defined method of calibration; Acquisition management module sends the so far corresponding Modbus order of frame by read Modbus command response frame and issues slave station module; Modbus response frame is sent to Modbus main website equipment (DCS and PCL) separately by slave station modules A and slave station module B, and whether the corresponding main website of continuation detection has data distributing.
Reserve link comprises supervisory circuit and relay, the signal input part of described supervisory circuit is connected with the signal output part of ARM microprocessor, the signal output part of supervisory circuit is connected with the coil a of relay, the normally opened contact b of relay is connected with the 3rd RS485&Modbus interface with ARM microprocessor respectively, and the normally-closed contact c of relay is connected with a RS485&Modbus interface and the 3rd RS485&Modbus interface respectively. In the time that system is normally worked, the normally opened contact b of the relay in stand-by circuit is in closure state, and normally-closed contact c is in off-state; In the time that system works is abnormal, supervisory circuit in reserve link does not receive the signal from ARM microprocessor, coil a power-off, the normally opened contact b of relay disconnects, normally-closed contact c closure, the A of main website is directly connected with field instrument bus, and the corresponding DCS equipment of the guarantee A of main website is normally worked, and realizes the normal collection of data.
Claims (4)
1. support the communication converter of many main websites of RS485&Modbus data acquisition, it is characterized in that, it comprises: ARM microprocessor (1), power supply/reset circuit (2), reserve link (3), UI circuit (4), SDRAM, NORFLASH, the one RS485&Modbus interface (71), the 2nd RS485&Modbus interface (72) and the 3rd RS485&Modbus interface (73), the signal output part of described power supply/reset circuit (2) is connected with the signal input part of ARM microprocessor (1), the signal output part of ARM microprocessor (1) is connected with the signal input part of reserve link (3), ARM microprocessor (1) also with UI circuit (4), SDRAM, NORFLASH, the one RS485&Modbus interface (71), the 2nd RS485&Modbus interface (72) is connected with the 3rd RS485&Modbus interface (73), wherein a RS485&Modbus interface (71) and the 2nd RS485&Modbus interface (72) are respectively used to the A with main website, the B of main website is connected, the 3rd RS485&Modbus interface (73) is connected with field instrument bus, described ARM microprocessor (1) comprising: profile module, slave station A module, slave station B module, image data module, acquisition management module, Modbus protocol stack module and master station module, described slave station A module is connected with the 2nd RS485&Modbus interface (72) with a RS485&Modbus interface (71) respectively with slave station B module, from the corresponding A of main website, the B of main website acquisition signal, and this command signal is issued to acquisition management module, command signal is issued to master station module by acquisition management module, master station module is issued to each instrument by the command signal collecting by the 3rd RS485&Modbus interface, and read corresponding request data from instrument, instrumented data returns to image data module by acquisition management module, the instrumented data returning is write corresponding slave station data field by image data module, described reserve link (3) comprises supervisory circuit and relay, the signal input part of described supervisory circuit is connected with the signal output part of ARM microprocessor, the signal output part of supervisory circuit is connected with the coil a of relay, the normally opened contact b of relay is connected with the 3rd RS485&Modbus interface (73) with ARM microprocessor respectively, the normally-closed contact c of relay is connected with the 3rd RS485&Modbus interface (73) with a RS485&Modbus interface (71) respectively, in the time of system exception, the output of ARM microprocessor no signal, coil a power-off, normally opened contact b disconnects, normally-closed contact c closure, field instrument bus is directly connected with the A of main website, ensure the normal collection of data.
2. by a method of supporting that the communication converter of many main websites of RS485&Modbus data acquisition carries out data acquisition as claimed in claim 1, it is characterized in that it is that the multiple main websites that realize as follows gather the data in RS485&Modbus bus simultaneously:
A, device power, power supply/reset circuit (2) provides the required each road of equipment work power supply, and institute's solidification software code in operation NORFLASH, resets and operational system;
After B, the normal operation of system, by computer, equipment is carried out to basic parameter configuration;
After C, configuration successful, slave station modules A and slave station module B are by constantly reading its corresponding RS485&Modbus interface data, and whether detect corresponding main website has order to issue;
If detecting the A of main website or the B of main website, D has data distributing, by after this data receiver, deposit in SDRAM, call Modbus parsing module, according to " the industrial automation network standard of GBZ19582.2-2004 based on Modbus agreement ", these data are resolved, if these data are legal Modbus order, this order are forwarded to acquisition management module, and wait for the response frame of this order; If detect, the A of main website and B have data distributing simultaneously, decide according to the priority of system setting the sequencing reading;
E, acquisition management module issue Modbus order by slave station modules A and slave station module B and are forwarded to master station module, and wait for that master station module returns to this command response frame;
The Modbus order of obtaining from acquisition management module is issued to instrument by F, master station module, wait for after instrument response, read the response frame of this Modbus order from instrument, to after this response frame verification succeeds, this Modbus response frame is sent to acquisition management module according to " the industrial automation network standard of GBZ19582.2-2004 based on Modbus agreement " defined method of calibration;
Read Modbus response frame is sent the so far corresponding slave station module of frame by G, acquisition management module;
Whether Modbus response frame is sent to separately corresponding Modbus main website by H, slave station modules A and slave station module B, and continue to detect corresponding main website and have order to issue, and returns to step D.
3. the communication converter of supporting the data acquisition of many main websites of RS485&Modbus according to claim 1, it is characterized in that being provided with indicator lamp on described UI circuit (4), after system configuration success, UI circuit (4) is notified user configuration successful by this indicator lamp.
4. the communication converter of supporting the data acquisition of many main websites of RS485&Modbus according to claim 1, what it is characterized in that described ARM microprocessor (1) employing is AT91RM9200 chip.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210387472.8A CN102932222B (en) | 2012-10-15 | 2012-10-15 | Support the communication converter of many main websites of RS485&Modbus data acquisition |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210387472.8A CN102932222B (en) | 2012-10-15 | 2012-10-15 | Support the communication converter of many main websites of RS485&Modbus data acquisition |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102932222A CN102932222A (en) | 2013-02-13 |
CN102932222B true CN102932222B (en) | 2016-05-04 |
Family
ID=47646929
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210387472.8A Active CN102932222B (en) | 2012-10-15 | 2012-10-15 | Support the communication converter of many main websites of RS485&Modbus data acquisition |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102932222B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105207866B (en) * | 2015-10-26 | 2019-03-05 | 珠海格力电器股份有限公司 | Communication means and airconditioning control network based on airconditioning control network-based control terminal |
CN109067630A (en) * | 2018-10-16 | 2018-12-21 | 苏州琅润达检测科技有限公司 | A kind of serial data communication link branch cooperative control device |
CN109309610B (en) * | 2018-11-15 | 2024-04-12 | 威胜能源技术股份有限公司 | Dual-terminal communication circuit and communication method thereof |
CN110502467B (en) * | 2019-07-25 | 2020-11-10 | 江苏诺蓝翌新能源科技有限公司 | Universal acquisition interface software system based on serial port modbus communication protocol |
CN111327503B (en) * | 2020-03-10 | 2022-03-01 | 明度智云(浙江)科技有限公司 | MODBUS bus-based multi-master-station token scheduling device, communication method and system |
CN113064723A (en) * | 2021-03-23 | 2021-07-02 | 瀚云科技有限公司 | Storage medium, electronic device, bus resource allocation method and device |
CN114745223A (en) * | 2022-03-22 | 2022-07-12 | 深圳市合广测控技术有限公司 | Multi-slave station management method and device, electronic equipment and storage medium |
CN116566762B (en) * | 2023-07-07 | 2023-10-20 | 武汉亚为电子科技有限公司 | Cascading equipment based on Modbus-RTU protocol and application method thereof |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425948A (en) * | 2008-10-23 | 2009-05-06 | 上海大学 | Industrial wireless network access industrial Ethernet, multi-protocol gateway of field bus and protocol conversion method |
CN102223275A (en) * | 2011-06-24 | 2011-10-19 | 浙江亚卫通科技有限公司 | Long-distance communication bus |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4508732B2 (en) * | 2004-06-11 | 2010-07-21 | 三菱電機株式会社 | Electronic control unit |
-
2012
- 2012-10-15 CN CN201210387472.8A patent/CN102932222B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425948A (en) * | 2008-10-23 | 2009-05-06 | 上海大学 | Industrial wireless network access industrial Ethernet, multi-protocol gateway of field bus and protocol conversion method |
CN102223275A (en) * | 2011-06-24 | 2011-10-19 | 浙江亚卫通科技有限公司 | Long-distance communication bus |
Also Published As
Publication number | Publication date |
---|---|
CN102932222A (en) | 2013-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102932222B (en) | Support the communication converter of many main websites of RS485&Modbus data acquisition | |
CN102692912B (en) | Onsite-level low-cost redundancy measuring and controlling network based on wired and wireless hot spare redundancy communication | |
CN102354175B (en) | Remote I/O (input/output) control system of Modbus fieldbus DI-16-route monitor | |
CN100470976C (en) | Integrated automation converting station debugging apparatus | |
CN202735787U (en) | Electric power information machine room environment real-time monitoring system | |
CN111427319A (en) | Intelligent MCC centralized control system of glass factory and control method thereof | |
CN203522340U (en) | Power consumption load monitoring system | |
CN202995381U (en) | Acquisition and control integrated device for digital transformer substation | |
CN201029023Y (en) | Intelligent switch power source communication protocol converter | |
CN101770214B (en) | System and method for indicating analog quantity limit value in nuclear power plant | |
CN102290864B (en) | Method and device for implementing virtual load management terminal | |
CN202230362U (en) | Industrial control system | |
CN212229020U (en) | Three-phase safety electric meter | |
CN103116321A (en) | Automation intelligent control system based on internet of things | |
CN202838004U (en) | Controller used for ozone generator and ozone generator | |
CN210052032U (en) | Well site sharing intelligent remote terminal control device based on wireless network | |
CN110086261B (en) | Industrial feeder line distribution terminal | |
CN113867247A (en) | Bus type switching value acquisition system and method | |
CN112700631A (en) | Low-power consumption remote measuring terminal system with Bluetooth debugging function and remote debugging method | |
CN202548615U (en) | Integrated monitoring system for hospital logistics | |
CN202444328U (en) | Intelligent monitoring device of direct-current power supply equipment | |
CN211628056U (en) | Multi-channel bus instrument | |
CN213844344U (en) | Low-power consumption telemetering terminal system with bluetooth debugging function | |
CN202694117U (en) | Embedded type remote measurement and control device | |
CN217213496U (en) | Data processing system applied to PLC equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |