CN115189985A - Modbus multi-master-station data planning and forwarding device - Google Patents

Modbus multi-master-station data planning and forwarding device Download PDF

Info

Publication number
CN115189985A
CN115189985A CN202211015720.6A CN202211015720A CN115189985A CN 115189985 A CN115189985 A CN 115189985A CN 202211015720 A CN202211015720 A CN 202211015720A CN 115189985 A CN115189985 A CN 115189985A
Authority
CN
China
Prior art keywords
communication
master
master station
time
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211015720.6A
Other languages
Chinese (zh)
Other versions
CN115189985B (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.)
Shenyang Institute of Automation of CAS
Original Assignee
Shenyang Institute of Automation of CAS
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 Shenyang Institute of Automation of CAS filed Critical Shenyang Institute of Automation of CAS
Priority to CN202211015720.6A priority Critical patent/CN115189985B/en
Publication of CN115189985A publication Critical patent/CN115189985A/en
Application granted granted Critical
Publication of CN115189985B publication Critical patent/CN115189985B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/16Time-division multiplex systems in which the time allocation to individual channels within a transmission cycle is variable, e.g. to accommodate varying complexity of signals, to vary number of channels transmitted
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

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

Abstract

The invention belongs to the field of modbus multi-master stations, and particularly relates to a data planning and forwarding device for the modbus multi-master stations. The method comprises the following steps: the RS485 communication module is used for accessing the original modbusRTU/ASCII communication link and accessing other master stations into the master station interface; and the controller is used for finding out a communication interval period in each period by monitoring the communication period of the original modbusRTU/ASCII communication link, allowing other added master stations to communicate in the interval period, and realizing the modbusRTU/ASCII multi-master-station communication by time-sharing communication. The invention solves the problem that other equipment is difficult to acquire the data of the slave machine due to the fact that only one host machine is arranged on the modbus, and has obvious use effect.

Description

Modbus multi-master station data planning and forwarding device
Technical Field
The invention belongs to the field of modbus multi-master stations, and particularly relates to a data planning and forwarding device for the modbus multi-master stations.
Background
In the equipment informatization of present production line, often meet PLC or host computer and pass through slave station communication such as Modbus agreement and host computer or instrument and meter as the master station, because Modbus only can have a master station, this just leads to directly obtaining the data in the slave station through the mode of communication, if reform transform the original control system of equipment, not only the cost risk is higher, and required cycle is also longer to influence the production progress. Therefore, a device capable of acquiring slave station data in the bus of the conventional modbusRTU/ASCII protocol through communication is needed, large-scale reconstruction of equipment is not needed, the device is only integrated into an original link, and normal production of the equipment is not affected.
Disclosure of Invention
The invention discloses a device capable of realizing multi-master data planning and forwarding in a modbusRTU/ASCII communication link, which is suitable for equipment data acquisition and informatization, and solves the problem that a modbus of an existing master station is exclusive and cannot acquire data by adding a modbus master station node.
The technical scheme adopted by the invention for realizing the purpose is as follows:
a modbus multi-master station data planning and forwarding device comprises:
the RS485 communication module is used for accessing the original modbusRTU/ASCII communication link and accessing other master stations to the master station interface of the RS485 communication module;
and the controller is used for finding out a communication interval period in each period by monitoring the communication period of the original modbusRTU/ASCII communication link, allowing other added master stations to communicate in the interval period, and realizing the modbusRTU/ASCII multi-master-station communication by time-sharing communication.
The system also comprises an Ethernet communication module which is used for configuring the controller module and interacting the data of the multi-master station communication with the upper computer.
The RS485 communication module is provided with a plurality of master station communication ports and a slave station communication port, wherein one master station communication port and one slave station communication port are accessed into the original modbusRTU/ASCII communication link, and the added master station module is accessed into the communication link through other master station communication ports.
A modbus multi-master station data planning and forwarding method comprises the following steps:
the RS485 communication module is accessed into the original modbusRTU/ASCII communication link, and other master stations are accessed into the master station interface of the RS485 communication module;
the controller finds out a communication interval period in each period by monitoring the communication period of the original modbusRTU/ASCII communication link, allows other added master stations to communicate in the interval period, and realizes the modbusRTU/ASCII multi-master-station communication through time-sharing communication.
The system also comprises an Ethernet communication module for configuring the controller module and interacting the data of the multi-master station communication with the upper computer.
The controller performs the steps of:
selecting a sending command of an original master station as an initial sending command, and simultaneously recording the content and the sending time of the command;
recording the corresponding sending time and the corresponding time of each sending command and each response within the set time;
if no command with the same content as the initial sending command appears within 90 seconds, the link cannot automatically measure the idle communication time, manual designation is changed, and otherwise, the time of the same command is recorded;
subtracting the two moments to obtain a second monitoring period;
monitoring whether the content of the second sending command is the same as that of the first sending command or not in a second monitoring period;
if the contents of the two times are the same, calculating the idle time according to the contents, the communication time and the communication period of the master-slave communication of the original link, otherwise, reselecting the initial command and monitoring again;
and after the idle time is calculated, whether the time interval of the idle time meets the communication requirement of the added master station is calculated, and if so, a new master station is added for communication.
The invention has the following beneficial effects and advantages:
1. the invention solves the problem that other equipment is difficult to acquire the data of the slave machine due to the fact that only one host machine is arranged on the modbus, and has obvious use effect.
2. The method does not affect the communication of the original equipment on the bus, does not change the original bus structure, and has good use reliability.
3. When in use, only the RS485 module needs to be connected in parallel with the original link, and the implementation is simple.
4. The method has low implementation cost and can provide a plurality of interfaces for data communication.
Drawings
FIG. 1 is a schematic diagram of an apparatus for data acquisition of an existing modbusRTU/ASCII communication link;
FIG. 2 is a diagram of an original modbusRTU/ASCII communication link;
FIG. 3 is a schematic diagram of the system accessing an original modbusRTU/ASCII communication link;
fig. 4 is a flowchart of the controller monitoring the original communication link.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
As shown in fig. 1, the apparatus mainly includes: the device comprises a controller (1), an RS485 communication module (2) and an Ethernet communication module (3).
The RS485 communication module (2) is provided with a plurality of master station communication ports and a slave station communication port; one main port and one auxiliary port of the RS485 communication module (2) are connected into an original modbusRTU/ASCII communication link; the added master station module can be accessed into a communication link through other master station interfaces of the RS485 communication module (2); the controller (1) records the time and the communication interval of each communication through the request and response information on the original communication link of the RS485 communication module (2); the controller (1) finds out a communication interval period in each period by monitoring the communication period of the original communication link, allows other added master stations to communicate in the interval period, and realizes modbusRTU/ASCII multi-master station by time-sharing communication; meanwhile, the device can be configured through the Ethernet communication module (3), and data communicated by the multiple master stations is provided outside through the Ethernet communication module (3).
An RS485 communication module (2) of the device is accessed to any position in an original link (4); the original system link is shown in fig. 2.
The added master station module can be accessed to the original link (4) through other master station interfaces of the RS485 communication module (2); the links of the system after joining the present device are shown in fig. 3.
The RS485 communication module (2) is connected with the original communication link through the RS485 interface, is connected with the information sent by the monitoring master station of the master station interface, and is connected with the information sent by the monitoring slave station of the slave station.
After the original link is accessed, in order to ensure the communication of the original link, the information of the original master station and the original slave station needs to be forwarded; the data monitored by the master station interface is forwarded to the slave station interface, and meanwhile, the data of the slave station interface is forwarded to the master station interface, so that the normal work of the original communication link can be guaranteed.
While forwarding the request and reply information, the controller (1) records the time and communication interval of each communication;
the added master station is also accessed into the device through the master station interface, data which is sent to the original link needs to be forwarded to the original slave station interface link through the controller (1), and meanwhile, the information returned to the newly added master station by the original slave station interface needs to be forwarded back to the added master station through the controller (1).
Because a plurality of master stations exist at the same time, the situation that buses are used at the same time when the master stations transmit data and the slave stations return data possibly exists, and bus occupation conflicts are generated. In order to avoid bus occupation conflict, the controller (1) is required to monitor the communication cycle of the original communication link, find out the communication interval period in each original cycle, allow other added master stations to communicate in the interval period, and realize modbusRTU/ASCII multi-master station through time-sharing communication.
As shown in fig. 4, the process of the controller (1) monitoring the original communication link is as follows:
1. optionally selecting a sending command of an original master station as an initial sending command, and simultaneously recording the content and the sending time of the command;
2. then recording the corresponding sending time and the corresponding time of each sending command and each response;
3. if no command with the same content as the initial sending command appears within 90 seconds, the link cannot automatically measure the idle communication time and is manually specified instead;
4. if the command same as the initial sending command appears, recording the moment of the same command;
5. subtracting the two times of time to be used as a monitoring period again;
6. monitoring whether the content of the second time is the same as that of the first time or not in a second monitoring period;
7. if the contents of the two times are the same, the contents, the communication time and the communication period of the master-slave communication of the original link can be judged, and the idle time can be calculated;
8. after the idle time is calculated, whether the time interval of the idle time meets the communication requirement of the additional master station is calculated, and if so, the additional master station can be arranged to communicate;
9. if the contents of the two times are different, the starting command is reselected, and monitoring is carried out again.
Meanwhile, the device can be configured through the Ethernet communication module (3), and data communicated by the multiple master stations is provided outside through the Ethernet communication module (3).

Claims (6)

1. A modbus multi-master station data planning and forwarding device is characterized by comprising:
the RS485 communication module is used for accessing the original modbusRTU/ASCII communication link and accessing other master stations to the master station interface of the RS485 communication module;
and the controller is used for finding out a communication interval period in each period by monitoring the communication period of the original modbusRTU/ASCII communication link, allowing other added master stations to communicate in the interval period, and realizing the modbusRTU/ASCII multi-master-station communication by time-sharing communication.
2. A modbus multi-master station data planning and forwarding apparatus according to claim 1, further comprising an Ethernet communication module for configuring the controller module and interacting data communicated by the multi-master stations with the upper computer.
3. A modbus multi-master-station data planning and forwarding device according to claim 1, wherein the RS485 communication module has a plurality of master station communication ports and a slave station communication port, wherein one master station communication port and the slave station communication port are connected to the original modbusRTU/ASCII communication link, and the added master station module is connected to the communication link through other master station communication ports.
4. A modbus multi-master station data planning and forwarding method is characterized by comprising the following steps:
the RS485 communication module is accessed into the original modbusRTU/ASCII communication link, and other master stations are accessed into the master station interface of the RS485 communication module;
the controller finds out a communication interval period in each period by monitoring the communication period of the original modbusRTU/ASCII communication link, allows other added master stations to communicate in the interval period, and realizes the modbusRTU/ASCII multi-master-station communication through time-sharing communication.
5. A modbus multi-master station data planning and forwarding method according to claim 4, further comprising an Ethernet communication module configuring the controller module and interacting data communicated by the multi-master stations with the upper computer.
6. A modbus multi-master station data planning and forwarding method according to claim 4, wherein said controller performs the steps of:
selecting a sending command of an original master station as an initial sending command, and simultaneously recording the content and the sending time of the command;
recording the corresponding sending time and the corresponding time of each sending command and response within the set time;
if no command with the same content as the initial sending command appears within 90 seconds, the link cannot automatically measure the idle communication time and is manually specified, otherwise, the time of the same command is recorded;
subtracting the two moments to serve as a second monitoring period;
monitoring whether the content of the second sending command is the same as that of the first sending command or not in a second monitoring period;
if the contents of the two times are the same, calculating the idle time according to the contents, the communication time and the communication period of the master-slave communication of the original link, otherwise reselecting the initial command and monitoring again;
and after the idle time is calculated, whether the time interval of the idle time meets the communication requirement of the added master station is calculated, and if so, a new master station is added for communication.
CN202211015720.6A 2022-08-24 2022-08-24 Modbus multi-master-station data planning and forwarding device Active CN115189985B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211015720.6A CN115189985B (en) 2022-08-24 2022-08-24 Modbus multi-master-station data planning and forwarding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211015720.6A CN115189985B (en) 2022-08-24 2022-08-24 Modbus multi-master-station data planning and forwarding device

Publications (2)

Publication Number Publication Date
CN115189985A true CN115189985A (en) 2022-10-14
CN115189985B CN115189985B (en) 2023-09-19

Family

ID=83523094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211015720.6A Active CN115189985B (en) 2022-08-24 2022-08-24 Modbus multi-master-station data planning and forwarding device

Country Status (1)

Country Link
CN (1) CN115189985B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116566762A (en) * 2023-07-07 2023-08-08 武汉亚为电子科技有限公司 Cascading equipment based on Modbus-RTU protocol and application method thereof

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5852405A (en) * 1995-03-17 1998-12-22 Fujitsu Limited Wireless LAN system
CN1457575A (en) * 2001-03-06 2003-11-19 松下电器产业株式会社 Radio LAN system and radio LAN system signal collision evading method
US20110085799A1 (en) * 2009-10-14 2011-04-14 Hitachi, Ltd. Optical communication system and communication bandwidth control method
CN109995632A (en) * 2019-05-16 2019-07-09 阳光电源股份有限公司 Communication means, the apparatus and system of multi-machine communication system
CN111159092A (en) * 2019-12-31 2020-05-15 北京力控华康科技有限公司 Serial port communication system, method and device and electronic equipment
CN212163361U (en) * 2020-07-06 2020-12-15 北京诚益通控制工程科技股份有限公司 Two main station controller communication systems
CN112214441A (en) * 2020-12-08 2021-01-12 北京和利时系统工程有限公司 Communication switching method, equipment and system based on serial bus polling protocol
CN112532496A (en) * 2020-11-30 2021-03-19 西安爱生技术集团公司 CAN bus communication network design method for avoiding conflict
US20220209986A1 (en) * 2019-04-16 2022-06-30 Robert Bosch Gmbh Subscriber station for a serial bus system and method for communicating in a serial bus system
CN114826812A (en) * 2022-02-18 2022-07-29 山东浪潮工业互联网产业股份有限公司 Method and system for realizing RS485 communication multiple master stations

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5852405A (en) * 1995-03-17 1998-12-22 Fujitsu Limited Wireless LAN system
CN1457575A (en) * 2001-03-06 2003-11-19 松下电器产业株式会社 Radio LAN system and radio LAN system signal collision evading method
US20110085799A1 (en) * 2009-10-14 2011-04-14 Hitachi, Ltd. Optical communication system and communication bandwidth control method
US20220209986A1 (en) * 2019-04-16 2022-06-30 Robert Bosch Gmbh Subscriber station for a serial bus system and method for communicating in a serial bus system
CN109995632A (en) * 2019-05-16 2019-07-09 阳光电源股份有限公司 Communication means, the apparatus and system of multi-machine communication system
CN111159092A (en) * 2019-12-31 2020-05-15 北京力控华康科技有限公司 Serial port communication system, method and device and electronic equipment
CN212163361U (en) * 2020-07-06 2020-12-15 北京诚益通控制工程科技股份有限公司 Two main station controller communication systems
CN112532496A (en) * 2020-11-30 2021-03-19 西安爱生技术集团公司 CAN bus communication network design method for avoiding conflict
CN112214441A (en) * 2020-12-08 2021-01-12 北京和利时系统工程有限公司 Communication switching method, equipment and system based on serial bus polling protocol
CN114826812A (en) * 2022-02-18 2022-07-29 山东浪潮工业互联网产业股份有限公司 Method and system for realizing RS485 communication multiple master stations

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
戴尔晗, 赵元正, 王汝传: "基于MODBUS协议的多主站技术", 自动化与仪表, no. 06 *
田华艳等: "基于Modbus RTU协议实现DCS系统主站通讯与从站通讯", 自动化与仪器仪表 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116566762A (en) * 2023-07-07 2023-08-08 武汉亚为电子科技有限公司 Cascading equipment based on Modbus-RTU protocol and application method thereof
CN116566762B (en) * 2023-07-07 2023-10-20 武汉亚为电子科技有限公司 Cascading equipment based on Modbus-RTU protocol and application method thereof

Also Published As

Publication number Publication date
CN115189985B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN102035673B (en) Fiber channel-based general automatic test system
CN107222362A (en) A kind of vehicle CAN network automatic test platform and its optimization method
CN106814657B (en) Embedded real-time EtherCAT main website construction method based on ARM
US10050864B2 (en) Operation mode transition method in network
CN110554943B (en) Multi-node server CMC management system and method based on I3C
CN207115097U (en) A kind of FPGA isomeries accelerator card
CN106603314A (en) Test system and test method for OSEK-based direct network management
WO2022184069A1 (en) Automobile bus fault analysis method, diagnosis device, and bus fault analysis system
CN113406946B (en) Automobile diagnosis method and device and automobile diagnosis equipment
CN115189985A (en) Modbus multi-master-station data planning and forwarding device
WO2022237438A1 (en) Vehicle communication device, wifi connection method and vehicle diagnostic system
CN111865551B (en) Device and method for coordinated management of multistage system based on fast bus
CN108345558B (en) RS485 centralized configuration unit supporting multiple protocols
CN111551376B (en) Data acquisition control unit based on rail transit test bench
CN112398672B (en) Message detection method and device
CN110071987B (en) Gateway address mapping method, gateway and train network system
CN117076216A (en) Channel allocation method and device
CN107395478B (en) Network control system and network communication module for high-speed cigarette packaging equipment
CN204244262U (en) Based on the consistency test device of IEC 61850 configuration file of NI CRIO platform
CN203243346U (en) Command system network tester
CN106981924B (en) method for synchronizing power monitoring information and station-level comprehensive monitoring system
CN115657646A (en) Test method and device of CAN controller
CN103370906B (en) Communication system
CN109388598A (en) A kind of information processing method and general-purpose serial bus USB cluster server
CN106899372A (en) A kind of real-time synchronization method of fuel cell car power performance test system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant