CN104090856A - Method and device for sharing serial port information - Google Patents

Method and device for sharing serial port information Download PDF

Info

Publication number
CN104090856A
CN104090856A CN201410290244.8A CN201410290244A CN104090856A CN 104090856 A CN104090856 A CN 104090856A CN 201410290244 A CN201410290244 A CN 201410290244A CN 104090856 A CN104090856 A CN 104090856A
Authority
CN
China
Prior art keywords
upper computer
software
serial ports
serial port
port information
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.)
Pending
Application number
CN201410290244.8A
Other languages
Chinese (zh)
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201410290244.8A priority Critical patent/CN104090856A/en
Publication of CN104090856A publication Critical patent/CN104090856A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The invention discloses a method and a device for sharing serial port information. The method comprises service software and at least two pieces of upper computer software, wherein the upper computer software and the service software both contain TCP/IP codes, and data is transmitted between the upper computer software and the service software based on a TCP protocol. The method specifically comprises the following steps: the service software is connected with a serial port which communicates with the lower computer equipment, receives communication data transmitted by the serial port and sends the communication data to all connected upper computer software; the upper computer software is connected with the service software through a TCP protocol and receives communication data sent by the service software; and the upper computer software monitors the lower computer equipment according to the communication data. The service software is independently connected with the serial port of the computer, and then the communication information received from the serial port is respectively sent to the software of the plurality of upper computers. The use number of serial ports is reduced, and the overall cost of the equipment is reduced. And the upper computer software only communicates with the service software, so that the serial port configuration efficiency is improved.

Description

Share method and the device of Serial Port Information
Technical field
The present invention relates to Serial Communication field, relate in particular to a kind of method and device of shared Serial Port Information.
Background technology
In conventional art, different upper computer softwares in same computing machine are all by hard-wired for reading of the same communication number in outside, that is: the connection of slave computer equipment is connected with a plurality of serial ports on computing machine by converting interface, different host computers reads respectively the data of different serial ports, obtains the identical data that slave computer transmits by connection.
Above-mentioned method need to take more serial ports, and the computing machine that therefore just need to connect slave computer equipment increases more serial ports board, will increase cost like this.Because needs connect a plurality of serial ports, different upper computer softwares need to configure different Serial Port Informations, causes complicated operation in addition.If more upper computer software is (as more than 4, the serial ports quantity that has exceeded common computer) all need to read serial data, be confined to the reserved board interface quantity of computing machine itself, do not change in the situation of computing machine, by hardware, transfer and cannot realize a plurality of upper computer softwares reading out data simultaneously at all.
Summary of the invention
Based on this, being necessary needs to connect separately a serial ports for each upper computer software in conventional art, a plurality of upper computer softwares connect a plurality of serial ports, cause and need serial ports board many, cost is high, and the problem of serial communication complicated operation, provides a kind of and can make a plurality of host computers by a serial ports, receive method and the device of the shared Serial Port Information of slave computer equipment transmission data.
For realizing the method for a kind of shared Serial Port Information that the object of the invention provides, comprise service software and at least two upper computer softwares, the method specifically comprises the following steps:
Described service software connects the serial ports that carries out communication with slave computer equipment, receives the communication data of described serial ports transmission, and described communication data is sent to all upper computer softwares that are connected;
Described upper computer software connects described service software by Transmission Control Protocol, and receives the described communication data that described service software sends;
Described upper computer software is monitored described slave computer equipment according to described communication data;
In described upper computer software and described service software, all comprise TCP/IP code, between described upper computer software and described service software, based on Transmission Control Protocol, transmit data.
As a kind of embodiment of method of shared Serial Port Information, described service software and described at least two upper computer softwares are arranged in same computing machine.
As a kind of embodiment of method of shared Serial Port Information, described service software is arranged in the first computing machine, and described upper computer software is arranged in other computing machines that are different from described the first computing machine.
As a kind of embodiment of method of shared Serial Port Information, the method is further comprising the steps of:
Described service software is configured, configures the Serial Port Information of the serial ports that described service software need to read;
Described Serial Port Information comprises communication port, and/or baud rate, and/or data bit, and/or check bit.
As a kind of embodiment of method of shared Serial Port Information, the described communication data that all described upper computer softwares receive is the data of the same type of slave computer device transmission.
The device of a kind of shared Serial Port Information based on same inventive concept, comprises computing machine, serial ports, serial ports service module and at least two upper computer module, wherein:
Described serial port setting on computers, for carrying out communication with slave computer equipment;
Described serial ports service module is arranged in described computing machine, for connecting the serial ports that carries out communication with slave computer equipment, receives the communication data of described serial ports transmission, and described communication data is sent to all upper computer module that are connected;
Described upper computer module, for connect described serial ports service module by Transmission Control Protocol, receives the described communication data that described serial ports service module sends, and according to described communication data, described slave computer equipment is monitored;
In described upper computer module and described serial ports service module, all comprise TCP/IP code, between described upper computer module and described serial ports service module, based on Transmission Control Protocol, transmit data.
As a kind of embodiment of device of shared Serial Port Information, described serial ports service module and described at least two upper computer module are arranged in same computing machine.
As a kind of embodiment of device of shared Serial Port Information, described serial ports service module is arranged in the first computing machine, and described upper computer module is arranged in other computing machines that are different from described the first computing machine.
Embodiment as a kind of device of shared Serial Port Information, also comprises configuration module in described computing machine, for described serial ports service module is configured, configure the Serial Port Information of the serial ports that described serial ports service module need to read;
Described Serial Port Information comprises communication port, and/or baud rate, and/or data bit, and/or check bit.
As a kind of embodiment of device of shared Serial Port Information, the described communication data that all described upper computer module receive is the data of the same type of slave computer device transmission.
Beneficial effect of the present invention comprises:
The method of a kind of shared Serial Port Information provided by the invention and device, by service software is connected with serial ports of computers separately, again the communication information receiving from serial ports is sent to respectively a plurality of upper computer softwares, by host computer, communication data is resolved, and slave computer equipment is monitored.Reduce the usage quantity of serial ports, thereby reduced Whole Equipment cost.And all upper computer softwares only need to carry out communication with service software, thereby the repeatedly configuration while having avoided a plurality of upper computer softwares to dock with a plurality of serial ports improves the efficiency of serial ports configuration.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of a specific embodiment of the method for a kind of shared Serial Port Information of the present invention;
Fig. 2 is that the signal of serial communication data in conventional art flows to path profile;
Fig. 3 is that the communication data of a specific embodiment of the method for a kind of shared Serial Port Information of the present invention flows to path profile;
Fig. 4 is service software and the upper computer software location map of a specific embodiment of the method for a kind of shared Serial Port Information of the present invention;
Fig. 5 is service software and the upper computer software location map of another specific embodiment of the method for a kind of shared Serial Port Information of the present invention;
Fig. 6 is the formation schematic diagram of a specific embodiment of the device of a kind of shared Serial Port Information of the present invention;
Fig. 7 is the formation schematic diagram of another specific embodiment of the method for a kind of shared Serial Port Information of the present invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing, the embodiment of the method for shared Serial Port Information of the present invention is described.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The method of the shared Serial Port Information of one embodiment of the invention, comprises service software and at least two upper computer softwares, and as shown in Figure 1, the method specifically comprises the following steps:
S100, service software connects the serial ports that carries out communication with slave computer equipment, receives the communication data of described serial ports transmission, and described communication data is sent to all upper computer softwares that are connected.
It should be noted that herein, service software is stored in computing machine, and operation on computers, receive slave computer equipment and by the serial ports of computing machine, be transferred to the communication data of computing machine, and a plurality of upper computer softwares are connected on described service software simultaneously, by service software, obtain the information of slave computer.And in upper computer software and described service software, all comprise TCP/IP code, between described upper computer software and described service software, based on Transmission Control Protocol, transmit data.
TCP (Transmission Control Protocol transmission control protocol) is a kind of towards connecting (connecting guiding), reliable, IP-based transport layer protocol.TCP communication protocol itself is generally applicable to communicate between different computing machines, but the reliability of the transmission data based on it and can the different software on same computer between the feature that communicates, in the present invention, be applied in the transmission of serial data.
S200, upper computer software connects described service software by Transmission Control Protocol, and receives the described communication data that described service software sends.
S300, upper computer software is monitored described slave computer equipment according to described communication data.
Herein, upper computer software and traditional upper computer software function class seemingly, are resolved the communication data receiving from serial ports, and according to the result parsing, the ruuning situation of slave computer equipment reality are monitored, to send in time warning when pinpointing the problems.
In the embodiment of the present invention, Data Analysis and the work of the monitoring of slave computer equipment is all realized by upper computer software, and service software is only responsible for reading and transmitting of communication data, do not carry out too many data processing, guarantee that data between service software and serial ports read and transmission communication data to the speed of upper computer software.
As shown in Figure 2, in conventional art, slave computer equipment 105 arrives a plurality of serial ports 102 corresponding with upper computer software 101 by connection 104 and converting interface 103 transmission communication data, and upper computer software 101 reads respectively communication data by corresponding serial ports.As shown in this example, comprise four upper computer softwares, upper computer software 1, upper computer software 2, upper computer software 3, upper computer software 4 is corresponding serial ports 1, serial ports 2, serial ports 3 and serial ports 4 respectively.And the modular construction that the method for shared Serial Port Information of the present invention is used, and the path of communication data transmission as shown in Figure 3, slave computer equipment 105 passes through connection 104 by data transmission serial ports 102, wherein serial ports only needs one, after reading the communication data of serial ports transmission by serial ports service software 106 again, send to upper computer software, upper computer software is similarly 4 herein, is respectively host computer 1, host computer 2, host computer 3 and host computer 4.The present embodiment has only been used a serial ports can realize the function that upper computer software obtains communication data, has greatly reduced equipment cost.And with respect to conventional art serial port, the method for the embodiment of the present invention, can be infinitely great to the not restriction in theory of the quantity of upper computer software.And for general computing machine, can only support 4 upper computer softwares in conventional art simultaneously.Make the method for shared Serial Port Information of the present invention more flexible in actual use.
In an embodiment, as shown in Figure 4, described service software and described at least two upper computer softwares are arranged in same computing machine 201 therein.In figure, example has N upper computer software, and upper computer software 1 to host computer N, and wherein, center section has omission.
In another embodiment, as shown in Figure 5, described service software is arranged in the first computing machine 202, and described upper computer software is arranged in the computing machine 203 that is different from described the first computing machine 202.
Certainly, in other embodiments of the invention, part upper computer software and service software are co-located in a computing machine, and also comprise that other upper computer softwares can be step by step in one or more other computing machine.
It should be noted that herein, in the implementation process of the method for shared Serial Port Information of the present invention, first open service software, open server (computing machine).On service software, configure the Serial Port Information (as information such as communication port, baud rate, data bit, check bit) that need to read, then open serial ports, connect with serial ports, read the communication data of serial ports.
After opening service software and serial ports and connecting, open upper computer software again, bring into operation after upper computer software, upper computer software is understood automatically and service software connects, obtain the data that service software transmits out by ICP/IP protocol, without any parameter of configuration.When if upper computer software and service software do not move on same computer, the IP address that upper computer software need to be inputted the computing machine that service software moves just can establish a communications link with service software.Upper computer software receives after communication data, carries out according to demand the operations such as Data Analysis, monitoring.
In conjunction with description above, the described communication data that in the method for shared Serial Port Information of the present invention, all upper computer softwares receive is the data of the same type of slave computer device transmission.A plurality of upper computer softwares are by a serial ports to outside, and the same communication data of slave computer equipment reads.
Based on same inventive concept, the embodiment of the present invention provides a kind of device of shared Serial Port Information, because the principle that this device is dealt with problems is similar to the method for aforementioned a kind of shared Serial Port Information, therefore, the enforcement of this device can realize according to the concrete steps of preceding method, repeats part and repeats no more.
The device of the shared Serial Port Information of one embodiment of the invention, as shown in Figure 6, comprises computing machine 100, serial ports 110, serial ports service module 120 and at least two upper computer module 130.Wherein: serial ports 110 is arranged on computing machine 100, for carrying out communication with slave computer equipment 200; Serial ports service module 120 is arranged in computing machine 100, for connecting the serial ports 110 that carries out communication with slave computer equipment 200, receives the communication data of serial ports 110 transmission, and communication data is sent to all upper computer module that are connected 130; Upper computer module 130, for connect described serial ports service module 120 by Transmission Control Protocol, receives the communication data that serial ports service module 120 sends, and according to communication data, slave computer equipment 200 is monitored.Wherein, in upper computer module 130 and serial ports service module 120, all comprise TCP/IP code, between upper computer module 130 and described serial ports service module, based on Transmission Control Protocol, transmit data.
The device of the shared information of the embodiment of the present invention is realized the function of the service software of preceding method by serial ports service module is set, in other words aforesaid service software is placed in described serial ports service module, serial ports service module is connected with serial ports of computers separately, again the communication information receiving from serial ports is sent to respectively a plurality of upper computer module, by host computer, communication data is resolved, and slave computer equipment is monitored.Reduce the usage quantity of serial ports, thereby reduced Whole Equipment cost.And all upper computer softwares or upper computer module only need with service software in other words serial ports service module carry out communication, thereby the repeatedly configuration while having avoided a plurality of upper computer softwares to dock with a plurality of serial ports improves the efficiency of serial ports configuration.
In the embodiment of the device of a shared Serial Port Information, described serial ports service module 120 and described at least two upper computer module are arranged in same computing machine therein.
In the embodiment of the device of another shared Serial Port Information, described serial ports service module 120 is arranged in the first computing machine, and described upper computer module 130 is arranged in other computing machines that are different from described the first computing machine.And when upper computer module is arranged in the computing machine that is different from serial ports service module place, only need to be in upper computer module 130 the IP address of the computing machine at input string mouth service module place can complete being connected between upper computer module and serial server module.Connect easyly, do not relate to hardware and change, allocative efficiency is high.
In an embodiment, as shown in Figure 7, in computing machine 100, also comprise configuration module 140 therein, for serial ports service module 110 is configured, the Serial Port Information of the serial ports 110 that configuration serial ports service module 110 need to read.Wherein, Serial Port Information comprises communication port, and/or baud rate, and/or data bit, and/or check bit.
And the communication data that all described upper computer module receive is the data of the same type of slave computer device transmission.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (10)

1. a method for shared Serial Port Information, is characterized in that, comprises service software and at least two upper computer softwares, and the method specifically comprises the following steps:
Described service software connects the serial ports that carries out communication with slave computer equipment, receives the communication data of described serial ports transmission, and described communication data is sent to all upper computer softwares that are connected;
Described upper computer software connects described service software by Transmission Control Protocol, and receives the described communication data that described service software sends;
Described upper computer software is monitored described slave computer equipment according to described communication data;
In described upper computer software and described service software, all comprise TCP/IP code, between described upper computer software and described service software, based on Transmission Control Protocol, transmit data.
2. the method for shared Serial Port Information according to claim 1, is characterized in that, described service software and described at least two upper computer softwares are arranged in same computing machine.
3. the method for shared Serial Port Information according to claim 1, is characterized in that, described service software is arranged in the first computing machine, and described upper computer software is arranged in other computing machines that are different from described the first computing machine.
4. the method for shared Serial Port Information according to claim 1, is characterized in that, the method is further comprising the steps of:
Described service software is configured, configures the Serial Port Information of the serial ports that described service software need to read;
Described Serial Port Information comprises communication port, and/or baud rate, and/or data bit, and/or check bit.
5. according to the method for the shared Serial Port Information described in claim 1 to 4 any one, it is characterized in that, the described communication data that all described upper computer softwares receive is the data of the same type of slave computer device transmission.
6. a device for shared Serial Port Information, is characterized in that, comprises computing machine, serial ports, serial ports service module and at least two upper computer module, wherein:
Described serial port setting on computers, for carrying out communication with slave computer equipment;
Described serial ports service module is arranged in described computing machine, for connecting the serial ports that carries out communication with slave computer equipment, receives the communication data of described serial ports transmission, and described communication data is sent to all upper computer module that are connected;
Described upper computer module, for connect described serial ports service module by Transmission Control Protocol, receives the described communication data that described serial ports service module sends, and according to described communication data, described slave computer equipment is monitored;
In described upper computer module and described serial ports service module, all comprise TCP/IP code, between described upper computer module and described serial ports service module, based on Transmission Control Protocol, transmit data.
7. the device of shared Serial Port Information according to claim 6, is characterized in that, described serial ports service module and described at least two upper computer module are arranged in same computing machine.
8. the device of shared Serial Port Information according to claim 6, is characterized in that, described serial ports service module is arranged in the first computing machine, and described upper computer module is arranged in other computing machines that are different from described the first computing machine.
9. the device of shared Serial Port Information according to claim 6, is characterized in that, also comprises configuration module in described computing machine, for described serial ports service module is configured, configures the Serial Port Information of the serial ports that described serial ports service module need to read;
Described Serial Port Information comprises communication port, and/or baud rate, and/or data bit, and/or check bit.
10. according to the device of the shared Serial Port Information described in claim 6 to 9 any one, it is characterized in that, the described communication data that all described upper computer module receive is the data of the same type of slave computer device transmission.
CN201410290244.8A 2014-06-24 2014-06-24 Method and device for sharing serial port information Pending CN104090856A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410290244.8A CN104090856A (en) 2014-06-24 2014-06-24 Method and device for sharing serial port information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410290244.8A CN104090856A (en) 2014-06-24 2014-06-24 Method and device for sharing serial port information

Publications (1)

Publication Number Publication Date
CN104090856A true CN104090856A (en) 2014-10-08

Family

ID=51638573

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410290244.8A Pending CN104090856A (en) 2014-06-24 2014-06-24 Method and device for sharing serial port information

Country Status (1)

Country Link
CN (1) CN104090856A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965808A (en) * 2015-07-07 2015-10-07 力合科技(湖南)股份有限公司 Device for implementing serial port multiplexing and serial port multiplexing method
CN111602375A (en) * 2019-07-03 2020-08-28 深圳市中联创新自控系统有限公司 Data distributor and communication method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202453879U (en) * 2012-02-28 2012-09-26 北京中新创想科技有限公司 Data transmission server
US20130205047A1 (en) * 2004-08-30 2013-08-08 Lantronix, Inc. Secure Communication Port Redirector

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130205047A1 (en) * 2004-08-30 2013-08-08 Lantronix, Inc. Secure Communication Port Redirector
CN202453879U (en) * 2012-02-28 2012-09-26 北京中新创想科技有限公司 Data transmission server

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
亢红波 等: "PLC控制系统中基于OPC技术的多上位机解决方案", 《工业控制计算机》 *
崔鹏: "基于ARM7的无线温度监控系统的上位机开发", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
蔡骏 等: "基于CPCI总线的串口服务器模块设计与实现", 《计算机与网络》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965808A (en) * 2015-07-07 2015-10-07 力合科技(湖南)股份有限公司 Device for implementing serial port multiplexing and serial port multiplexing method
CN104965808B (en) * 2015-07-07 2018-07-10 力合科技(湖南)股份有限公司 It is used to implement the method for the device and serial port of serial port
CN111602375A (en) * 2019-07-03 2020-08-28 深圳市中联创新自控系统有限公司 Data distributor and communication method thereof
WO2021000275A1 (en) * 2019-07-03 2021-01-07 深圳市中联创新自控系统有限公司 Data distributor and communication method therefor
CN111602375B (en) * 2019-07-03 2022-05-03 深圳市中联创新自控系统有限公司 Data distributor and communication method thereof

Similar Documents

Publication Publication Date Title
CN105260337B (en) A kind of automatic addressing method and system of single-chip microcomputer
CN106209812A (en) A kind of method of internet-of-things terminal platform data encapsulation
CN102055687A (en) Internet of things (IOT) access gateway
CN107132808B (en) Programmable controller, control method thereof, and recording medium
CN104936315A (en) Method for transmitting data through WiFi, master device and module devices
CN102447738B (en) A kind of method and device realizing base station remote debugging
CN104579796A (en) Remote network equipment maintenance method, remote network equipment maintenance system and terminal
CN103827760A (en) Method for transmitting a process map via a gateway device
CN103986610A (en) Communication interface matching method, device and controller
CN108614789B (en) Communication system and method of serial port bus with handshake mechanism
CN105357664A (en) Wireless control system and data communication method thereof
CN103532863A (en) Method and device for realizing software stacking
CN109076635A (en) Can redundancy running industrial communication systems, for its operation method and radio-subscriber station
CN104090856A (en) Method and device for sharing serial port information
CN105630718A (en) Electronic device for providing instant switching and sharing of universal serial bus electronic equipment by host
CN104683130A (en) Method for configuring stacking port and equipment
CN104184637A (en) Fully mechanized coal mining face data transmission system and data transmission method thereof
US9413717B2 (en) Apparatus and method for connecting computer networks
CN102694712A (en) Network system and network-to-network bridge
CN102932475A (en) Software design framework of gateway for internet of things
US10554792B2 (en) Multidirectional serial-ethernet data conversion apparatus
CN104917704A (en) Method and system for multiplexing 10GBase-R PCSs and 40GBase-R PCSs in the same architecture
CN105721453A (en) Network isolation system and network videocorder
RU128429U1 (en) SOFTWARE AND HARDWARE COMPLEX OF AUTOMATED DATA EXCHANGE SYSTEMS
CN202856779U (en) Network equipment used for automation network, safe module and automation network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20141008