CN106131028B - A kind of data transmission method of Free-port communication gateway - Google Patents
A kind of data transmission method of Free-port communication gateway Download PDFInfo
- Publication number
- CN106131028B CN106131028B CN201610569690.1A CN201610569690A CN106131028B CN 106131028 B CN106131028 B CN 106131028B CN 201610569690 A CN201610569690 A CN 201610569690A CN 106131028 B CN106131028 B CN 106131028B
- Authority
- CN
- China
- Prior art keywords
- data
- serial
- communication
- serial ports
- ethernet
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Small-Scale Networks (AREA)
Abstract
The present invention provides a kind of data transmission methods of Free-port communication gateway, communication gate has multiple serial ports and at least one network interface, each serial ports has different serial ports, it is characterized in that, the following steps are included: each serial ports of communication gate is connected from different live serial devices, by the network interface access industrial Ethernet system of communication gate;It is required according to on-scene communication, communication pattern required for the serial ports to be each connected with live serial device configures.After applying the present invention, it can be achieved that multiple, a variety of serial device of 1 gateway accessing is to Industrial Ethernet, without considering specific data sense, specific communication protocol is defined by user oneself.And when being communicated, serial data can be accurately transmitted to far-end network, far-end network can also accurately monitor a certain serial device.
Description
Technical field
A kind of data transmission method of Free-port communication gateway of the present invention, belongs to industrial communication technical field.
Background technique
With the rise of " Internet of Things " technology, most industry spot has covered complete network communication, but still deposits
In many live serial devices without network interface, remote data communication can not be carried out by Ethernet, if these can be utilized
The data of serial device are carried out remote transmission by the existing network facilities, by the utilization rate of great extended serial equipment, and
These field devices are remotely monitored by Ethernet, also the development for " Internet of Things " provides a kind of channel.
Currently, domestic many live serial devices are due to various reasons, there is no using unified communication protocol come into
Row data communication, so that upper-level system can not be handled different serial device data, it is therefore desirable to which a kind of Multi-serial port is set
It is standby, energy access industrial Ethernet system, and solve communication protocol Diversification Problem.
Summary of the invention
Industrial Ethernet system is had access to the object of the present invention is to provide one kind and solves communication protocol Diversification Problem
Multi-serial port equipment data communications method.
In order to achieve the above object, the technical solution of the present invention is to provide a kind of transmission of the data of Free-port communication gateway
Method, communication gate have multiple serial ports and at least one network interface, and each serial ports has different serial ports, which is characterized in that
The following steps are included:
Each serial ports of communication gate is connected by step 1 from different live serial devices, and the network interface of communication gate is accessed
Industrial Ethernet system;
Step 2 is required according to on-scene communication, for the required communication of serial ports configuration being each connected with live serial device
The step of mode, any scene serial device transmits data to Industrial Ethernet system includes:
Data are sent from current live serial device to coupled current serial ports, the current serial ports of communication gate receives
To after data, the serial port of current serial ports is recorded, then configured by the control unit inside communication gate according to current serial ports
The data received are converted to ethernet frame format data by the corresponding communication protocol of communication pattern, recycle network interface by Ethernet
Frame format data are uploaded to Industrial Ethernet system;
The step of any ethernet device in Industrial Ethernet system sends data to any live serial device include:
After communication gate receives the ethernet frame format data from current ethernet device, inside communication gate
Control unit according to corresponding with the link information of the current ethernet device communication protocol of communication gate by ethernet frame format
Data are converted to the free frame data of serial ports transmission, obtain serial port according to the port information in free frame data, recycle string
Slogan sends free frame data to the live serial device being connected with corresponding serial ports.
Preferably, the communication pattern includes TCP Server communication pattern, TCP Client communication pattern, UDP communication
Mode and real serial interface communication mode are corresponded to if current serial ports is configured as TCP Server communication pattern by current serial ports
Live serial device to Industrial Ethernet system transmit data the step of include:
Server-side of the communication gate as TCP monitors the visitor of all Industrial Ethernet systems by the local port configured
The connection at family end, and the link address of all clients is saved, after current serial ports receives the data frame that live serial device is sent,
Record receives the serial port of data, the data frame received is converted to the ethernet frame format data of Ethernet transmission, concurrently
Give all clients having connected;
If current serial ports is configured as TCP Client communication pattern, from the corresponding live serial device of current serial ports to
Industrial Ethernet system transmit data the step of include:
Client of the communication gate as TCP attempts all mesh configured under the mode in connection Industrial Ethernet system
The corresponding server-side of IP address and port, and save all link informations, current serial ports receives what live serial device was sent
After data frame, record receives the serial port of data, and the data frame received is converted to the ethernet frame format of Ethernet transmission
Data, and it is sent to all server-sides having connected;
If current serial ports is configured as UDP communication pattern, from the corresponding live serial device of current serial ports to industry with
Too the step of net system transmission data, includes:
Communication gate binds local port, and after current serial ports receives the data frame that live serial device is sent, record is received
The data frame received, is converted to the ethernet frame format data of Ethernet transmission by the serial port of data, and is sent to the mould
All long-range purpose IP address of the Industrial Ethernet system configured under formula and port;
If current serial ports is configured as real serial interface communication mode, from the corresponding live serial device of current serial ports to industry
Ethernet system transmit data the step of include:
Industrial Ethernet system is that the connection of client is provided in a manner of virtual serial port, clothes of the communication gate as TCP
It is engaged in end, by the connection of the client of fixed all Industrial Ethernet systems of port snoop, and saving the company of all clients
It is grounded location, after current serial ports receives the data frame that live serial device is sent, record receives the serial port of data, at CPU
The data frame received, is converted to the ethernet frame format data of Ethernet transmission by reason, and is sent to all visitors having connected
Family end after client receives ethernet frame data, according to the configuration of virtual serial port, maps the data into corresponding virtual serial port
End, to realize the data communication of real serial ports.
After applying the present invention, it can be achieved that multiple, a variety of serial device of 1 gateway accessing is to Industrial Ethernet, without examining
Consider specific data sense, specific communication protocol is defined by user oneself.It, can be by serial data standard and when being communicated
It really is transmitted to far-end network, far-end network can also accurately monitor a certain serial device.
Detailed description of the invention
Fig. 1 is the hardware structure diagram of communication gate used in the present invention;
Fig. 2 is communication construction figure;
Fig. 3 is mapping relations figure;
Fig. 4 is field application figure.
Specific embodiment
In order to make the present invention more obvious and understandable, hereby with preferred embodiment, and attached drawing is cooperated to be described in detail below.
Fig. 1 is the hardware structure diagram of communication gate used in the present invention, is specifically included: power module, processor
Module, ethernet module, serial interface module and other modules.Power module is inputted by external 24VDC, and internal conversion is
Required 5V, 3.3V driving power.CPU processor mainly realizes configuration management, serial data communication and the ether Netcom of equipment
Letter.Serial interface module includes the independent RS485 physical interface in 4 tunnels, with multichannel data parallel acquisition on site.Ethernet module
For configuring communication, serial link data communication and monitoring data communication;Other modules include indicator light, reset button and buzzing
Device.
Functional configuration in Fig. 2 is the necessary condition of this communication gate operation.Communication gate in the present invention supports 4 kinds of moulds
Formula: TCP Server communication pattern, TCP Client communication pattern, UDP communication pattern and real serial interface communication mode, Yong Huke
It is required according to on-scene communication, to configure required communication mode.After selecting a certain communication mode, user can be according to upper-level system
Communicating requirement and serial device transmission requirement, the parameter configuration (baud rate including serial ports is carried out to each independent serial ports
Etc. parameter settings, the destination IP and port setting that are transferred to distal end), can reach every road serial ports with different communication mode and distal end
Ethernet system carries out seamless data transmission.Host computer configuration software can be used in configuration mode, by the udp port of Ethernet,
Gateway is sent according to custom protocol by configuration message, after gateway receives configuration message and parses, according to configuration
Parameter works.
In conjunction with Fig. 3, the present invention provides a kind of data transmission method of Free-port communication gateway the following steps are included:
Each serial ports of communication gate is connected by step 1 from different live serial devices, and the network interface of communication gate is accessed
Industrial Ethernet system;
Step 2 is required according to on-scene communication, for the required communication of serial ports configuration being each connected with live serial device
Mode, (parameter settings such as baud rate including serial ports, the destination IP for being transferred to distal end and port setting), can reach every road serial ports
Seamless data transmission is carried out with different communication mode and distal end Ethernet system.Configuration mode can be used host computer configuration soft
Part sends gateway according to custom protocol for configuration message, gateway, which receives, matches by the udp port of Ethernet
After setting message and parsing, work according to configuration parameter.Configuration parameter is as shown in the table:
According to above-mentioned functional configuration and configuration parameter, the mapping relations between serial device and Ethernet system are formed.
By taking serial ports 1 as an example, when the pattern configurations of serial ports 1 are TCP Server mode, server-side of the gateway as TCP,
The connection of all clients is monitored by the local port configured, and saves the link address of all clients;When 1 end of serial ports is received
After the data frame sent to RS485 equipment, record receives the serial port (such as serial ports 1) of data, is handled by CPU, serial ports is connect
The free frame received is converted to the ethernet frame format of Ethernet transmission, and is sent to all Terminal Server Clients having connected.
When the pattern configurations of serial ports 1 are TCP Client mode, client of the gateway as TCP is attempted to connect the mould
The all purposes IP address configured under formula and port, and save all link informations;It is sent when 1 end of serial ports receives RS485 equipment
Data frame after, record receives the serial port (such as serial ports 1) of data, is handled by CPU, and the free frame that serial ports is received is converted
For the ethernet frame format of Ethernet transmission, and it is sent to all remote service ends having connected.
When the pattern configurations of serial ports 1 are UDP mode, gateway binds local port;When 1 end of serial ports receives RS485 equipment
After the data frame of transmission, record receives the serial port (such as serial ports 1) of data, is handled by CPU, the free frame that serial ports is received
The ethernet frame format of Ethernet transmission is converted to, and is sent to all long-range purpose IP address configured under the mode and end
Mouthful.
When the pattern configurations of serial ports 1 are real serial ports mode, ethernet side system is that visitor is provided in a manner of virtual serial port
The connection at family end, server-side of the gateway as TCP by the connection of fixed port snoop all clients, and save all
The link address of client;After 1 end of serial ports receives the data frame of RS485 equipment transmission, record receives the serial port of data (such as
Serial ports 1), it is handled by CPU, the free frame that serial ports is received is converted to the ethernet frame format of Ethernet transmission, and sends
To all Terminal Server Clients having connected, after Terminal Server Client receives ethernet frame data, according to the configuration of virtual serial port, will count
According to corresponding virtual serial port end is mapped to, to realize the data communication of real serial ports.
After ethernet side receives Ethernet data, system judges that serial port is believed according to link information and receiving port
Breath, while the data frame of Ethernet protocol is converted into the free frame that serial ports is sent, thus serial port is sent.
In above-mentioned steps, ethernet frame judgment method: judge ethernet frame whether just according to the ICP/IP protocol of standard
Really, and with this it parses each layer data and is handled.
Free frame determination method: in order to ensure the integrality and correctness of Serial data receiving, gateway, which receives, serially to be set
After the random length data packet that preparation is sent, the knot of this bag data is judged by off time 3~5ms of time-out of two neighboring packet
Beam specifically includes transmission time, the processing time of CPU and the conversion time of hardware circuit of baud rate.Wherein baud rate
Transmission time is calculated according to 9600bps, and the time for transmitting byte needs is: 11bit/9600*1000=1.14ms.(its
Middle 11bit=start bit 1bit+ data bit 8bit+ stop position 1bit+ check bit 1bit).
Fig. 4 is field application figure, and by above method, 4 serial ports end datas can according to functional configuration and mapping table
4 kinds of different upper-level systems are sent to, upper-level system can also transmit data to specifically according to functional configuration and mapping table
RS485 equipment on, to realize the seamless communication of arbitrary data.
Claims (2)
1. a kind of data transmission method of Free-port communication gateway, communication gate has multiple serial ports and at least one network interface, often
A serial ports has different serial ports, which comprises the following steps:
Each serial ports of communication gate is connected by step 1 from different live serial devices, by the network interface access industrial of communication gate
Ethernet system;
Step 2 is required according to on-scene communication, for the required communication mould of serial ports configuration being each connected with live serial device
The step of formula, any scene serial device transmits data to Industrial Ethernet system includes:
Data are sent from current live serial device to coupled current serial ports, the current serial ports of communication gate receives number
According to rear, the serial port of current serial ports, then the communication configured by the control unit inside communication gate according to current serial ports are recorded
The data received are converted to ethernet frame format data by the corresponding communication protocol of mode, recycle network interface by ethernet frame lattice
Formula data are uploaded to Industrial Ethernet system;
The step of any ethernet device in Industrial Ethernet system sends data to any live serial device include:
After communication gate receives the ethernet frame format data from current ethernet device, by the control inside communication gate
Unit processed is according to communication gate communication protocol corresponding with the link information of current ethernet device by ethernet frame format data
The free frame data for being converted to serial ports transmission obtain serial port according to the port information in free frame data, recycle serial port
Free frame data are sent to the live serial device being connected with corresponding serial ports.
2. a kind of data transmission method of Free-port communication gateway as described in claim 1, which is characterized in that the communication mould
Formula includes TCP Server communication pattern, TCP Client communication pattern, UDP communication pattern and real serial interface communication mode, if
Current serial ports is configured as TCP Server communication pattern, then from the corresponding live serial device of current serial ports to Industrial Ethernet
System transmit data the step of include:
Server-side of the communication gate as TCP monitors the client of all Industrial Ethernet systems by the local port configured
Connection, and save the link address of all clients, after current serial ports receives the data frame that live serial device is sent, record
The data frame received, is converted to the ethernet frame format data of Ethernet transmission by the serial port for receiving data, and is sent to
All clients having connected;
If current serial ports is configured as TCP Client communication pattern, from the corresponding live serial device of current serial ports to industry
Ethernet system transmit data the step of include:
Client of the communication gate as TCP attempts all purposes IP configured under the mode in connection Industrial Ethernet system
The corresponding server-side in address and port, and all link informations are saved, current serial ports receives the data that live serial device is sent
After frame, record receives the serial port of data, and the data frame received is converted to the ethernet frame format data of Ethernet transmission,
And it is sent to all server-sides having connected;
If current serial ports is configured as UDP communication pattern, from the corresponding live serial device of current serial ports to Industrial Ethernet
System transmit data the step of include:
Communication gate binds local port, and after current serial ports receives the data frame that live serial device is sent, record receives data
Serial port, the data frame received is converted to the ethernet frame format data of Ethernet transmission, and is sent under the mode
All long-range purpose IP address of the Industrial Ethernet system of configuration and port;
If current serial ports is configured as real serial interface communication mode, from the corresponding live serial device of current serial ports to industrial ether
Net system transmit data the step of include:
Industrial Ethernet system is that the connection of client is provided in a manner of virtual serial port, server-side of the communication gate as TCP,
By the connection of the client of fixed all Industrial Ethernet systems of port snoop, and with saving the connection of all clients
Location, after current serial ports receives the data frame that live serial device is sent, record receives the serial port of data, is handled by CPU, will
The data frame received is converted to the ethernet frame format data of Ethernet transmission, and is sent to all clients having connected,
After client receives ethernet frame data, according to the configuration of virtual serial port, corresponding virtual serial port end is mapped the data into, thus
Realize the data communication of real serial ports.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610569690.1A CN106131028B (en) | 2016-07-19 | 2016-07-19 | A kind of data transmission method of Free-port communication gateway |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610569690.1A CN106131028B (en) | 2016-07-19 | 2016-07-19 | A kind of data transmission method of Free-port communication gateway |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106131028A CN106131028A (en) | 2016-11-16 |
CN106131028B true CN106131028B (en) | 2019-07-05 |
Family
ID=57288984
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610569690.1A Active CN106131028B (en) | 2016-07-19 | 2016-07-19 | A kind of data transmission method of Free-port communication gateway |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106131028B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106814717B (en) * | 2017-01-25 | 2019-05-17 | 北京无线电测量研究所 | A kind of method and system simplifying engineering control system communication based on Industrial Ethernet |
CN108011813A (en) * | 2017-12-15 | 2018-05-08 | 江苏坤发信息科技有限公司 | One kind has programmable communication gate |
CN109471826A (en) * | 2018-12-28 | 2019-03-15 | 安徽三人信息科技有限公司 | A kind of serial ports switching network transmitting device |
CN112688844A (en) * | 2020-12-11 | 2021-04-20 | 北京天融信网络安全技术有限公司 | Communication control method, device, equipment and medium |
CN114545906B (en) * | 2022-02-28 | 2024-05-10 | 奇瑞汽车股份有限公司 | Vehicle-mounted Ethernet gateway and vehicle |
CN116647515B (en) * | 2023-04-14 | 2023-11-17 | 南京粒聚智能科技有限公司 | Edge computing gateway communication method with serial port communication forwarding function |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101800652A (en) * | 2010-02-04 | 2010-08-11 | 深圳市金宏威实业发展有限公司 | Mode switching method and system of serial port and Ethernet and industrial Ethernet switch |
CN201887792U (en) * | 2010-09-27 | 2011-06-29 | 北京泰豪智能工程有限公司 | Multi-protocol conversion gateway |
CN103078871A (en) * | 2013-01-18 | 2013-05-01 | 武汉迈威实达软件有限公司 | Serial port Ethernet protocol conversion method |
-
2016
- 2016-07-19 CN CN201610569690.1A patent/CN106131028B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101800652A (en) * | 2010-02-04 | 2010-08-11 | 深圳市金宏威实业发展有限公司 | Mode switching method and system of serial port and Ethernet and industrial Ethernet switch |
CN201887792U (en) * | 2010-09-27 | 2011-06-29 | 北京泰豪智能工程有限公司 | Multi-protocol conversion gateway |
CN103078871A (en) * | 2013-01-18 | 2013-05-01 | 武汉迈威实达软件有限公司 | Serial port Ethernet protocol conversion method |
Also Published As
Publication number | Publication date |
---|---|
CN106131028A (en) | 2016-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106131028B (en) | A kind of data transmission method of Free-port communication gateway | |
CN105163364A (en) | Intelligent device WiFi connection system and intelligent device WiFi connection method based on intelligent gateway | |
CN103236960A (en) | Method and system for data interaction between home server and plurality of terminals | |
CN106355873B (en) | Internet of things intelligent traffic gateway and system thereof | |
CN106899498A (en) | Embedded industry intelligent gateway and its real-time data acquisition method based on SoC | |
CN111371827A (en) | Data transmission method, device and computer readable storage medium | |
CN106056876A (en) | Enterprise energy management information acquisition system and method | |
CN104486783B (en) | Polymorphic wireless gateway system and control method for polymorphic wireless monitor network | |
CN104993979A (en) | Network connection monitoring method, terminal equipment and communication system | |
CN110278280A (en) | Building site data integrated system and integration method based on Internet of Things | |
CN206559386U (en) | Embedded industry intelligent gateway and internet of things data acquisition monitoring system based on SoC | |
CN106534286A (en) | System and method of connecting mesh network device to cloud user | |
CN203167301U (en) | Gatewayconverting WiFi to ZigBee | |
CN207251930U (en) | The simple gateways of LoRa | |
CN107918375A (en) | A kind of equipment high in the clouds monitoring management system | |
CN104765304B (en) | It is a kind of to be used for sensor data acquisition, processing, the system of transmission | |
CN105100000B (en) | Interface conversion device and network system | |
CN116600330A (en) | HUB hierarchical topology management method and device based on NETCONF protocol | |
CN104378778B (en) | Method, system and the transfer gateway to communicate in Internet of Things between master-salve station | |
CN105955902A (en) | Serial-to-wireless communicator | |
CN208076997U (en) | A kind of equipment high in the clouds monitoring management system | |
CN204425672U (en) | The gateway apparatus of health detection Internet of Things is moved for ZigBee-HL7 | |
CN205845284U (en) | A kind of enterprise energy management information acquisition system | |
CN208873275U (en) | Railway monitoring data transceiver | |
CN207382307U (en) | A kind of wireless transmitting and receiving device of new 6lowpan Internet protocols |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |