CN104570881A - Instant messaging method and equipment suitable for single-serial-port equipment and multiple upper computers - Google Patents

Instant messaging method and equipment suitable for single-serial-port equipment and multiple upper computers Download PDF

Info

Publication number
CN104570881A
CN104570881A CN201510030754.6A CN201510030754A CN104570881A CN 104570881 A CN104570881 A CN 104570881A CN 201510030754 A CN201510030754 A CN 201510030754A CN 104570881 A CN104570881 A CN 104570881A
Authority
CN
China
Prior art keywords
host computer
module
monitoring instrument
communication
equipment
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
CN201510030754.6A
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201510030754.6A priority Critical patent/CN104570881A/en
Publication of CN104570881A publication Critical patent/CN104570881A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0428Safety, monitoring
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2612Data acquisition interface

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer And Data Communications (AREA)

Abstract

Disclosed is an intelligent serial port converter suitable for single-serial-port equipment and multiple upper computers. The multiple upper computers comprise a first upper computer and a second upper computer, and the intelligent serial port converter comprises a power module, a central processing unit module, a multi-path analogue switch integrated chip, an RS232 level conversion chip, a failure processing module and an RS232 interface module. The central processing unit module controls and manages the power module, the multi-path analogue switch integrated chip, the RS232 level conversion chip, the failure processing module and the RS232 interface module. The device and method have the advantages that compatibility is achieved, wherein through the equipment, all the upper computers can actively build double-direction data channels with a monitoring instrument, and data recovery needed by the upper computers can be obtained; the stability is achieved, wherein corresponding operation of a certain upper computer on a monitoring instrument cannot disturb other upper computers, and the stability of a monitoring network is ensured; safety is achieved, wherein in the normal working process, an original wire communication mode does not exist among the upper computers, and safety risks of the original wire direct communication are reduced.

Description

Be applicable to instant communication method and the equipment of single serial equipment and many host computers
Technical field
The present invention relates to a kind of for single serial equipment of Environmental Monitoring Network quality control system and the instant communication method of many host computers and equipment.
Background technology
In environment automatic monitoring field, a lot of monitoring instrument is all only containing a digital serial port, master-slave communication agreement is adopted to carry out data transmission, that just means that an instrument can only carry out the asynchronous both-way communication of half-duplex with a host computer, host computer obtains the environmental monitoring data of monitoring instrument by this serial ports, if there is the existence of multiple host computer, then only have wherein host computer can transmitting order to lower levels to this instrument, other host computers then can only monitor the data that instrument returns.
Current country is just being devoted to set up a whole set of data nationwide transmission and networking quality control system, but own data transmission and networking quality control system have been set up in region, some areas, because the serial ports of instrument limits, can only connect a set of network system, that therefore causes local net and country to net is incompatible.
There are four large technological deficiencies in prior art:
1, system stability is limited by local net, once local net breaks down, so national net also cannot obtain data.
2, national net maintenance cost is too high, if local net requires to change to data acquisition, so the data encoding of country's net also will make corresponding amendment.
If 3 local nets carry out networking Quality Control, then national net cannot complete networking Quality Control task.
4, national net and local net between there is the wire UNICOM of data feedback channel, there is potential safety hazard, the high-voltage impact once one of them network happens suddenly, then may cause adverse effect to another one network.
Networking Quality Control refers to the both-way communication of host computer and monitoring instrument, according to current mode, national net cannot transmitting order to lower levels to instrument, therefore cannot complete networking Quality Control task.
Summary of the invention
The object of the invention is the device by increasing a half-duplex asynchronous communication timesharing conversion, solve the incompatibility problem between single serial equipment and many host computers, by the instant communication method between them, make only to carry out both-way communication with multiple host computer containing the monitoring instrument of a serial ports, and it is separate between each host computer, not Existence dependency relationship, makes to set up the transmission of many sets of data and networking quality control system becomes possibility.The present invention, mainly based on communicator serial ports link being carried out to timesharing, i.e. intelligent serial converter, is applicable to solve above-mentioned many network datas incompatibility problem.
Be applicable to the intelligent serial converter of single serial equipment and many host computers, described many host computers comprise host computer one and host computer two, it is characterized in that: described intelligent serial converter comprises power module, CPU module, multiway analog switch integrated chip, RS232 level transferring chip, fault processing module and RS232 interface module, described CPU module control and management power module, multiway analog switch integrated chip, RS232 level transferring chip, fault processing module and RS232 interface module.
The input of described power module application 7.5 ~ 12V/1A Switching Power Supply, obtains 5V voltage by linear voltage changing module and supplies other module work.
Described multiway analog switch integrated chip is the communication switch between host computer and monitoring instrument and between host computer and central processor unit.
RS232 level transferring chip: 5V level signal is converted to RS232 fiduciary level signal to meet RS232 transmission requirement.
Fault processing module: containing multiple normally closed relay, when power fail or fault, connects the two-way data communication passage between monitoring instrument and host computer one automatically, and the upstream data communication channel between unidirectional connection monitoring instrument and host computer two.
When normal communication, host computer one is the same with the priority of host computer two, but during fault, preferential one of them host computer priority traffic of guarantee, in the intelligent serial converter of this design, host computer one is the preferential communication data passage ensured.
RS232 interface module: for connecting the interface module of host computer one, host computer two and monitoring instrument.
Basic process is as follows:
CPU module monitors the order from host computer one or host computer two, produce look-at-me, triggered interrupts handling procedure, the RS232 data channel between CPU module and corresponding host computer is opened by multiway analog switch chip, preserve the order from corresponding host computer, whether follow monitoring instrument in communication, if so, then wait for that other upper machine communication terminates if detecting other host computer simultaneously; If not, connecting the RS232 data channel of this host computer and monitoring instrument by controlling multiway analog switch, issuing the order of preservation to monitoring instrument simultaneously; During this upper machine communication, monitor the communication process of this host computer and monitoring instrument, monitoring instrument is replied time-out or is replied and terminates, then disconnect the data channel of this host computer and monitoring instrument.
So-called reply time-out, refers to the reply that host computer does not receive monitoring instrument in Preset Time one.
Described reply terminates, and refers to host computer after receiving last data recovery, does not have new data recovery in Preset Time two.
Preset Time one and Preset Time two can be arranged respectively, and settings are the integral multiple of 0.1s, and wherein the time controling precision of this intelligent serial converter is 0.05s.
Key point of the present invention is:
1, by above-mentioned data channel time-division principle, the communication compatibility issue between many host computers and single serial ports monitoring instrument is solved.
2, by multiway analog switch chip, isolated the level interference between host computer one, host computer two and monitoring instrument, ensured respective independent communication.
3, adjustable communication time parameter, can adapt to dissimilar monitoring instrument.
4, the memory function of order, ensures that order is not lost.
5, power down, the automatic processing capacity of fault, can ensure the normal communication function of host computer one, improve robustness of the present invention.
Therefore there is following advantage in apparatus of the present invention and the means of communication:
1, compatible: by this equipment, each host computer can initiatively and monitoring instrument set up bidirectional data path, the data recovery needed for obtaining separately.
2, stability: the corresponding operation of certain host computer to monitoring instrument can not disturb other host computers, ensures the stable of monitoring net.
, there is not the mode of original wire UNICOM between multiple host computer, reduce the security risk of the direct UNICOM of original wire in 3, security: when normally working.
Accompanying drawing explanation
Fig. 1 is instant communication method logic relation picture of the present invention.
Fig. 2 is the present invention's intelligence serial converter structured flowchart.
Embodiment
Case study on implementation
As shown in Figure 1, when intelligent converter receives the order of host computer one, triggered interrupts program, intelligent converter stores this order to " host computer one " storage area.Time precision cycle (this is set to 0.05s) scan storage areas is established within intelligent converter, scan-data channel status, if " host computer two " and monitoring instrument are in communication state, then wait for, if do not had, issue directly to monitoring instrument the order that " host computer one " store, locking data channel status simultaneously, timer starts timing.If monitoring instrument in Preset Time one (T1) not response, then removes data channel lock-out state.If there is response, keep data channel unobstructed, simultaneously by signal triggered interrupts Program reset timer; If communication completes, then countless reportedly defeated in data channel, now timer is not reset, will triggering timing interrupt routine when timing reaches Preset Time two (T2), turn-off data passage, removes its locking.
In like manner, when intelligent converter receives the order of " host computer two ", then processing procedure is with host computer one.
Instrument: U.S.'s match is silent flies generation youngster 42i sulfur dioxide monitor, and this instrument command response time is less than 0.3s.
Host computer one: " optically focused environmental protection air automatic monitoring number adopts software " of being developed by Juguang Sci. & Tech. (Hangzhou) Co., Ltd..Be 3s to the response time of instrument.15s sends a subcommand.Most long life order is 10 characters; Instrument feedback message is the longest is 20 characters.
Host computer two: " the environmental air quality monitoring management system " developed by advanced technology research institute of Zhongshan University.Be 3s to instrument response time-out time.15s sends a subcommand.Most long life order is 10 characters; Instrument feedback message is the longest is 20 characters.
Whole communication system baud rate used is 9600, and position of rest is 1, no parity check position.T1 is set to 1s, and T2 is set to 0.1s.Under normal circumstances, when host computer one maximum possible wait command to occur in host computer two turnaround time with instrument communication, now the stand-by period is 0.3*2+ (20*10/9600) s+T2 (unit s); If host computer two sends the order of mistake, then it needs to wait for T1+0.3.As long as because the resolution time of transmission one bit information 1/9600 (s) and native system is 0.05s, therefore set of time T2 can be set to 0.1s; Host computer will receive effective information, then necessarily require T1+0.3 < 3s, and will give the response time that instrument is enough, T1 > 0.3s, therefore can arrange T1 is 1s simultaneously.
Therefore, under normal circumstances, transmitting procedure is as follows:
Host computer one sends order, in the storage space of intelligence serial converter first stored in the order host computer one of host computer one transmission, first judge whether host computer two is following instrument communication, if in communication, after instrument uploading data terminates, so after 0.1s, forward the order of host computer one to instrument, and set up the data channel of instrument with host computer one; If the order of instrument to host computer two does not respond, so after forwarding host computer two orders 1s, forward the order of host computer one to instrument, and set up instrument with host computer one data channel, until this command response terminates or time-out, go round and begin again.
Carry out in Suzhou City and Foshan City's environmental monitoring central station testing with 100,000 communications of process record on the spot, result shows that monitoring instrument to the response of each host computer in time, and host computer obtains the instrument response of complete and accurate.

Claims (7)

1. be applicable to the intelligent serial converter of single serial equipment and many host computers, described many host computers comprise host computer one and host computer two, it is characterized in that: described intelligent serial converter comprises power module, CPU module, multiway analog switch integrated chip, RS232 level transferring chip, fault processing module and RS232 interface module, described CPU module control and management power module, multiway analog switch integrated chip, RS232 level transferring chip, fault processing module and RS232 interface module.
2. the intelligent serial converter being applicable to single serial equipment and many host computers according to claim 1, is characterized in that the input of described power module application 7.5 ~ 12V/1A Switching Power Supply, obtains 5V voltage supply other module work by linear voltage changing module.
3. the intelligent serial converter being applicable to single serial equipment and many host computers according to claim 1, is characterized in that described multiway analog switch integrated chip is the communication switch between host computer and monitoring instrument and between host computer and central processor unit.
4. the intelligent serial converter being applicable to single serial equipment and many host computers according to claim 1, is characterized in that described RS232 level transferring chip: 5V level signal is converted to RS232 fiduciary level signal to meet RS232 transmission requirement.
5. the intelligent serial converter being applicable to single serial equipment and many host computers according to claim 1, it is characterized in that fault processing module: containing multiple normally closed relay, when power fail or fault, two-way data communication passage between automatic connection monitoring instrument and host computer one, and the upstream data communication channel between unidirectional connection monitoring instrument and host computer two.
6. the intelligent serial converter being applicable to single serial equipment and many host computers according to claim 1, is characterized in that RS232 interface module: for connecting the interface module of host computer one, host computer two and monitoring instrument.
7. be applicable to the instant communication method of single serial equipment and many host computers, it is characterized in that said method comprising the steps of: CPU module monitors the order from host computer one or host computer two, produce look-at-me, triggered interrupts handling procedure, the RS232 data channel between CPU module and corresponding host computer is opened by multiway analog switch chip, preserve the order from corresponding host computer, whether detect other host computer follows monitoring instrument in communication simultaneously, if so, then wait for that other upper machine communication terminates; If not, connecting the RS232 data channel of this host computer and monitoring instrument by controlling multiway analog switch, issuing the order of preservation to monitoring instrument simultaneously; During this upper machine communication, monitor the communication process of this host computer and monitoring instrument, monitoring instrument is replied time-out or is replied and terminates, then disconnect the data channel of this host computer and monitoring instrument.
CN201510030754.6A 2015-01-21 2015-01-21 Instant messaging method and equipment suitable for single-serial-port equipment and multiple upper computers Pending CN104570881A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510030754.6A CN104570881A (en) 2015-01-21 2015-01-21 Instant messaging method and equipment suitable for single-serial-port equipment and multiple upper computers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510030754.6A CN104570881A (en) 2015-01-21 2015-01-21 Instant messaging method and equipment suitable for single-serial-port equipment and multiple upper computers

Publications (1)

Publication Number Publication Date
CN104570881A true CN104570881A (en) 2015-04-29

Family

ID=53087234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510030754.6A Pending CN104570881A (en) 2015-01-21 2015-01-21 Instant messaging method and equipment suitable for single-serial-port equipment and multiple upper computers

Country Status (1)

Country Link
CN (1) CN104570881A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105717847A (en) * 2016-04-22 2016-06-29 兰州大学 Technology of remote control on hardware input module and external interface in embedded development

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4653047A (en) * 1985-02-25 1987-03-24 Itt Corporation Communication subsystem
US5404459A (en) * 1992-07-21 1995-04-04 Advanced Micro Devices Serial interface module and method in which the clock is only activated to send a predetermined number of data bits
US20030083024A1 (en) * 2001-10-30 2003-05-01 Lawrence Richenstein Multiple channel wireless communication system
CN101067794A (en) * 2007-06-14 2007-11-07 中兴通讯股份有限公司 Multi-nuclear processor and serial port multiplexing method
CN101123054A (en) * 2007-07-27 2008-02-13 福建佳视数码文化发展有限公司 Sand model image demonstration and operation and control device and image demonstration method
CN101908025A (en) * 2009-06-05 2010-12-08 厦门敏讯信息技术股份有限公司 Serial use-right control device and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4653047A (en) * 1985-02-25 1987-03-24 Itt Corporation Communication subsystem
US5404459A (en) * 1992-07-21 1995-04-04 Advanced Micro Devices Serial interface module and method in which the clock is only activated to send a predetermined number of data bits
US20030083024A1 (en) * 2001-10-30 2003-05-01 Lawrence Richenstein Multiple channel wireless communication system
CN101067794A (en) * 2007-06-14 2007-11-07 中兴通讯股份有限公司 Multi-nuclear processor and serial port multiplexing method
CN101123054A (en) * 2007-07-27 2008-02-13 福建佳视数码文化发展有限公司 Sand model image demonstration and operation and control device and image demonstration method
CN101908025A (en) * 2009-06-05 2010-12-08 厦门敏讯信息技术股份有限公司 Serial use-right control device and method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
吴军辉等: "RS485总线通信避障及其多主发送的研究", 《测控技术》 *
朱耀春等: "RS485总线通信双机监控程序的设计及应用", 《工业控制计算机》 *
翁正明: "监控计算机双机热备的设计", 《自动化仪表》 *
郭云峰等: "基于串口服务器的水电站双机热备软件的设计与实现", 《中国农村水利水电》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105717847A (en) * 2016-04-22 2016-06-29 兰州大学 Technology of remote control on hardware input module and external interface in embedded development
CN105717847B (en) * 2016-04-22 2019-11-12 兰州大学 The long-range control method of hardware input module and external interface in embedded development

Similar Documents

Publication Publication Date Title
US20180088642A1 (en) Data transferring method based on protection and control system for intelligent substation
CN103135732B (en) Server cabinet system
CN102449621B (en) Node controller chain switching method, processor system, and nodes
CN102281178A (en) Ring network link redundancy control system and control method thereof
CN103746927A (en) Priority-based fluid control PFC (Power Factor Correction) method, transmitting device and receiving device
KR102313705B1 (en) Method of handling power failure and method and device of obtaining connection relationship
CN106487721A (en) The network equipment and the message forwarding method being used in the network equipment
CN203466841U (en) Automatic switching device for monitoring of data network link
CN205247171U (en) Fortune coal control system based on field bus technique
CN104570881A (en) Instant messaging method and equipment suitable for single-serial-port equipment and multiple upper computers
CN107181702B (en) Device for realizing RapidIO and Ethernet fusion exchange
CN105515928B (en) Manned spacecraft information network system
CN102866698B (en) Human machine interface (HMI) redundant communication method for distributed control system controller
CN106557362A (en) It is applied to the task immigration method and system of intelligent robot
CN202261334U (en) Looped network link redundancy control system
CN103401748A (en) Shield machine hot standby control system and method
CN101605076B (en) Testing access point and data link monitoring method
CN104698916B (en) Method for operation automation device
CN110247809A (en) Bicyclic network control system and communication control method
CN105512064A (en) Online loading system for configuration information of communication controller and method for same
CN105721169A (en) Cloud manufacturing-oriented adaptive access device for 3D printing
CN102571412B (en) Target machine server of embedded distributed system
CN106304241A (en) A kind of data transmission method, transponder and gateway
CN110798390B (en) Communication system and communication method for power supply and distribution system of submarine observation network
CN205123764U (en) Possess optoelectronic isolation and prevent that RS485 communication bus from accounting for electric power instrument of dead trouble function

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: 20150429