CN212486527U - Slave station conversion device based on MODBUS protocol - Google Patents
Slave station conversion device based on MODBUS protocol Download PDFInfo
- Publication number
- CN212486527U CN212486527U CN202020879016.5U CN202020879016U CN212486527U CN 212486527 U CN212486527 U CN 212486527U CN 202020879016 U CN202020879016 U CN 202020879016U CN 212486527 U CN212486527 U CN 212486527U
- Authority
- CN
- China
- Prior art keywords
- modbus
- slave station
- module
- 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
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
The utility model discloses a slave station conversion equipment based on MODBUS agreement, it includes: network connection in proper order is in proper order from station module, conversion module and main website module, and conversion module maps a plurality of MODBUS slave stations into a new MODBUS slave station, the main website module scans new MODBUS slave station once, can accomplish reading and writing to a plurality of MODBUS slave stations. The utility model discloses a slave station conversion equipment based on MODBUS agreement adopts the network deployment mode to connect a plurality of MODBUS slave stations through the slave station module, map into a new MODBUS slave station with a plurality of MODBUS slave stations through conversion module to scan once through the master station module to new MODBUS slave station and accomplish the reading and writing to a plurality of MODBUS slave stations, thereby effectively simplify the loaded down with trivial details of host computer application, and can promote the communication speed among the traditional MODBUS module bus system to a great extent.
Description
Technical Field
The utility model belongs to the technical field of the MODBUS agreement, concretely relates to slave station conversion equipment based on MODBUS agreement.
Background
The MODBUS protocol is a general language applied to electronic controllers, by which the controllers can communicate with each other, with the controllers communicating with other devices via a network (e.g., ethernet). The MODBUS protocol has become a general industrial standard, and control devices produced by different manufacturers can be connected into an industrial network for centralized monitoring. MODBUS protocol supports traditional RS-232, RS-422, RS-485 and Ethernet devices and many industrial devices, including PLC, DCS, intelligent instruments and the like, all using MODBUS protocol as communication standard between them.
However, when the existing MODBUS master station reads or writes a plurality of MODBUS slave stations, multiple read or write operations are required, the process is complicated, and the communication rate in the MODBUS system is low.
SUMMERY OF THE UTILITY MODEL
In order to solve the problem, the utility model provides a slave station conversion equipment based on MODBUS agreement maps into a new MODBUS slave station with a plurality of MODBUS slave stations through conversion module, and the new MODBUS slave station of once scanning can accomplish the reading and writing to a plurality of MODBUS slave stations to effectively simplify the loaded down with trivial details of host computer application, and can to a great extent promote the communication speed in the traditional MODBUS module bus system.
The utility model adopts the technical proposal that:
the utility model provides a slave station conversion equipment based on MODBUS agreement, it includes slave station module, conversion module and master station module, slave station module, conversion module and master station module network connection in proper order, the inside network deployment mode that adopts a plurality of MODBUS slave stations to connect of slave station module, conversion module maps a plurality of MODBUS slave stations into a new MODBUS slave station, the master station module scans new MODBUS slave station once, can accomplish reading and writing to a plurality of MODBUS slave stations.
Preferably, the conversion module includes MODBUS master station interface unit, MCU unit and MODBUS slave station interface unit that connect gradually, MODBUS master station interface unit connects the slave station module in order to be used for receiving the attribute data of a plurality of MODBUS slave stations, the MCU unit is used for mapping the attribute data of a plurality of MODBUS slave stations that MODBUS master station interface unit received into a new MODBUS slave station data table according to the type, MODBUS slave station interface unit connects the master station module in order to be used for the master station module to read and write the data of new MODBUS slave station data table.
Preferably, the slave station module comprises a plurality of external MODBUS slave stations, and the plurality of external MODBUS slave stations are sequentially connected in a networking mode of serial connection.
Preferably, the attribute data of the MODBUS slave station includes a coil register, a discrete register, an input register and a holding register.
Preferably, the MODBUS master station interface unit supports RS-232, RS-422, RS-485, Ethernet equipment, I2C, SPI and a custom communication interface, and a master station scanning protocol is built in the MODBUS master station interface unit.
Preferably, the MODBUS slave station interface unit supports RS-232, RS-422, RS-485 and Ethernet equipment communication interfaces, and a slave station scanning protocol is built in the MODBUS slave station interface unit.
Preferably, the master station module is arranged inside other external control hosts.
Compared with the prior art, the utility model discloses a slave station conversion equipment based on MODBUS agreement adopts the network deployment mode to connect a plurality of MODBUS slave stations through the slave station module, map into a new MODBUS slave station with a plurality of MODBUS slave stations through conversion module to scan once through the master station module and accomplish the reading and writing to a plurality of MODBUS slave stations to new MODBUS slave station, thereby effectively simplify the loaded down with trivial details of host computer application, and can promote the communication rate among the traditional MODBUS module bus system to a great extent.
Drawings
Fig. 1 is a schematic diagram of an overall structure of a slave station conversion device based on an MODBUS protocol according to embodiment 1 of the present invention;
fig. 2 is a schematic structural diagram of a conversion module of a slave station conversion device based on an MODBUS protocol according to embodiment 1 of the present invention;
fig. 3 is a schematic structural diagram of a slave station module of a slave station conversion apparatus based on an MODBUS protocol according to embodiment 1 of the present invention;
fig. 4 is a flowchart of a control method of a slave station conversion device based on the MODBUS protocol according to embodiment 2 of the present invention.
Description of the reference numerals
1-slave station module, 2-conversion module, 21-MODBUS master station interface unit, 22-MCU unit, 23-MODBUS slave station interface unit and 3-master station module.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example 1
The embodiment 1 of the utility model provides a slave station conversion equipment based on MODBUS agreement, as shown in FIG. 1, it includes slave station module 1, conversion module 2 and main website module 3, slave station module 1, conversion module 2 and main website module 3 network connection in proper order, slave station module 1 is inside to adopt a plurality of MODBUS slave stations networking mode to connect, conversion module 2 maps a plurality of MODBUS slave stations into a new MODBUS slave station, main website module 3 scans new MODBUS slave station once, can accomplish the reading and writing to a plurality of MODBUS slave stations.
Like this, adopt the network deployment mode to connect a plurality of MODBUS slave stations through slave station module 1, map a plurality of MODBUS slave stations into a new MODBUS slave station through conversion module 2 to scan new MODBUS slave station once through master station module 3, can accomplish the reading and writing to a plurality of MODBUS slave stations, thereby effectively simplify the loaded down with trivial details of host computer application, and can to a great extent promote the communication rate in the traditional MODBUS module bus system.
As shown in fig. 2, conversion module 2 includes MODBUS master station interface unit 21, MCU unit 22 and MODBUS slave station interface unit 23 that connect gradually, MODBUS master station interface unit 21 connects slave station module 1 in order to be used for receiving the attribute data of a plurality of MODBUS slaves, MCU unit 22 is used for mapping the attribute data of a plurality of MODBUS slaves that MODBUS master station interface unit 21 received into a new MODBUS slave station data table according to the type, MODBUS slave station interface unit 23 connects master station module 3 in order to be used for master station module 3 to read or write the data of new MODBUS slave station data table.
Like this, connect a plurality of MODBUS slaves stations that adopt the network deployment mode to connect through MODBUS master station interface unit 21, and receive the data of a plurality of MODBUS slaves stations, map the data list of a new MODBUS slave station into with the data of a plurality of MODBUS slaves stations in proper order through MCU unit 22, connect master station module 3 so that master station module 3 reads and writes the data list of new MODBUS slave station through MODBUS slave station interface unit 23, and correspond to read and write the network deployment mode and connect a plurality of MODBUS slave stations.
As shown in fig. 3, the slave station module 1 includes a plurality of external MODBUS slave stations, and the plurality of external MODBUS slave stations are sequentially connected in a networking manner of serial connection.
Therefore, a plurality of MODBUS slave stations (namely MODBUS slave station 1 and MODBUS slave station 2) are sequentially connected in a networking mode of serial communication.
The attribute data of the MODBUS slave station comprises a coil register, a discrete register, an input register and a holding register.
In this way, the numbers of the coil registers, the discrete registers, the input registers and the holding registers in the plurality of MODBUS slave stations are sequentially accumulated to be used as the coil registers, the discrete registers, the input registers and the holding registers of the new MODBUS slave stations after mapping conversion.
The traditional MODBUS slave station equipment is provided with four common attribute elements of a switching value input coil (coil register), a switching value output coil (discrete register), a read-only register (input register) and a read-write register (holding register) in a standard mode; the device is characterized in that the number of MODBUS slave stations is physically connected according to an MODBUS master station interface unit 21; and the number of the switching value input coil, the switching value output coil, the read-only register and the read-write register of each MODBUS slave station enters statistics, and the method comprises the following steps: 1. and accumulating the number of the switching value input coils of all MODBUS slave stations to serve as the number of the converted switching value input coils of the new MOBBUS slave station.
2. And accumulating the number of the switching value output coils of all MODBUS slave stations to serve as the number of the switching value output coils of the converted new MOBBUS slave stations.
3. And accumulating the number of the read-only registers of all MODBUS slave stations to serve as the number of the read-only registers of the converted new MOBBUS slave stations.
4. And accumulating the number of the read-write registers of all MODBUS slave stations to serve as the number of the read-write registers of the converted new MOBBUS slave stations.
Assuming that the number of MODBUS slave stations is 5, the number attributes of a switching value input coil, a switching value output coil, a read-only register and a read-write register of each slave station are as follows:
table 1 slave station element details table
The converted slave component table is then as follows:
table 2 converted details of slave components in the apparatus
When other MODBUS master stations visit this MODBUS slave station, directly obtain data from the component table of the new MODBUS slave station after the mapping conversion, wherein:
the switching value output of the 1-8 addresses corresponds to 8 output coils of an actual MODBUS slave station No. 1;
the switching value output of 9-24 addresses corresponds to 16 output coils of an actual MODBUS No. 2 slave station;
the switching value output of 25-40 addresses corresponds to 16 output coils of an actual MODBUS 3 slave station;
the switching value output of the address of 41-60 corresponds to 20 output coils of an actual slave station of MODBUS No. 4;
the switching value output of the address of 61-92 corresponds to the actual 32 output coils of the slave station of MODBUS 5; and so on for other elements.
MODBUS main website interface unit 21 supports RS-232, RS-422, RS-485, ethernet equipment, I2C, SPI and custom communication interface, MODBUS main website interface unit 21 embeds the main website scanning protocol.
Therefore, a main station scanning protocol is built in the MODBUS main station interface unit 21, and various communication interfaces such as RS-232, RS-422, RS-485, Ethernet equipment, I2C, SPI and custom communication interfaces are supported, so that the device can be suitable for MODBUS slave stations with various different communication interfaces.
The MODBUS slave station interface unit 23 supports RS-232, RS-422, RS-485 and Ethernet equipment communication interfaces, and a slave station scanning protocol is built in the MODBUS slave station interface unit 23.
Therefore, the slave station scanning protocol is built in the MODBUS slave station interface unit 23, and various communication interfaces such as RS-232, RS-422, RS-485, Ethernet equipment and the like are supported, so that the device can be suitable for MODBUS master stations with various different communication interfaces.
The master station module 3 is arranged inside other external control hosts.
In this way, the master station module 3 arranged in other external control hosts issues the MOSBUS command request, the conversion module 2 judges the data information such as the element type, the read/write address and the number of the elements, and the like, and the MOSBUS command request actually corresponding to the MOSBUS slave station is reproduced according to the data information and is sent to the corresponding MOSBUS slave station.
Meanwhile, the MCU unit 22 scans the input elements and updates the new address mapping table in real time, and the master modules 3 of other control hosts only need to read directly, thereby saving the request and response time required for converting the other master modules 3 into serial communication. For the output element, the output element is controlled by the master station module 3 of other control hosts, therefore, except initialization, the device can immediately stop the currently executed slave station scanning task of the MOBBUS only after receiving the control command of the master station module 3 of other control hosts and insert a new command of writing data to the MOBBUS slave station, and the method is executed only when a data writing request exists; the unnecessary scanning time of the device to the slave station of the MOBBUS can be effectively reduced. In addition, to prevent write failures, the output of the circular write is stopped only if a write success returned by the slave station of the MOSBUS is received.
Because a plurality of devices of the slave stations of the MOSBUS adopt serial communication, in order to ensure effective communication, response timeout occurs after each request, and the timeout time must effectively ensure communication but cannot affect every 1-round scanning time (namely, the 1 st element of the 1 st slave station starts to the last 1 element of the last 1 slave station finishes, and under normal communication, 4 × 5 equals to 20 requests and 20 responses in the above example). The device calculates the physically required time consumption and the response delay of the actual slave station according to the element type and the number of each actual slave station and the communication baud rate on the bus; if the bus adopts a baud rate of 9600, 8-bit data bit, 1-bit stop bit and no check bit communication; the time per 1 byte transferred is about: 1000000 (8+1+1)/9600 ≈ 1 MS. And then according to the MODBUS protocol request, calculating the maximum waiting time of the time in real time according to the request message length and the response message length of each communication and the response delay, thereby effectively saving the communication waiting time.
Thus, the utility model discloses a slave station module adopts serial communication mode to connect a plurality of MODBUS slave stations, and send the data of a plurality of MODBUS slave stations to the MODBUS master station interface unit of conversion module through serial communication, the data mapping of a plurality of MODBUS slave stations that conversion module received MODBUS master station interface unit converts a new MODBUS slave station data table into, and be connected with master station module through MODBUS slave station interface unit, thereby realize that master station module 3 once scans new MODBUS slave station data table and can accomplish the reading and writing operation to the data of a plurality of MODBUS slave stations, effectively simplify the loaded down with trivial details of host computer application, and can to a great extent promote the communication rate in the traditional MODBUS module bus system.
Example 2
As shown in fig. 4, embodiment 2 of the present invention provides a method for controlling a slave station switching device based on MODBUS protocol, which specifically includes the following steps:
s1, connecting a plurality of MODBUS slave stations in a networking mode inside the slave station module;
s2, the conversion module maps a plurality of MODBUS slave stations in the slave station module in S1 into a new MODBUS slave station;
and S3, the master station module performs one scanning cycle on the new MODBUS slave station in the conversion module in S2, and the reading or writing of the plurality of MODBUS slave stations can be completed.
In S1, the networking mode is a serial communication connection mode, and the attribute data of the MODBUS slave station includes coil register data, discrete register data, input register data, and holding register data.
Therefore, the circle register data, the discrete register data, the input register data and the holding register data in the plurality of MODBUS slave stations can be sequentially accumulated and overlapped to form a data table, and the master station module 3 can conveniently and quickly access the data table.
In S2, the conversion module maps the multiple MODBUS slaves in S1 into a new MODBUS slave, specifically:
the conversion module sequences the attribute data of the MODBUS slave stations in sequence according to types and maps the attribute data into a new MODBUS slave station data table so that the master station module can read or write conveniently.
Therefore, the master station module can complete the reading or writing operation of the attribute data of a plurality of MODBUS slave stations by scanning a new MODBUS slave station data table at one time, simplifies the scanning time,
the utility model discloses a slave station conversion equipment's control method based on MODBUS agreement, adopt the network deployment mode to connect a plurality of MODBUS slave stations through slave station module inside, a plurality of MODBUS slave stations inside with the slave station module map into a new MODBUS slave station through conversion module, scan once through the new MODBUS slave station of master station module in to the conversion module, can accomplish the reading and writing to a plurality of MODBUS slave stations, effectively simplify loaded down with trivial details that the host computer was used, and can promote the communication rate in the traditional MODBUS module bus system to a great extent.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention should be covered by the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (7)
1. The utility model provides a slave station conversion equipment based on MODBUS agreement, its characterized in that, it includes slave station module (1), conversion module (2) and master station module (3), slave station module (1), conversion module (2) and master station module (3) network connection in proper order, slave station module (1) is inside to adopt a network deployment mode to connect a plurality of MODBUS slave stations, conversion module (2) map a plurality of MODBUS slave stations into a new MODBUS slave station, master station module (3) once scans new MODBUS slave station, can accomplish the reading and writing to a plurality of MODBUS slave stations.
2. The slave station conversion device based on the MODBUS protocol of claim 1, wherein the conversion module (2) comprises an MODBUS master station interface unit (21), an MCU unit (22) and an MODBUS slave station interface unit (23) which are sequentially connected, the MODBUS master station interface unit (21) is connected with the slave station module (1) to receive attribute data of a plurality of MODBUS slave stations, the MCU unit (22) is used for mapping the attribute data of the plurality of MODBUS slave stations received by the MODBUS master station interface unit (21) into a new MODBUS slave station data table according to types, and the MODBUS slave station interface unit (23) is connected with the master station module (3) to read or write data of the new MODBUS slave station data table.
3. The slave station conversion device based on the MODBUS protocol of claim 2, wherein the slave station module (1) comprises a plurality of external MODBUS slave stations, and the plurality of external MODBUS slave stations are sequentially connected in a networking manner of serial connection.
4. The slave station conversion device based on MODBUS protocol of claim 3, wherein the attribute data of MODBUS slave station comprises coil register, discrete register, input register and hold register.
5. The slave station conversion device based on MODBUS protocol of claim 4, wherein the MODBUS master station interface unit (21) supports RS-232, RS-422, RS-485, Ethernet equipment, I2C, SPI and custom communication interfaces, and the MODBUS master station interface unit (21) is internally provided with a master station scanning protocol.
6. The slave station conversion device based on MODBUS protocol of claim 5, wherein the MODBUS slave station interface unit (23) supports RS-232, RS-422, RS-485 and Ethernet device communication interfaces, and the MODBUS slave station interface unit (23) is internally provided with a slave station scanning protocol.
7. A slave station conversion device based on MODBUS protocol according to any of claims 1-6, wherein the master station module (3) is arranged inside the external control host.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202020879016.5U CN212486527U (en) | 2020-05-23 | 2020-05-23 | Slave station conversion device based on MODBUS protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202020879016.5U CN212486527U (en) | 2020-05-23 | 2020-05-23 | Slave station conversion device based on MODBUS protocol |
Publications (1)
Publication Number | Publication Date |
---|---|
CN212486527U true CN212486527U (en) | 2021-02-05 |
Family
ID=74410627
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202020879016.5U Active CN212486527U (en) | 2020-05-23 | 2020-05-23 | Slave station conversion device based on MODBUS protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN212486527U (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111510363A (en) * | 2020-05-23 | 2020-08-07 | 东莞市艾莫迅自动化科技有限公司 | Slave station conversion device based on MODBUS protocol and control method thereof |
CN114567672A (en) * | 2022-03-09 | 2022-05-31 | 深圳市东力科创技术有限公司 | Communication conversion device, method and storage medium |
-
2020
- 2020-05-23 CN CN202020879016.5U patent/CN212486527U/en active Active
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111510363A (en) * | 2020-05-23 | 2020-08-07 | 东莞市艾莫迅自动化科技有限公司 | Slave station conversion device based on MODBUS protocol and control method thereof |
CN114567672A (en) * | 2022-03-09 | 2022-05-31 | 深圳市东力科创技术有限公司 | Communication conversion device, method and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111510363A (en) | Slave station conversion device based on MODBUS protocol and control method thereof | |
US6954806B2 (en) | Data transfer apparatus and method | |
CN101866328B (en) | Automatically accessed serial bus read/write control method | |
CN212486527U (en) | Slave station conversion device based on MODBUS protocol | |
CN101788972A (en) | System and method for transmitting data | |
US5537623A (en) | Multiple group address recognition | |
JPS61212940A (en) | Data transmission method for multi-network system | |
CN110177013A (en) | A kind of EtherCAT master-salve station design and implementation methods based on FPGA | |
US9503309B2 (en) | Ethernet communication system and method based on MMC/SD interface | |
CN214670200U (en) | Conversion module for converting MODBUS TCP into multiple MODBUS slave stations | |
CN101592934A (en) | The communication means of programmable logic controller (PLC) and expansion module | |
CN107562672A (en) | A kind of system and method for improving vector network analyzer message transmission rate | |
CN105677605A (en) | Highly-efficient interconnected system capable of configuring chips and realization system thereof and device | |
CN101304362B (en) | Retransmission buffering apparatus and data transmission method | |
CN112468378B (en) | High-capacity data transmission equipment and method based on CAN bus | |
CN111581136B (en) | DMA controller and implementation method thereof | |
CN111176164B (en) | Method, device and medium for expanding multiple remote input and output modules | |
CN113961496A (en) | Communication circuit system, method, chip and storage medium | |
CN110825684A (en) | Serial port interface integrated output system | |
CN219643938U (en) | Communication control circuit and communication equipment for carrying IIC communication through UART | |
JP3940843B2 (en) | Serial communication system and local terminal for serial communication | |
KR101810196B1 (en) | Communication module in inverter | |
CN216161090U (en) | IO point expansion board of MODBUS module | |
CN115051888B (en) | EtherCat master station control system based on AM335X | |
CN212061144U (en) | Expansion system based on ASI bus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant |