CN103200195A - Transformation device and transformation method for transferring multiple serial protocols to Ethernet communication - Google Patents

Transformation device and transformation method for transferring multiple serial protocols to Ethernet communication Download PDF

Info

Publication number
CN103200195A
CN103200195A CN2013101078526A CN201310107852A CN103200195A CN 103200195 A CN103200195 A CN 103200195A CN 2013101078526 A CN2013101078526 A CN 2013101078526A CN 201310107852 A CN201310107852 A CN 201310107852A CN 103200195 A CN103200195 A CN 103200195A
Authority
CN
China
Prior art keywords
serial
data
interface
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.)
Granted
Application number
CN2013101078526A
Other languages
Chinese (zh)
Other versions
CN103200195B (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.)
Research Institute of Physical and Chemical Engineering of Nuclear Industry
Original Assignee
Research Institute of Physical and Chemical Engineering of Nuclear Industry
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 Research Institute of Physical and Chemical Engineering of Nuclear Industry filed Critical Research Institute of Physical and Chemical Engineering of Nuclear Industry
Priority to CN201310107852.6A priority Critical patent/CN103200195B/en
Publication of CN103200195A publication Critical patent/CN103200195A/en
Application granted granted Critical
Publication of CN103200195B publication Critical patent/CN103200195B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Communication Control (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a transformation device and a transformation method for transferring multiple serial protocols to Ethernet communication. The device comprises a serial communication device, an embedded type device, computer monitoring software, a serial communication data line and an Ethernet communication data line. The method comprises the following steps: 1, starting; 2, initializing; 3, sending a request to all devices; 4, receiving a transmission control protocol (TCP) data package through an internet access; 5, analyzing the TCP data package; 6, reading synchronous dynamic random access memory (SDRAM) data; 7, forming a TCP data package; 8, sending the data package to an Ethernet port; 9, connecting serial ports to a remote terminal unit (RTU) data package; 10, calibrating whether the RTU data package is right or not, and if yes, carrying out a step 11; 11, analyzing the RTU data package; 12, extracting data; 13, storing the data to SDRAM; if the RTU data package is not right, returning to the step 9 of connecting the serial ports to the RTU data package; and 14, finally, ending the procedure. The functions of enabling multiple serial devices to be connected with a network are achieved. The transformation device and the transformation method have the advantages of being high in real-time performance, strong in stability, opened in a kernel, strong in expansibility and the like, meeting application in many fields and being capable of achieving system integration easily.

Description

A kind of many serial protocols change conversion equipment and the conversion method of ethernet communication
Technical field
The invention belongs to many serial ports change ethernet communication in a kind of computer communication conversion equipment and method, be specifically related to a kind of application embedded technology, programming structure adopts modular construction and multithreading to combine, multiple serial port communicating protocol formatted data is converted to ethernet communication protocol format data, realizes that simultaneously many serial ports change conversion equipment and the conversion method of ethernet communication.
Technical background
At industrial control field, supervisory control system generally need be carried out communication with multiple watch-dog, and the acquisition monitoring device data also realize control to it.At present, the ethernet communication technology obtains extensive use, has the data communication method of the supervisory control system of higher real-time performance requirement much to adopt the ethernet communication mode.And a lot of equipment only have serial communication interface in the industrial system, monitor in real time in the ethernet communication mode, need to realize the serial equipment networking.General adopt " serial equipment server " realized the serial equipment networking, but, because the serial equipment server is only done " data penetration transmission ", namely realized the communication function that serial ports changes Ethernet in outward appearance, and computer still carries out the communication processing according to the serial communication mode in itself in form., communications protocol many for complex structure, serial equipment kind reaches the demanding complicated supervisory control system of real-time more, adopts this kind method can not satisfy high real-time and can wait specification requirement.
Summary of the invention
The present invention proposes in order to overcome the shortcoming that exists in the prior art, its objective is provide a kind of can be accurately, in real time, stable, realize that many serial protocols change conversion equipment and the conversion method of ethernet communications simultaneously.
Technical scheme of the present invention is: a kind of many serial protocols change the conversion equipment of ethernet communication, comprise serial communication equipment, embedded device, computer monitoring software, serial communication data wire, ethernet communication data wire.Described serial communication equipment comprises 8 kinds of serial equipments, embedded device comprises serial ports P1~P8 interface, network interface LAN1 and LAN2 interface, CPU, the FLASH(program storage), the SDRAM(data storage), wherein P1~P8 interface can be arranged to the serial communication interface of RS-232/RS-422/RS-485 arbitrary format, 8 kinds of serial equipments are communicated with serial ports P1~P8 respectively by the serial communication data wire, serial ports P1~P8 is communicated with CPU, CPU respectively with FLASH and LAN1, the LAN2 interface is communicated with, LAN1, the LAN2 interface is communicated with computer monitoring software by the ethernet communication data wire.
Described embedded device is selected embedded industrial computer UC-7420 for use.
Described computer monitoring software is selected the KingView monitoring software for use.
A kind of many serial protocols change the conversion method of ethernet communication conversion equipment, and the software programming of this conversion method comprises: beginning module, Ethernet interface data processing threads module, serial data processing threads module, the module that finishes; Its flow process may further comprise the steps:
The beginning module comprises the following steps: to begin S1, initialization S2, sends request S3 to all devices.
Ethernet interface data processing threads module comprises the following steps: that network interface receives tcp data bag S4, resolves tcp data bag S5, reads SDRAM data S6, forms tcp data bag S7, sends to Ethernet interface S8.
Does serial data processing threads module comprise the following steps: that serial ports is received RTU packet S9, verification is correct? S10 resolves RTU packet S11, takes out data S12, stores SDRAM S13 into if then enter; Receive RTU packet S9 if not then turning back to serial ports.
At last, EP (end of program) S14.
Beneficial effect of the present invention
The present invention realized simultaneously the function of multiple serial equipment networking, and characteristic such as have the real-time height, stability is strong, kernel is open and autgmentability is strong satisfies the application in many fields, is easy to realize the system integration.
Description of drawings
Fig. 1 is the conversion equipment block diagram that the many serial protocols of the present invention change ethernet communication;
Fig. 2 is the conversion method flow chart that the many serial protocols of the present invention change ethernet communication.
Wherein:
1 serial communication equipment, 2 embedded devices
3 computer monitoring softwares, 4 serial communication data wires
5 ethernet communication data wires, 6 beginning modules
7 Ethernet interface data processing threads modules
8 serial data processing threads modules 9 finish module.
Embodiment
Below, with reference to drawings and Examples conversion equipment and the conversion method that a kind of many serial protocols of the present invention change ethernet communication is elaborated:
As shown in Figure 1, a kind of conversion equipment of many serial protocol commentaries on classics ethernet communications comprises: serial communication equipment 1, embedded device 2, computer monitoring software 3, serial communication data wire 4, ethernet communication data wire 5.Wherein, serial communication equipment 1 comprises serial equipment 1~serial equipment 8 totally 8 kinds of serial equipments, embedded device 2 comprises serial ports P1~P8 interface, network interface LAN1, LAN2 interface, CPU, FLASH(program storage), the SDRAM(data storage), wherein P1~P8 interface can be arranged to the serial communication interface of RS-232/RS-422/RS-485 arbitrary format.
Serial equipment 1~serial equipment 8 is communicated with serial ports P1~P8 respectively by serial communication data wire 4, serial ports P1~P8 is communicated with CPU, CPU is communicated with FLASH and LAN1, LAN2 interface respectively, and LAN1, LAN2 interface are communicated with computer monitoring software 3 by ethernet communication data wire 5.
Wherein, embedded device 2 is selected the embedded industrial computer UC-7420 of MOXA company for use, and computer monitoring software 3 is selected the KingView monitoring software of Beijing inferior control company for use.
As shown in Figure 2, the programming realization flow of the conversion method of the many serial protocols commentaries on classics of the present invention ethernet communication comprises: beginning module 6, Ethernet interface data processing threads module 7, serial data processing threads module 8, the module 9 that finishes.
Wherein, beginning module 6 comprises the following steps: to begin S1, initialization S2, sends request S3 to all devices.
Ethernet interface data processing threads module 7 comprises the following steps: that network interface receives tcp data bag S4, resolves tcp data bag S5, reads SDRAM data S6, forms tcp data bag S7, sends to Ethernet interface S8.
If serial data processing threads module 8 comprises the following steps: that serial ports is received RTU packet S9, verification S10 verification correctly then entered and resolves RTU packet S11, takes out data S12, stores SDRAM S13 into; If it is incorrect then turn back to serial ports and receive RTU packet S9.
At last, EP (end of program) S14.
The course of work of the present invention is:
After the program operation, at first carry out beginning module 6, after beginning S1 started the communication conversion program, initialization S2 carried out initializing variable, distribute data memory, sent the data request command that request S3 sends all devices to all devices then; When serial data processing threads module 8 receives serial ports RTU packet S9, the serial ports RTU packet that receives is carried out verification S10 according to its communications protocol, to discard this packet if verification is incorrect, if verification correctly will be resolved RTU packet S11, take out data S12 supplemental characteristic is stored among the data storage SDRAM S13; Simultaneously, Ethernet interface data processing threads module 7 is also being carried out its function, when Ethernet interface data processing threads module 7 receives network interface tcp data bag S4, resolve tcp data bag S5 according to Transmission Control Protocol, reading SDRAM data S6 then takes out the data of asking in the tcp data bag, form tcp data bag S7 the data of asking are packaged into TCP formatted data bag, send to Ethernet interface S8.
Realized that so many serial ports change the ethernet communication translation function, before EP (end of program), serial data processing threads module 8 is moved with Ethernet network interface data processing threads module 7 always, carries out continuous, stable communication conversion.When stopping the communication translation function, carry out and finish module 4, finish S14 and discharge internal memory, terminator.
The present invention has realized that many serial ports change the ethernet communication functions, characteristic such as have the real-time height, stability is strong, kernel is open and autgmentability is strong.Be applicable to constitute complicated, the serial equipment kind is many, the communications protocol kind is many, stable, real-time and the exigent supervisory control system of autgmentability, can conveniently manage multiple different communication equipment and agreement, is easy to realize the system integration.

Claims (4)

1. serial protocol more than a kind changes the conversion equipment of ethernet communication, comprise serial communication equipment (1), embedded device (2), computer monitoring software (3), serial communication data wire (4), ethernet communication data wire (5), it is characterized in that: described serial communication equipment (1) comprises serial equipment 1~serial equipment 8 totally eight kinds of serial equipments, embedded device (2) comprises serial ports P1~P8 interface, network interface LAN1, the LAN2 interface, CPU, the FLASH(program storage), SDRAM, wherein P1~P8 interface can be arranged to the serial communication interface of RS-232/RS-422/RS-485 arbitrary format, serial equipment 1~serial equipment 8 is communicated with serial ports P1~P8 respectively by serial communication data wire (4), serial ports P1~P8 is communicated with CPU, CPU respectively with FLASH and LAN1, the LAN2 interface is communicated with, LAN1, the LAN2 interface is communicated with computer monitoring software (3) by ethernet communication data wire (5).
2. a kind of many serial protocols according to claim 1 change the conversion equipment of ethernet communication, and it is characterized in that: described embedded device (2) is selected embedded industrial computer UC-7420 for use.
3. a kind of many serial protocols according to claim 1 change the conversion equipment of ethernet communication, and it is characterized in that: described computer monitoring software 3 is selected the KingView monitoring software for use.
4. change the conversion method of the conversion equipment of ethernet communication according to many serial protocols, it is characterized in that: the software programming of this conversion method comprises: beginning module (6), Ethernet interface data processing threads module (7), serial data processing threads module (8), the module (9) that finishes; Its flow process may further comprise the steps: beginning module (6) comprises the following steps: to begin S1, initialization S2, sends request S3 to all devices;
Ethernet interface data processing threads module (7) comprises the following steps: that network interface receives tcp data bag S4, resolves tcp data bag S5, reads SDRAM data S6, forms tcp data bag S7, sends to Ethernet interface S8;
Does serial data processing threads module (8) comprise the following steps: that serial ports is received RTU packet S9, verification is correct? S10 resolves RTU packet S11, takes out data S12, stores SDRAM S13 into if then enter; Receive RTU packet S9 if not then turning back to serial ports;
At last, EP (end of program) S14.
CN201310107852.6A 2013-03-29 2013-03-29 A kind of more serial protocols turn the conversion method of the conversion equipment of ethernet communication Active CN103200195B (en)

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 true CN103200195A (en) 2013-07-10
CN103200195B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103616927A (en) * 2013-11-08 2014-03-05 安徽康海时代科技有限公司 Data communication server
CN105573300A (en) * 2016-01-29 2016-05-11 广州能迪能源科技股份有限公司 Data acquisition replication system based on Internet-of-things and control method thereof
CN109977052A (en) * 2019-04-02 2019-07-05 上海卓岚信息科技有限公司 System, medium, chip and the electronic equipment of method for converting protocol and application this 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
CN117544609A (en) * 2024-01-09 2024-02-09 广州美凯信息技术股份有限公司 Data transmission method of serial port transmission system based on KVM control

Citations (4)

* Cited by examiner, † Cited by third party
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
CN101179576A (en) * 2007-12-05 2008-05-14 上海电器科学研究所(集团)有限公司 Multi-protocol industry Ethernet adapter
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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
CN101179576A (en) * 2007-12-05 2008-05-14 上海电器科学研究所(集团)有限公司 Multi-protocol industry Ethernet adapter
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

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103616927A (en) * 2013-11-08 2014-03-05 安徽康海时代科技有限公司 Data communication server
CN103616927B (en) * 2013-11-08 2017-07-07 安徽康海时代科技股份有限公司 A kind of data communication server
CN105573300A (en) * 2016-01-29 2016-05-11 广州能迪能源科技股份有限公司 Data acquisition replication system based on Internet-of-things and control method thereof
CN105573300B (en) * 2016-01-29 2018-01-16 广州能迪能源科技股份有限公司 A kind of data acquisition dubbing system and its control method based on Internet of Things
CN109977052A (en) * 2019-04-02 2019-07-05 上海卓岚信息科技有限公司 System, medium, chip and the electronic equipment of method for converting protocol and application this method
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
CN117544609A (en) * 2024-01-09 2024-02-09 广州美凯信息技术股份有限公司 Data transmission method of serial port transmission system based on KVM control
CN117544609B (en) * 2024-01-09 2024-04-02 广州美凯信息技术股份有限公司 Data transmission method of serial port transmission system based on KVM control

Also Published As

Publication number Publication date
CN103200195B (en) 2018-01-19

Similar Documents

Publication Publication Date Title
CN103200195A (en) Transformation device and transformation method for transferring multiple serial protocols to Ethernet communication
CN103516541B (en) Configuration information automatic management method based on Intelligent transformer station
CN103905333A (en) Internet of things multi-protocol access transform device and control method thereof
US20170373873A1 (en) Industry internet field broadband bus architecture system
CN104639385B (en) Detect the method and apparatus of L2VPN network user's side interface connectivity
CN114222009A (en) Industrial communication multi-protocol conversion system
CN104267701B (en) The control method and device of smart home newly added equipment
CN106130855B (en) Data processing method and device
CN106292518B (en) Remote PLC monitoring and debugging system and method
WO2018018607A1 (en) Method and device for fixed conversion of transmission protocol based on message protocol identification
CN104486783A (en) Multi-state wireless gateway system for multi-state wireless monitoring network and control method
CN204291029U (en) A kind of Internet of Things cloud gateway
CN108683590A (en) The data transmission method of industrial Internet of Things and intelligent gateway therein, intelligent gateway
CN103973762A (en) Method for communication between host and intelligent terminal of intelligent home system
CN109951430A (en) A kind of data processing method and device
CN106227102A (en) A kind of data acquisition extension system and collecting method thereof
CN104915308A (en) Method and device for supporting serial port and interface communication protocol stacks of TCP and UDP at same time
WO2016110070A1 (en) Data acquiring method and device, and storage medium
CN105739464A (en) Main control communication method used for intelligent household electrical appliances
CN106325126B (en) A kind of data acquisition expansion control system and its collecting method
CN105245571A (en) Data acquisition method, apparatus and system
CN103312908B (en) Data transmission method used for Voice VLAN (virtual local logic network)
CN104506425A (en) Instant messaging system based on family cloud host and method thereof
CN105099645A (en) Multi-user concurrent communication method and device based on half-duplex communication device
CN102843380A (en) Method for solving serial port communication bottleneck based on MODBUS

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