CN103200195B - A kind of more serial protocols turn the conversion method of the conversion equipment of ethernet communication - Google Patents
A kind of more serial protocols turn the conversion method of the conversion equipment of ethernet communication Download PDFInfo
- Publication number
- CN103200195B CN103200195B CN201310107852.6A CN201310107852A CN103200195B CN 103200195 B CN103200195 B CN 103200195B CN 201310107852 A CN201310107852 A CN 201310107852A CN 103200195 B CN103200195 B CN 103200195B
- Authority
- CN
- China
- Prior art keywords
- serial
- data
- equipment
- communication
- 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
Landscapes
- Communication Control (AREA)
- Small-Scale Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses the conversion equipment and conversion method that a kind of more serial protocols turn ethernet communication, its device includes serial communication equipment, embedded device, supervising software, serial communication data wire, ethernet communication data wire.Its method comprises the following steps:Start S1, initialization S2, request S3 is sent to all devices;Network interface is connected to TCP data bag S4, parsing TCP data bag S5, reads SDRAM data S6, composition TCP data bag S7, is sent to Ethernet interface S8;Serial ports is connected to RTU packets S9, verification correctlyS10, if yes then enter parsing RTU packets S11, take out data S12, SDRAM S13 are arrived in storage;RTU packets S9 is connected to if not serial ports is then returned to.Finally, EP (end of program) S14.The function that the present invention realizes while a variety of serial equipments are networked, there is the characteristics such as real-time is high, stability is strong, kernel is open and autgmentability is strong, meet the application in many fields, it is easy to accomplish the system integration.
Description
Technical field
The invention belongs to the conversion equipment and method that Multi-serial port in a kind of computer communication turns ethernet communication, and in particular to
One kind applies embedded technology, and programming structure is combined using modular construction and multithreading, a variety of serial communications are assisted
View formatted data be converted to ethernet communication protocol formatted data, while realize Multi-serial port turn ethernet communication conversion equipment and
Conversion method.
Technical background
In industrial control field, monitoring system generally requires to be communicated with a variety of monitoring devices, and acquisition monitoring device data are simultaneously
Control is realized to it.At present, aether net-based communication technology obtains extensive use, there is the number for the monitoring system that can be required compared with high real-time
Ethernet communication mode is much used according to communication modes., be with and many equipment only have serial communication interface in industrial system
Ethernet communication mode is monitored, it is necessary to realize that serial equipment is networked in real time.It is general to be realized using " Serial port equipment server "
Serial equipment is networked, and still, because Serial port equipment server only does " data penetration transmission ", i.e., is realized serial ports in form in outward appearance and is turned
The communication function of Ethernet, and computer carries out Communication processing still according to serial port in itself.Answered for structure
Complicated monitoring system miscellaneous, serial equipment species is more, communications protocol is more and requirement of real-time is high, adopting this method to meet
The technical requirements such as high real-time energy.
The content of the invention
The present invention proposes to overcome shortcoming present in prior art, can be accurate the purpose is to provide one kind
Really, in real time, stably while realize that more serial protocols turn the conversion equipment and conversion method of ethernet communication.
The technical scheme is that:A kind of more serial protocols turn the conversion equipment of ethernet communication, including serial communication
Equipment, embedded device, supervising software, serial communication data wire, ethernet communication data wire.Described serial communication
Equipment includes 8 kinds of serial equipments, and embedded device includes serial ports P1~P8 interfaces, network interface LAN1 and LAN2 interface, CPU, FLASH
(program storage), SDRAM (data storage), wherein P1~P8 interfaces can be arranged to RS-232/RS-422/RS-485 and appoint
The serial communication interface of meaning form, 8 kinds of serial equipments are connected with serial ports P1~P8 respectively by serial communication data wire, and serial ports P1~
P8 connects with CPU, and CPU passes through ethernet communication data with FLASH and LAN1, LAN2 orifice, LAN1, LAN2 interface respectively
Line connects with supervising software.
Described embedded device selects embedded industrial computer UC-7420.
Described supervising software selects KingView monitoring software.
A kind of more serial protocols turn the conversion method of ethernet communication conversion equipment, the software programming bag of the conversion method
Include:Start module, Ethernet interface data processing threads module, serial data processing threading models, terminate module;Its flow includes
Following steps:
Start module to comprise the following steps:Start S1, initialization S2, request S3 is sent to all devices.
Ethernet interface data processing threads module comprises the following steps:Network interface is connected to TCP data bag S4, parsing TCP data
Bag S5, read SDRAM data S6, composition TCP data bag S7, be sent to Ethernet interface S8.
Serial data processing threading models comprise the following steps:Serial ports is connected to RTU packets S9, verification correctlyS10, such as
Fruit is then to arrive SDRAM S13 into parsing RTU packets S11, taking-up data S12, storage;Connect if not serial ports is then returned to
To RTU packets S9.
Finally, EP (end of program) S14.
Beneficial effects of the present invention
The function that the present invention realizes while a variety of serial equipments are networked, with real-time is high, stability is strong, kernel is opened
Put with the characteristic such as autgmentability is strong, meet the application in many fields, it is easy to accomplish the system integration.
Brief description of the drawings
Fig. 1 is the conversion equipment block diagram that the more serial protocols of the present invention turn ethernet communication;
Fig. 2 is the conversion method flow chart that the more serial protocols of the present invention turn ethernet communication.
Wherein:
The embedded device of 1 serial communication equipment 2
The serial communication data wire of 3 supervising software 4
5 ethernet communication data wires 6 start module
7 Ethernet interface data processing threads modules
8 serial datas handle the terminate module of threading models 9
Embodiment
Below, a kind of more serial protocols of the present invention are turned with the conversion equipment of ethernet communication and is turned with embodiment referring to the drawings
The method of changing is described in detail:
As shown in figure 1, the conversion equipment that a kind of more serial protocols turn ethernet communication includes:Serial communication equipment 1, insertion
Formula equipment 2, supervising software 3, serial communication data wire 4, ethernet communication data wire 5.Wherein, serial communication equipment 1
Including the totally 8 kinds of serial equipments of 1~serial equipment of serial equipment 8, embedded device 2 include serial ports P1~P8 interfaces, network interface LAN1,
LAN2 interfaces, CPU, FLASH (program storage), SDRAM (data storage), wherein P1~P8 interfaces can be arranged to RS-
The serial communication interface of 232/RS-422/RS-485 arbitrary formats.
1~serial equipment of serial equipment 8 is connected with serial ports P1~P8 respectively by serial communication data wire 4, and serial ports P1~
P8 connects with CPU, and CPU passes through ethernet communication data with FLASH and LAN1, LAN2 orifice, LAN1, LAN2 interface respectively
Line 5 connects with supervising software 3.
Wherein, embedded device 2 is from the embedded industrial computer UC-7420 of MOXA companies, supervising software 3
From the KingView monitoring software of Beijing Ya Kong companies.
As shown in Fig. 2 the programming realization flow for the conversion method that the more serial protocols of the present invention turn ethernet communication includes:Open
Beginning module 6, Ethernet interface data processing threads module 7, serial data processing threading models 8, terminate module 9.
Wherein, start module 6 to comprise the following steps:Start S1, initialization S2, request S3 is sent to all devices.
Ethernet interface data processing threads module 7 comprises the following steps:Network interface is connected to TCP data bag S4, parsing TCP data
Bag S5, read SDRAM data S6, composition TCP data bag S7, be sent to Ethernet interface S8.
Serial data processing threading models 8 comprise the following steps:If serial ports is connected to RTU packets S9, verification S10, school
Test and correctly then arrive SDRAM S13 into parsing RTU packets S11, taking-up data S12, storage;String is returned to if incorrect
Mouth is connected to RTU packets S9.
Finally, EP (end of program) S14.
The present invention the course of work be:
After program operation, it is first carried out starting module 6, after starting S1 startup communication conversion programs, initialization S2 is carried out just
Beginningization variable, distribution data storage, the data request command of request S3 transmission all devices is then sent to all devices;When
When serial data processing threading models 8 receive serial ports RTU packet S9, the serial ports RTU packets received are led to according to it
News agreement carries out verification S10, if verification is incorrect will to discard this packet, if verification will correctly parse RTU packets
S11, take out data S12 and store supplemental characteristic into data storage SDRAM S13;Meanwhile Ethernet interface data processing line
Journey module 7 is also performing its function, when Ethernet interface data processing threads module 7 receives network interface TCP data bag S4, according to
Transmission Control Protocol parses TCP data bag S5, then reads SDRAM data S6 and takes out the data asked in TCP data bag, composition
The data asked are packaged into TCP formatted data bags by TCP data bag S7, are sent to Ethernet interface S8.
It has been achieved in that Multi-serial port turns ethernet communication translation function, before EP (end of program), serial data processing thread
Module 8 is run always with Ethernet network interface data processing threading models 7, carries out continuous, stable communication conversion.When stopping communicates
During translation function, terminate module 4 is performed, terminates S14 releasing memories, terminator.
The present invention realizes Multi-serial port and turns ethernet communication function, has real-time height, stability is strong, kernel is open and expands
The characteristics such as malleability is strong.Suitable for forming, complicated, serial equipment species is more, communications protocol species is more, stability, real-time and extension
The exigent monitoring system of property, can conveniently manage a variety of different communication equipments and agreement, it is easy to accomplish the system integration.
Claims (3)
1. a kind of more serial protocols turn the conversion method of the conversion equipment of ethernet communication, it is characterised in that described converting means
Put including serial communication equipment(1), embedded device(2), supervising software(3), serial communication data wire(4), ether
Data wire is interrogated by Netcom(5), it is characterised in that:Described serial communication equipment(1)Including 1~serial equipment of serial equipment 8 totally eight
Kind serial equipment, embedded device(2)Including serial ports P1~P8 interfaces, network interface LAN1, LAN2 interface, CPU, FLASH, SDRAM,
Wherein P1~P8 interfaces can be arranged to the serial communication interface of RS-232/RS-422/RS-485 arbitrary formats, and serial equipment 1~
Serial equipment 8 passes through serial communication data wire(4)Connected respectively with serial ports P1~P8, serial ports P1~P8 connects with CPU, CPU points
Ethernet communication data wire is not passed through with FLASH and LAN1, LAN2 orifice, LAN1, LAN2 interface(5)With computer monitoring
Software(3)Connection;
The software programming of described conversion method includes:Start module(6), Ethernet interface data processing threads module(7), serial ports
Data processing threads module(8), terminate module(9);Its flow comprises the following steps:
Start module(6)Comprise the following steps:Start S1, initialization S2, request S3 is sent to all devices;
Serial data handles threading models(8)Comprise the following steps:Serial data handles threading models(8)Receive serial ports RTU
Packet(S9)When, the serial ports RTU packets received are verified according to its communications protocol(S10)If verify not just
This packet will be really discarded, if verification will correctly parse RTU packets(S11), take out data(S12)Supplemental characteristic is deposited
Store up data storage SDRAM(S13)In;
Meanwhile Ethernet interface data processing threads module(7)Also its function, Ethernet interface data processing threads module are being performed
(7)Comprise the following steps:When Ethernet interface data processing threads module(7)Receive network interface TCP data bag(S4)When, according to
Transmission Control Protocol parses TCP data bag(S5), then read SDRAM data(S6)The data asked in TCP data bag are taken out,
Form TCP data bag(S7)The data asked are packaged into TCP formatted data bags, are sent to Ethernet interface(S8);
Finally, EP (end of program) S14.
2. a kind of more serial protocols according to claim 1 turn the conversion method of the conversion equipment of ethernet communication, it is special
Sign is:Described embedded device(2)From embedded industrial computer UC-7420.
3. a kind of more serial protocols according to claim 1 turn the conversion method of the conversion equipment of ethernet communication, it is special
Sign is:Described supervising software(3)From KingView monitoring software.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310107852.6A CN103200195B (en) | 2013-03-29 | 2013-03-29 | A kind of more serial protocols turn the conversion method of the conversion equipment of ethernet communication |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310107852.6A CN103200195B (en) | 2013-03-29 | 2013-03-29 | A kind of more serial protocols turn the conversion method of the conversion equipment of ethernet communication |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103200195A CN103200195A (en) | 2013-07-10 |
CN103200195B true CN103200195B (en) | 2018-01-19 |
Family
ID=48722552
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310107852.6A Active CN103200195B (en) | 2013-03-29 | 2013-03-29 | A kind of more serial protocols turn the conversion method of the conversion equipment of ethernet communication |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103200195B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103616927B (en) * | 2013-11-08 | 2017-07-07 | 安徽康海时代科技股份有限公司 | A kind of data communication server |
CN105573300B (en) * | 2016-01-29 | 2018-01-16 | 广州能迪能源科技股份有限公司 | A kind of data acquisition dubbing system and its control method based on Internet of Things |
CN109977052B (en) * | 2019-04-02 | 2024-04-30 | 上海卓岚信息科技有限公司 | Protocol conversion method, system, medium, chip and electronic device applying the method |
CN110933133A (en) * | 2019-10-28 | 2020-03-27 | 浙江工商大学 | Internet of things method and device for gas station |
CN113452628A (en) * | 2021-06-22 | 2021-09-28 | 中国船舶重工集团公司第七0七研究所 | Multifunctional interface adapter and control method thereof |
CN117544609B (en) * | 2024-01-09 | 2024-04-02 | 广州美凯信息技术股份有限公司 | Data transmission method of serial port transmission system based on KVM control |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101149608A (en) * | 2007-11-12 | 2008-03-26 | 北京大学 | Hand-held robot movement monitoring and control platform based on embedded type system |
CN101197067A (en) * | 2007-12-28 | 2008-06-11 | 上海电力学院 | Wireless remote monitoring system based on built-in platform |
CN202183779U (en) * | 2011-08-04 | 2012-04-04 | 上海电器科学研究院 | Ethernet access device of serial bus |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101179576A (en) * | 2007-12-05 | 2008-05-14 | 上海电器科学研究所(集团)有限公司 | Multi-protocol industry Ethernet adapter |
-
2013
- 2013-03-29 CN CN201310107852.6A patent/CN103200195B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101149608A (en) * | 2007-11-12 | 2008-03-26 | 北京大学 | Hand-held robot movement monitoring and control platform based on embedded type system |
CN101197067A (en) * | 2007-12-28 | 2008-06-11 | 上海电力学院 | Wireless remote monitoring system based on built-in platform |
CN202183779U (en) * | 2011-08-04 | 2012-04-04 | 上海电器科学研究院 | Ethernet access device of serial bus |
Also Published As
Publication number | Publication date |
---|---|
CN103200195A (en) | 2013-07-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103200195B (en) | A kind of more serial protocols turn the conversion method of the conversion equipment of ethernet communication | |
CN103516541B (en) | Configuration information automatic management method based on Intelligent transformer station | |
CN106131164B (en) | The data processing method and device of protocol analysis are carried out beyond the clouds | |
CN105573200B (en) | A kind of communication device and communication means for wind electric converter | |
CN104298196B (en) | The multi-protocols adaptation control method and system of a kind of intelligent meter storehouse | |
CN105959195A (en) | Industrial internet field level broadband bus technology implementation method | |
CN106375161A (en) | 10-gigabit Ethernet tester | |
CN105791032B (en) | The test method and device of transport protocol between intelligent appliance and mobile terminal | |
CN106357534A (en) | Network flow monitoring system and method based on SDN | |
CN107171852A (en) | Two layer services configuration system and method based on OpenFlow | |
CN102594702A (en) | System and method capable of achieving network data packet gripping and based on embedded wireless device | |
CN104574204B (en) | Intelligent measuring and control device ICD models automatic identification system and method | |
CN114650565B (en) | Intelligent flow control management system for intelligent gateway based on data analysis | |
CN108683590A (en) | The data transmission method of industrial Internet of Things and intelligent gateway therein, intelligent gateway | |
CN106713325A (en) | Communication protocol conversion card | |
CN109309595A (en) | Data transmission method, device and electronic equipment based on Ethernet | |
CN103728957B (en) | HART (highway addressable remote transducer) field equipment management method and system based on real-time database | |
CN103312908B (en) | Data transmission method used for Voice VLAN (virtual local logic network) | |
CN104683209B (en) | Coupling device and EtherCAT network coupled system between a kind of EtherCAT network main website | |
CN103369417A (en) | Configuration method of gigabit passive optical network terminal device | |
CN104219240B (en) | A kind of main frame learning method and device | |
CN109587025A (en) | A kind of intelligent substation switch of port self study | |
CN206370845U (en) | A kind of communicator based on Ethernet virtual serial port technology and LTE wireless networks | |
CN202206022U (en) | Debugging tool plug for industrial Ethernet exchanger RJ45 type network interface | |
CN105099775B (en) | A kind of OLT and ONU communication with detection methods |
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 |