CN107241382B - Data conversion method and device used between serial port and Ethernet - Google Patents

Data conversion method and device used between serial port and Ethernet Download PDF

Info

Publication number
CN107241382B
CN107241382B CN201710271894.1A CN201710271894A CN107241382B CN 107241382 B CN107241382 B CN 107241382B CN 201710271894 A CN201710271894 A CN 201710271894A CN 107241382 B CN107241382 B CN 107241382B
Authority
CN
China
Prior art keywords
data
network
tcp
serial port
port
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
Application number
CN201710271894.1A
Other languages
Chinese (zh)
Other versions
CN107241382A (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.)
Tianjin Ruineng Electric Co ltd
Original Assignee
Tianjin Ruineng Electric Co ltd
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 Tianjin Ruineng Electric Co ltd filed Critical Tianjin Ruineng Electric Co ltd
Priority to CN201710271894.1A priority Critical patent/CN107241382B/en
Publication of CN107241382A publication Critical patent/CN107241382A/en
Application granted granted Critical
Publication of CN107241382B publication Critical patent/CN107241382B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0002Serial port, e.g. RS232C

Abstract

The invention discloses a data conversion method and a device used between a serial port and an Ethernet, when micro-grid data enters a data conversion device through the serial port, physical caching is performed through the serial port, then data caching is performed through a main controller, the micro-grid data is sent to a network port, and finally the micro-grid data is transmitted to a far-end network from the network port; when the remote network instruction enters the data conversion device through the network port, the data caching processing is performed through the main controller, the physical caching processing is performed through the serial port, and then the remote network instruction is transmitted to the micro-grid through the serial port. The invention converts the serial port data of the micro-grid into the network port data to be sent out through the network, and simultaneously receives the remote data instruction back through the network. The system is prepared for real-time and long-distance transmission of big data, has the characteristics of double buffering, high-efficiency and high-speed transmission, configurability and user friendliness, can meet the requirement of big data transmission, and is convenient for big data analysis and the like.

Description

Data conversion method and device used between serial port and Ethernet
Technical Field
The invention belongs to the technical field of micro-grids, and particularly relates to a data conversion method and device used between a serial port and an Ethernet.
Background
Micro-grid (micro-grid) is also called as micro-grid, and refers to a small power generation and distribution system formed by collecting distributed power sources, energy storage devices, energy conversion devices, related loads and monitoring and protecting devices, and is an autonomous system capable of realizing self-control, protection and management, and can be operated in parallel with an external power grid or in isolation.
With the continuous increase of the scale of the power system in China, the continuous increase of the interconnectivity of the power grid system in China, the influence of factors such as power consumption diversification and the like, the power system in China faces higher and higher safety and reliability pressure. The micro-grid is an effective measure for relieving the pressure of the current power grid, and the safety and stability of the large power grid can be improved mainly because the micro-grid has the effect of peak clipping and valley filling on the large power grid. The micro-grid can also effectively identify the electricity demand of the terminal user and the power supply in the network, and the optimal configuration of the power resources is realized and the waste is reduced through intelligent analysis of the power information. Meanwhile, the distributed power supply in the network is very close to the end user, a long-distance high-voltage transmission line is not needed, and the line loss is low, so that the purpose of improving the power utilization efficiency is achieved.
In traditional power monitoring systems such as micro-grids, data are transmitted in a serial port mode, the transmission mode can only be used in a limited distance, and once the data are far away from equipment, the data cannot be used. Therefore, the data which can be acquired by the traditional monitoring system are limited data, and a large amount of data which reflects key indexes of system operation cannot be monitored in real time because the data volume is large, the serial port bandwidth is small and the data cannot be transmitted remotely. Especially, because of the complexity and the harshness of the wind power plant environment, a large part of converters in the wind power plant only adopt serial ports with stable characteristics, the functions of data surfing, remote operation and the like can not be realized, and the data transmission speed is limited.
Disclosure of Invention
The invention provides a data conversion method and a device for serial port and Ethernet, which are used for realizing data double-buffer transmission and stable high-rate conversion in the micro-grid strong electromagnetic interference environment, in order to solve the prior technical problems.
The invention adopts the technical proposal for solving the technical problems in the prior art that:
the invention relates to a data conversion method used between a serial port and an Ethernet, which comprises the following specific steps:
when the micro-grid data enter the data conversion device through the serial port, physical caching is performed through the serial port, data caching is performed through the main controller, the micro-grid data are sent to the network port, and finally the micro-grid data are transmitted to the remote network from the network port;
when the remote network instruction enters the data conversion device through the network port, the data caching processing is performed through the main controller, the physical caching processing is performed through the serial port, and then the remote network instruction is transmitted to the micro-grid through the serial port.
The serial port adopts a DMA communication module to carry out physical caching, a multi-byte space is used as a caching space in the DMA communication module, when the DMA communication module receives micro-grid data or a remote network instruction, bytes of source data are selected and combined into multi-byte half-word data according to byte channels of the DMA communication module, the DMA communication module is triggered to receive the multi-byte data, and after finishing data transfer, the next transmission is carried out.
The data caching method of the master controller specifically comprises the following steps:
firstly, designing a buffer zone, wherein the buffer zone receives micro-grid data processed by the buffer zone, an input pointer in the buffer zone points to the next position, judging whether the input pointer reaches the end of the buffer zone, if the input pointer reaches the end of the buffer zone, repositioning and reporting errors by the input pointer, simultaneously, continuously using an output pointer by a while circulation of the bottom layer to read the micro-grid data from the buffer zone, judging the utilization rate of the buffer zone according to the comparison of the input pointer and the output pointer, namely (output pointer position address-input pointer position address)/buffer zone size, and obtaining the utilization rate of the buffer zone, wherein the data flow is micro-grid data > serial port > data conversion equipment > network port > far-end network data, the utilization rate of the buffer zone is low, and the buffer zone is stopped;
when the buffer area receives the remote network instruction, the input pointer in the buffer area points to the next position, judges whether the input pointer reaches the end of the buffer area, if the input pointer reaches the end of the buffer area, the input pointer is relocated and reported to be wrong, meanwhile, the while circulation of the bottom layer continuously uses the output pointer to read the remote network instruction from the buffer area, and judges the utilization rate of the buffer area according to the comparison of the input pointer and the output pointer position, namely (output pointer position address-input pointer position address)/buffer area size, so as to obtain the data flow which is the remote network data, the network port, the data conversion equipment and the serial port, the micro-grid data, and a minimum time interval is set for the DMA communication module, when the parameter setting is more than or equal to the minimum time interval, the remote network instruction is transferred from the network port to the serial port and is transferred to the micro-grid, when the parameter setting is less than the minimum time interval, the utilization rate of the buffer area is increased, and the data exceeding the buffer area is selected to be retransmitted after the utilization rate reaches 100%.
In the data conversion method, when the wind power converter data is transmitted to the master controller, the wind power converter data in the master controller is intercepted, the wind power converter data is transmitted to the web server embedded in the master controller for processing, and then the wind power converter data is transmitted to the display module of the remote network, so that the micro-grid data is refreshed in real time.
The embedded web server of the master controller sets a dynamic sending area according to the data size actually required to be transmitted by the wind power converter, sequentially codes the first 15 bytes of the dynamic sending area, calculates the actual value of the wind power converter data received by the master controller through high-low data conversion, divides the actual value into a group of 5 bytes each, sequentially writes the group of 5 bytes into the position after the 15 th byte of the dynamic sending area,
the actual value is divided according to the following formula:
Digit1=S_data/10000;
Digit2=(S_data%10000)/1000;
Digit3=(S_data%1000)/100;
Digit4=(S_data%100)/10;
Digit5=S_data%10;
wherein:
s_data: an actual value;
digit1-5: the position of the 5-bit actual value divided into a group;
and finally, the segmented actual values in the dynamic sending area are sent to a remote network in groups through a network port.
The main controller sets the configuration parameters of the protocol stack according to the actual use condition so as to adapt to the use, and the specific parameter settings are as follows:
the number of the receiving and transmitting buffer modules of the Ethernet is set to 40 according to 100Mbps and 921600 baud rate calculation; the keep-alive timer configuration is then set according to the following rules: when the remote network is disconnected, the connection state needs to be inquired circularly in the keep-alive time until the remote state is rapidly resolved so as to release resources and reallocate the memory space;
the TCP send window size, TCP send buffer size, and the number of TCP segments in the queue are calculated according to the following formula:
tcp_mss=1500-40; (MTU-IP header size-TCP header size)
TCP_SND_BUF=20*TCP_MSS;
TCP_WND=15*TCP_MSS;
TCP_SND_QUEUELEN=15*TCP_SND_BUF/TCP_MSS;
Wherein:
tcp_snd_buf: TCP send buffer size;
TCP_SND_QUEUELEN: TCP send queue length;
tcp_mss: maximum TCP send segment;
tcp_wnd: TCP send window size.
The serial port comprises a DMA communication module, a serial port data input module and a serial port data output module, wherein the serial port comprises a network port module, the serial port data input module and the serial port data output module are respectively connected with the main controller through the DMA communication module and are used for data exchange, and the network port module is connected with the main controller and is used for data exchange.
The serial port data input module comprises an input serial port chip and an input optical fiber interface which are connected with each other, and an output end and a resistance end of the input optical fiber interface are connected with the input serial port chip through anti-interference impedance.
The serial port data output module comprises an output serial port chip and an output optical fiber interface which are connected with each other, and an anode of the output optical fiber interface is connected with the output serial port chip through anti-interference impedance.
The network port module comprises a network interface and an isolation transformer, wherein a data transmitting end of the network interface is connected with a data transmitting end of the isolation transformer through a filter and is connected with the main controller; the network interface data receiving end is connected with the data receiving end of the isolation transformer through a filter and is connected with the main controller; an anti-interference impedance is also connected between the network interface and the isolation transformer.
The invention has the advantages and positive effects that:
the invention converts the serial port data of the micro-grid into the network port data to be sent out through the network, and simultaneously receives the remote data instruction back through the network. The system is prepared for real-time and long-distance transmission of big data, has the characteristics of double buffering, high-efficiency and high-speed transmission, configurability and user friendliness, can meet the requirement of big data transmission, and is convenient for big data analysis and the like. Corresponding parameters can be configured according to different converters, and high-accuracy conversion of data can be realized. Meanwhile, the invention is used as a universal serial port and Ethernet conversion platform and is arranged at the communication core position of each component of the micro-grid system, such as a photovoltaic system, an energy storage system and a wind power system, so that the application range is increased and the utilization rate is improved.
Drawings
FIG. 1 is a flow chart of a data conversion method of the present invention;
FIG. 2 is a flow chart of the data conversion method physical buffering and data buffering of the present invention;
FIG. 3 is a schematic diagram of a data conversion device according to the present invention;
FIG. 4 is a circuit diagram of a serial data input module of the data conversion device of the present invention;
FIG. 5 is a circuit diagram of a serial data output module of the data conversion device of the present invention;
fig. 6 is a circuit diagram of a portal module of the data conversion device of the present invention.
Wherein: data stream transmission direction.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and examples.
As shown in fig. 1, the data conversion method for serial port and ethernet according to the present invention comprises the following specific steps:
when the micro-grid data enter the data conversion device through the serial port, physical caching is performed through the serial port, data caching is performed through the main controller, the micro-grid data are sent to the network port, and finally the micro-grid data are transmitted to the remote network from the network port;
when the remote network instruction enters the data conversion device through the network port, the data caching processing is performed through the main controller, the physical caching processing is performed through the serial port, and then the remote network instruction is transmitted to the micro-grid through the serial port.
The serial port adopts a DMA communication module to carry out physical caching, a 16-byte space is used as a caching space in the DMA communication module, when the DMA communication module receives micro-grid data or a remote network instruction, bytes of source data are selected and combined into 16-byte half-word data according to byte channels of the DMA communication module, the DMA communication module is triggered to receive the 16-byte data, and after the completion of data transfer, the next transmission is carried out.
As shown in fig. 2, the data caching method of the master controller specifically includes the following steps:
firstly designing a 10 x 1024 byte buffer area, wherein the buffer area receives micro grid data processed by the buffer area, an input pointer in the buffer area points to the next position, judging whether the input pointer reaches the end of the buffer area, if the input pointer reaches the end of the buffer area, repositioning the input pointer and reporting errors, simultaneously continuously using an output pointer to read the micro grid data from the buffer area by a while circulation of a bottom layer, judging the utilization rate of the buffer area according to the comparison of the positions of the input pointer and the output pointer, namely (output pointer position address-input pointer position address)/buffer area size, and obtaining the far-end network data of which the data flow direction is micro grid data > serial port data conversion equipment > network port >, wherein the utilization rate of the buffer area is low, and the buffer area is stopped;
when the buffer area receives the remote network instruction, the input pointer in the buffer area points to the next position, judges whether the input pointer reaches the end of the buffer area, if the input pointer reaches the end of the buffer area, the input pointer is relocated and reported wrong, meanwhile, the while cycle of the bottom layer continuously uses the output pointer to read the remote network instruction from the buffer area, and judges the utilization rate of the buffer area according to the comparison of the input pointer and the output pointer position, namely (output pointer position address-input pointer position address)/buffer area size, so as to obtain the data flow which is the data flow of the remote network data, the network port, the data conversion equipment and the serial port, and the micro-grid data, and when the parameter setting is more than or equal to 5 milliseconds, the remote network instruction is transferred from the network port to the serial port and is transferred to the micro-grid, when the parameter setting is less than 5 milliseconds, the utilization rate of the buffer area is increased, and after the utilization rate of the buffer area reaches 100%, the data exceeding the buffer area is selected to be retransmitted.
In the data conversion method, when the wind power converter data is transmitted to the master controller, the wind power converter data in the master controller is intercepted, the wind power converter data is transmitted to the web server embedded in the master controller for processing, and then the wind power converter data is transmitted to the display module of the remote network, so that the micro-grid data is refreshed in real time.
The embedded web server of the master controller sets a 276 byte dynamic sending area according to the data size actually required to be transmitted by the wind power converter, writes the front 15 bytes of the dynamic sending area into '0 x2F,0x72,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x2E,0x73,0x 69,0x 00' in sequence, calculates the actual value of the wind power converter data received by the master controller through high-low level data conversion, then divides the actual value into a group of bytes of every 5 bits, sequentially writes the group of bytes into the position after the 15 th byte of the dynamic sending area,
the actual value is divided according to the following formula:
Digit1=S_data/10000;
Digit2=(S_data%10000)/1000;
Digit3=(S_data%1000)/100;
Digit4=(S_data%100)/10;
Digit5=S_data%10;
wherein:
s_data: an actual value;
digit1-5: the position of the 5-bit actual value divided into a group;
and finally, the segmented actual values in the dynamic sending area are sent to a remote network in groups through a network port.
The main controller sets the configuration parameters of the protocol stack according to the actual use condition so as to adapt to the use, and the specific parameter settings are as follows:
the number of the receiving and transmitting buffer modules of the Ethernet is set to 40 according to 100Mbps and 921600 baud rate calculation; the keep-alive timer configuration is then set according to the following rules: when the remote network is disconnected, the connection state needs to be inquired circularly in the keep-alive time until the remote state is rapidly resolved so as to release resources and reallocate the memory space;
the TCP send window size, TCP send buffer size, and the number of TCP segments in the queue are calculated according to the following formula:
tcp_mss=1500-40; (MTU-IP header size-TCP header size)
TCP_SND_BUF=20*TCP_MSS;
TCP_WND=15*TCP_MSS;
TCP_SND_QUEUELEN=15*TCP_SND_BUF/TCP_MSS;
Wherein:
tcp_snd_buf: TCP send buffer size;
TCP_SND_QUEUELEN: TCP send queue length;
tcp_mss: maximum TCP send segment;
tcp_wnd: TCP send window size.
As shown in fig. 3, a data conversion device used between a serial port and an ethernet comprises a serial port, a network port and a master controller, wherein the serial port comprises a DMA communication module, a serial port data input module and a serial port data output module, the network port comprises a network port module, the serial port data input module and the serial port data output module are respectively connected with the master controller through the DMA communication module for data exchange, and the network port module is connected with the master controller for data exchange.
As shown in fig. 4, the serial data input module includes an input serial chip and an input optical fiber interface which are connected with each other, and an output end and a resistance end of the input optical fiber interface are both connected with the input serial chip through anti-interference impedance.
As shown in fig. 5, the serial data output module includes an output serial chip and an output optical fiber interface which are connected with each other, and an anode of the output optical fiber interface is connected with the output serial chip through anti-interference impedance.
As shown in fig. 6, the network port module includes a network interface and an isolation transformer, where a data transmitting end of the network interface is connected to a data transmitting end of the isolation transformer through a filter and is connected to a master controller; the network interface data receiving end is connected with the data receiving end of the isolation transformer through a filter and is connected with the main controller; an anti-interference impedance is also connected between the network interface and the isolation transformer.
The data conversion device supports high-speed Ethernet and serial port bidirectional data conversion, and can quickly convert and access micro-grid data into a network; the remote control and updating of the device can be realized by using a network to remotely update the program; and supporting the dynamic modification of information such as the baud rate of the serial port, the network IP address, the communication port and the like. The device can keep stable operation in the strong electromagnetic interference environment of the micro-grid.
The device adopts a double-buffering and interrupt receiving method, and a buffering mechanism in the method can balance data conversion among different interfaces, so that the phenomenon that a large amount of Ethernet data is lost due to too small buffer area or too slow data receiving is avoided, and the complete transmission of resources is ensured.
The method is applied to the wind power converter of the micro-grid, and can be used for configuring equipment parameters by using a common browser webpage to check data.
The invention converts the serial port data of the micro-grid into the network port data to be sent out through the network, and simultaneously receives the remote data instruction back through the network. The system is prepared for real-time and long-distance transmission of big data, has the characteristics of double buffering, high-efficiency and high-speed transmission, configurability and user friendliness, can meet the requirement of big data transmission, and is convenient for big data analysis and the like. Corresponding parameters can be configured according to different converters, and high-accuracy conversion of data can be realized. Meanwhile, the invention is used as a universal serial port and Ethernet conversion platform and is arranged at the communication core position of each component of the micro-grid system, such as a photovoltaic system, an energy storage system and a wind power system, so that the application range is increased and the utilization rate is improved.
The foregoing describes the embodiments of the present invention in detail, but the description is only a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. All equivalent changes and modifications within the scope of the present invention are intended to be covered by the present invention.

Claims (9)

1. A data conversion method used between serial port and Ethernet is characterized in that: the method comprises the following specific steps:
when the micro-grid data enter the data conversion device through the serial port, physical caching is performed through the serial port, data caching is performed through the main controller, the micro-grid data are sent to the network port, and finally the micro-grid data are transmitted to the remote network from the network port;
when a remote network instruction enters the data conversion device through the network port, firstly carrying out data caching processing through the main controller, then carrying out physical caching processing through the serial port, and then transmitting the remote network instruction to the micro-grid through the serial port;
the data conversion method is implemented by a data conversion device used between a serial port and an Ethernet, the data conversion device comprises a serial port, a network port and a master controller, the serial port comprises a DMA communication module, a serial port data input module and a serial port data output module, the network port comprises a network port module, the serial port data input module and the serial port data output module are respectively connected with the master controller through the DMA communication module for data exchange, and the network port module is connected with the master controller for data exchange.
2. The method for data conversion between serial ports and ethernet as in claim 1, wherein: the serial port adopts a DMA communication module to carry out physical caching, a multi-byte space is used as a caching space in the DMA communication module, when the DMA communication module receives micro-grid data or a remote network instruction, bytes of source data are selected and combined into multi-byte half-word data according to byte channels of the DMA communication module, the DMA communication module is triggered to receive the multi-byte data, and after finishing data transfer, the next transmission is carried out.
3. The method for data conversion between serial ports and ethernet as in claim 1, wherein: the data caching method of the master controller specifically comprises the following steps:
firstly, designing a buffer zone, wherein the buffer zone receives micro-grid data processed by the buffer zone, an input pointer in the buffer zone points to the next position, judging whether the input pointer reaches the end of the buffer zone, if the input pointer reaches the end of the buffer zone, repositioning and reporting errors by the input pointer, simultaneously, continuously using an output pointer by a while circulation of the bottom layer to read the micro-grid data from the buffer zone, judging the utilization rate of the buffer zone according to the comparison of the input pointer and the output pointer, namely (output pointer position address-input pointer position address)/buffer zone size, and obtaining the utilization rate of the buffer zone, wherein the data flow is micro-grid data > serial port > data conversion equipment > network port > far-end network data, the utilization rate of the buffer zone is low, and the buffer zone is stopped;
when the buffer area receives the remote network instruction, the input pointer in the buffer area points to the next position, judges whether the input pointer reaches the end of the buffer area, if the input pointer reaches the end of the buffer area, the input pointer is relocated and reported to be wrong, meanwhile, the while circulation of the bottom layer continuously uses the output pointer to read the remote network instruction from the buffer area, and judges the utilization rate of the buffer area according to the comparison of the input pointer and the output pointer position, namely (output pointer position address-input pointer position address)/buffer area size, so as to obtain the data flow which is the remote network data, the network port, the data conversion equipment and the serial port, and the micro-grid data.
4. The method for data conversion between serial ports and ethernet as in claim 1, wherein: in the data conversion method, when the wind power converter data is transmitted to the master controller, the wind power converter data in the master controller is intercepted, the wind power converter data is transmitted to the web server embedded in the master controller for processing, and then the wind power converter data is transmitted to the display module of the remote network, so that the micro-grid data is refreshed in real time.
5. The method for data conversion between serial ports and ethernet as recited in claim 4, wherein: the embedded web server of the master controller sets a dynamic sending area according to the data size actually required to be transmitted by the wind power converter, sequentially codes the first 15 bytes of the dynamic sending area, calculates the actual value of the wind power converter data received by the master controller through high-low data conversion, divides the actual value into a group of 5 bytes each, sequentially writes the group of 5 bytes into the position after the 15 th byte of the dynamic sending area,
the actual value is divided according to the following formula:
Digit1=S_data/10000;
Digit2=(S_data%10000)/1000;
Digit3=(S_data%1000)/100;
Digit4=(S_data%100)/10;
Digit5=S_data%10;
wherein:
s_data: an actual value;
digit1-5: the position of the 5-bit actual value divided into a group;
and finally, the segmented actual values in the dynamic sending area are sent to a remote network in groups through a network port.
6. The method for data conversion between serial ports and ethernet as in claim 1, wherein: the main controller sets the configuration parameters of the protocol stack according to the actual use condition so as to adapt to the use, and the specific parameter settings are as follows:
the number of the receiving and transmitting buffer modules of the Ethernet is set to 40 according to 100Mbps and 921600 baud rate calculation;
the keep-alive timer configuration is then set according to the following rules: when the remote network is disconnected, the connection state needs to be inquired circularly in the keep-alive time until the remote state is rapidly resolved so as to release resources and reallocate the memory space;
the TCP send window size, TCP send buffer size, and the number of TCP segments in the queue are calculated according to the following formula:
tcp_mss=1500-40; (MTU-IP header size-TCP header size)
TCP_SND_BUF=20*TCP_MSS;
TCP_WND=15*TCP_MSS;
TCP_SND_QUEUELEN=15*TCP_SND_BUF/TCP_MSS;
Wherein:
tcp_snd_buf: TCP send buffer size;
TCP_SND_QUEUELEN: TCP send queue length;
tcp_mss: maximum TCP send segment;
tcp_wnd: TCP send window size.
7. The method for data conversion between serial ports and ethernet as in claim 1, wherein: the serial data input module of the data conversion device comprises an input serial chip and an input optical fiber interface which are connected with each other, and the output end and the resistance end of the input optical fiber interface are connected with the input serial chip through anti-interference impedance.
8. The method for data conversion between serial ports and ethernet as in claim 1, wherein: the serial data output module of the data conversion device comprises an output serial chip and an output optical fiber interface which are connected with each other, and an anode of the output optical fiber interface is connected with the output serial chip through anti-interference impedance.
9. The method for data conversion between serial ports and ethernet as in claim 1, wherein: the network port module of the data conversion device comprises a network interface and an isolation transformer, wherein a data transmitting end of the network interface is connected with a data transmitting end of the isolation transformer through a filter and is connected with a main controller; the network interface data receiving end is connected with the data receiving end of the isolation transformer through a filter and is connected with the main controller; an anti-interference impedance is also connected between the network interface and the isolation transformer.
CN201710271894.1A 2017-04-24 2017-04-24 Data conversion method and device used between serial port and Ethernet Active CN107241382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710271894.1A CN107241382B (en) 2017-04-24 2017-04-24 Data conversion method and device used between serial port and Ethernet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710271894.1A CN107241382B (en) 2017-04-24 2017-04-24 Data conversion method and device used between serial port and Ethernet

Publications (2)

Publication Number Publication Date
CN107241382A CN107241382A (en) 2017-10-10
CN107241382B true CN107241382B (en) 2023-10-03

Family

ID=59984195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710271894.1A Active CN107241382B (en) 2017-04-24 2017-04-24 Data conversion method and device used between serial port and Ethernet

Country Status (1)

Country Link
CN (1) CN107241382B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848169B (en) * 2018-06-21 2019-11-05 科芃智能科技(苏州)有限公司 A kind of data high-speed acquisition method based on industry internet platform
CN109905321B (en) * 2019-02-13 2021-01-05 西安微电子技术研究所 Routing control system for interaction between user-defined high-speed interface and Ethernet
CN111049761B (en) * 2019-12-25 2023-06-20 哈尔滨新中新电子股份有限公司 Data processing method of wireless water controller communication module
CN112698968A (en) * 2020-12-28 2021-04-23 艾体威尔电子技术(北京)有限公司 Method for processing received data between asynchronous communications
CN115086104B (en) * 2022-06-23 2023-11-21 武汉迈威通信股份有限公司 Method for supporting data disconnection retransmission and serial server

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010063110A (en) * 2002-06-06 2010-03-18 Nvidia Corp Gigabit ethernet adapter supporting the iscsi and ipsec protocols
CN103078895A (en) * 2013-02-28 2013-05-01 安徽康海时代科技有限公司 Industrial Ethernet multi-functional double-serial-port server based on MCF52233 (magnetic card file) chip
CN103324178A (en) * 2013-06-14 2013-09-25 南昌大学 Wireless robot long-range control system based on WIFI
CN103595598A (en) * 2013-04-24 2014-02-19 安徽师范大学 Remote transparent transmission serial server based on fiber and control mode thereof
CN204145541U (en) * 2014-10-09 2015-02-04 中国科学院国家授时中心 A kind of Ethernet and serial port protocol conversion equipment
CN105356519A (en) * 2015-12-07 2016-02-24 北京交通大学 AC-DC hybrid micro power grid control method and apparatus
CN106528486A (en) * 2016-11-09 2017-03-22 湖南戈人自动化科技有限公司 Method for exchanging serial port data
CN106571991A (en) * 2016-11-09 2017-04-19 湖南戈人自动化科技有限公司 Method and data for transmitting data

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010063110A (en) * 2002-06-06 2010-03-18 Nvidia Corp Gigabit ethernet adapter supporting the iscsi and ipsec protocols
CN103078895A (en) * 2013-02-28 2013-05-01 安徽康海时代科技有限公司 Industrial Ethernet multi-functional double-serial-port server based on MCF52233 (magnetic card file) chip
CN103595598A (en) * 2013-04-24 2014-02-19 安徽师范大学 Remote transparent transmission serial server based on fiber and control mode thereof
CN103324178A (en) * 2013-06-14 2013-09-25 南昌大学 Wireless robot long-range control system based on WIFI
CN204145541U (en) * 2014-10-09 2015-02-04 中国科学院国家授时中心 A kind of Ethernet and serial port protocol conversion equipment
CN105356519A (en) * 2015-12-07 2016-02-24 北京交通大学 AC-DC hybrid micro power grid control method and apparatus
CN106528486A (en) * 2016-11-09 2017-03-22 湖南戈人自动化科技有限公司 Method for exchanging serial port data
CN106571991A (en) * 2016-11-09 2017-04-19 湖南戈人自动化科技有限公司 Method and data for transmitting data

Also Published As

Publication number Publication date
CN107241382A (en) 2017-10-10

Similar Documents

Publication Publication Date Title
CN107241382B (en) Data conversion method and device used between serial port and Ethernet
CN202870808U (en) FPGA realization device of SPI serial port module
CN201600774U (en) Double-channel automatic meter reading system
CN101719791A (en) Optic fiber transceiver having remote monitoring function and data transmission method
CN203933689U (en) Electric power system high-speed data communication equipment based on FPGA
CN201178481Y (en) Industrial optical fiber Ethernet switch
CN205404700U (en) Take multi -functional FPGA acquisition unit of time reference output
CN209676257U (en) A kind of intelligent station based on HSR looped network is across interval protection system
CN108768530B (en) Data transmission control system and method of optical fiber transceiver
CN203070516U (en) Electric meter reading system based on Ethernet networking architecture
CN202696609U (en) Optical fiber concentrator
CN103368908A (en) Gateway protocol, gateway equipment and electrical equipment control system
CN113573265A (en) General wireless communication module based on oil field net electricity digital equipment
CN102081383B (en) Device and method for secure network protocol for field control
CN110297795B (en) System and method for realizing single-channel serial data transmission based on Ethernet PHY chip
CN210274137U (en) Ethernet remote transmission equipment for railway station radio station control box
CN110417583B (en) Data communication equipment and out-of-band management system
CN205563188U (en) Node state monitoring system based on networking hydraulic turbine
CN206686216U (en) For the data conversion device between serial ports and Ethernet
CN208623394U (en) A kind of network interface concatenation listens to circuit card and telemechanical apparatus intelligent regulator analyzer
CN102591222B (en) Signal processing output method of signal isolation converter
CN116701286B (en) On-line switching system for RS485 communication
CN210167810U (en) Multi-terminal differential protection device capable of freely topological
CN204065259U (en) A kind of Ethernet transmitting device of lightning arrester on-line monitoring equipment
CN202513930U (en) Multi-channel fiber data transmitting device

Legal Events

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