CN103389960B - Power monitoring field realizes the method and device of baud rate self-adapting - Google Patents

Power monitoring field realizes the method and device of baud rate self-adapting Download PDF

Info

Publication number
CN103389960B
CN103389960B CN201310319482.2A CN201310319482A CN103389960B CN 103389960 B CN103389960 B CN 103389960B CN 201310319482 A CN201310319482 A CN 201310319482A CN 103389960 B CN103389960 B CN 103389960B
Authority
CN
China
Prior art keywords
baud rate
sequence
data
protocol
adapting
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
CN201310319482.2A
Other languages
Chinese (zh)
Other versions
CN103389960A (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.)
Conway Communication Technology Co Ltd
Original Assignee
Shandong Conwell Communication Technology 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 Shandong Conwell Communication Technology Co Ltd filed Critical Shandong Conwell Communication Technology Co Ltd
Priority to CN201310319482.2A priority Critical patent/CN103389960B/en
Publication of CN103389960A publication Critical patent/CN103389960A/en
Application granted granted Critical
Publication of CN103389960B publication Critical patent/CN103389960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Communication Control (AREA)

Abstract

The invention discloses a kind of power monitoring field and realize the method and device of baud rate self-adapting, including selected communication protocol;Set baud rate sequence;Set baud rate sequence sequence number;The baud rate of corresponding sequence number in baud rate sequence is used to open serial ports;Send protocol data to monitoring device;Receive the protocol data that monitoring device returns;Analyze the identity judging data;Receive data not can recognize that, then closing serial ports, then baud rate sequence sequence number adds one;Receive data consistent with expection, preserve this baud rate as communication baud rate.The method have the benefit that the method can realize monitoring field and control the baud rate self-adapting between equipment and monitoring device, the apparatus structure that the power monitoring field of the present invention realizes baud rate self-adapting is simple, improves Consumer's Experience comfort level.

Description

Power monitoring field realizes the method and device of baud rate self-adapting
Technical field
The invention belongs to power monitoring field, particularly relate to a kind of power monitoring field and realize the method and device of baud rate self-adapting.
Background technology
Now with the development of power monitoring technology and improving constantly of power monitoring field requirement, in serial communication mode, more Carry out the most application requirements and there is the function of baud rate self-adapting.Control equipment can compatible multiple baud rate communication, but monitoring set Standby a kind of baud rate of only support, communicating pair is only in the case of using identical baud rate communication, and monitoring device could be correct Action, it is therefore necessary to first setting corresponding baud rate by regulation, but setting up procedure complexity is high, strongly professional, user is difficult to Operation, brings great inconvenience to universal use.It addition, for making user understand the size of baud rate, must also be in monitoring device Or the clear and definite size pointing out used baud rate in the workbook of monitoring device, and concrete amending method, simultaneously must also Professional participates in arranging and instructing, and this considerably increases the expense of human and material resources and time, improves use cost.
Summary of the invention
The purpose of the present invention is contemplated to solve technological deficiency present in prior art, it is proposed that a kind of power monitoring field realizes The method and device of baud rate self-adapting.The method can realize monitoring field and control the baud rate between equipment and monitoring device certainly Adapt to, improve the motility that monitoring device uses.
To achieve these goals, the present invention adopts the following technical scheme that
A kind of method that power monitoring field realizes baud rate self-adapting, comprises the following steps:
(1) selected communication protocol;
(2) baud rate sequence is set;
(3) baud rate sequence sequence number is set;
(4) baud rate of corresponding sequence number in baud rate sequence is used to open serial ports;
(5) protocol data is sent to monitoring device;
(6) protocol data that monitoring device returns is received;
(7) analysis judges the identity of data;
(8) receive data not can recognize that, then closing serial ports, then baud rate sequence sequence number adds one;
(9) receive data consistent with expection, preserve this baud rate as communication baud rate.
Described communication protocol selected, using heart beating, shake hands, log in, startup etc. will not produce the agreement of impact as examination to behavior The property visited agreement, protocol requirement has return, and protocol contents is in predictable range.
Described baud rate sequence is:
B115200,B9600,B19200,B38400,B57600,B50,B75,B110,B134,B150,B300,B600, B1200, B1800, B2400, B4800, B7200, B230400, B460800, B921600, for reducing the exploration cycle, the most the most frequently used Baud rate be placed on foremost.
The identity of described data is: according to selected communications protocol format, if setting the baud rate of baud rate and monitoring device not Correspondence, then no return code, or return code is mess code, not can recognize that, then forwards step 8 to, then go to step 4, with the next one Baud rate opens serial ports, then attempts, if return code baud rate is consistent with intended, then preserves this baud rate for communication baud Rate.
A kind of power monitoring field realizes the device of baud rate self-adapting, including: protocol process module: for the choosing of communication protocol Fixed, and set point value is sent to baud rate chosen module;Baud rate chosen module: corresponding for finding in baud rate sequence Baud rate value, and this value is transmitted to serial ports processing module;Serial ports processing module: the serial ports for monitoring device is opened and closed Operation process, and be in communication with each other with data judging module;Data judging module: for monitoring device return data judgement and Identify, and result of determination is sent to data memory module;Data memory module: be used for storing, examines data judging module After baud rate store.
The invention has the beneficial effects as follows:
Use the method realizing baud rate self-adapting provided by the present invention can realize monitoring field control equipment and monitoring device it Between baud rate self-adapting, improve monitoring device use motility, the method can be widely applied to support baud rate monitoring In equipment, it is fully transparent for arranging operation, and user need not understand in advance the baud rate parameter of monitoring device, substantially increases Utilization rate, saves human and material resources and the time cost of equipment manufacturer.It is adaptive that the power monitoring field of the present invention realizes baud rate The apparatus structure answered is simple, utilizes existing data judging module to realize, and reduces hardware production and workbook is printed to This, improve Consumer's Experience comfort level.
Accompanying drawing illustrates:
Fig. 1 is the flowchart for realizing baud rate self-adapting that the present invention implements;
Fig. 2 is the apparatus structure schematic diagram for realizing baud rate adaptation that the present invention implements.
Detailed description of the invention:
The present invention will be further described with embodiment below in conjunction with the accompanying drawings:
As it is shown in figure 1, a kind of method that power monitoring field realizes baud rate self-adapting, including:
1. select communication protocol.Selected communication protocol, with heart beating, shakes hands, logs in, starts, and these four will not be to monitoring device Behavior produces the agreement of impact, and for exploratory agreement, protocol requirement has return, and protocol contents is in predictable range.
2. set baud rate sequence.All possible baud rate size is all set in sequence,
(B115200,B9600,B19200,B38400,B57600,B50,B75,B110,B134,B150,B300,B600,B1200,B1800,B240 0, B4800, B7200, B230400, B460800, B921600), for reducing the exploration cycle, the most frequently used baud rate is placed on foremost.
3. set baud rate sequence sequence number.Baud rate chosen module is responsible for choosing of baud rate, it is first determined baud rate is in the sequence Corresponding sequence number, takes out the baud rate value that this sequence number is corresponding, if this value is incorrect, then sequence number adds 1, i.e. takes under current sequence number The baud rate value that one sequence number is corresponding.
4. use the baud rate of corresponding sequence number in baud rate list to open serial ports.By protocol process module, selected baud rate is sent To serial ports processing template, it open serial ports with this baud rate.
5. send protocol data.Selected agreement is sent to monitoring device by protocol process module.
6. receive protocol data.Protocol process module receives the protocol data that monitoring device returns, and reception data are transmitted to number According to determination module.
7. receive data identity.After data judging module receives return data, according to selected communication protocol, it is judged that it returns Correctness, if it is consistent with intended to receive data, it was demonstrated that this baud rate correctly, is transmitted to memory module by this baud rate.
8. preserve this baud rate as communication baud rate.Preserved this baud rate by data memory module, set with monitoring at control equipment For when communicating, communicate using this baud rate as communication baud rate.
9. baud rate serial number adds one.After data judging module receives return data, according to selected communication protocol, it is judged that it returns The correctness returned, not can recognize that if receiving data, it was demonstrated that this baud rate is incorrect, then add one by serial number, takes out next sequence Number corresponding baud rate, then turns to step 4, continues.
Fig. 2 show the power monitoring field of the present invention and realizes the device of baud rate self-adapting, and described device includes: protocol processes Module, after control equipment is connected with monitoring device, after controlling the equipment start-up loading related driver programs of monitoring device, i.e. Establishing communication port between the two, after communication is established, control equipment i.e. starts protocol process module to select communication protocol, Communication protocol based on heart beating, shake hands, log in, start agreement, these agreements will not produce impact to monitoring device behavior, can Using as exploratory agreement, protocol requirement has return, and protocol contents is in predictable range.
Baud rate chosen module: in time taking out corresponding baud rate value in baud rate sequence, and this value is transmitted at serial ports Reason module.
Serial ports processing module: the opening and closing for serial ports operate, and are receiving the baud rate that baud rate chosen module forwards After value, i.e. use this baud rate to open serial ports, after the wrongheaded instruction of the baud rate receiving data judging module, close string Mouthful.
Data judging module: for judging the correctness of baud rate, after receiving the data that monitoring device returns, it is judged that data lattice Formula, if these data are consistent with the agreement that selected communication protocol requirements returns, then prove that this baud rate is correct, and notifies that data are deposited The baud rate that this baud rate value is communicated with monitoring device by storage module as control equipment;If it is inconsistent, then with intended return value Prove this baud rate mistake, and notify that serial ports processing module closes current serial ports, reinform baud rate chosen module, under going to select One baud rate is attempted again.
Data memory module: for the preservation of baud rate, receiving confirmation instruction and the baud rate that data judging module forwards comes After, this baud rate is saved in control equipment, normal course of communications afterwards all obtains at this baud rate value and opens serial ports Communicate, baud rate judgement work that need not be initial.
Although the detailed description of the invention of the present invention is described by the above-mentioned accompanying drawing that combines, but not limit to scope System, one of ordinary skill in the art should be understood that on the basis of technical scheme, and those skilled in the art need not pay Go out various amendments or deformation that creative work can make still within protection scope of the present invention.

Claims (2)

1. the method that power monitoring field realizes baud rate self-adapting, is characterized in that, comprises the following steps:
(1) selected communication protocol;Described communication protocol selected, behavior will not produce the agreement of impact as exploratory agreement, protocol requirement has return, and protocol contents is in predictable range;
(2) baud rate sequence is set;
(3) baud rate sequence sequence number is set;
(4) baud rate of corresponding sequence number in baud rate sequence is used to open serial ports;
(5) protocol data is sent to monitoring device;
(6) protocol data that monitoring device returns is received;
(7) analysis judges the identity of data;The identity of described data is: according to selected communications protocol format, if it is the most corresponding with the baud rate of monitoring device to set baud rate, then no return code, or return code is mess code, not can recognize that, then forward step 8 to, then go to step 4, open serial ports by next baud rate, then attempt, if return code baud rate is consistent with intended, then preserving this baud rate is communication baud rate;
(8) receive data not can recognize that, then closing serial ports, then baud rate sequence sequence number adds one.
The method that a kind of power monitoring field the most as claimed in claim 1 realizes baud rate self-adapting, is characterized in that, described baud rate sequence is: B115200, B9600, B19200, B38400, B57600, B50, B75, B110, B134, B150, B300, B600, B1200, B1800, B2400, B4800, B7200, B230400, B460800, B921600, for reducing the exploration cycle, the most frequently used baud rate is placed on foremost.
CN201310319482.2A 2013-07-26 2013-07-26 Power monitoring field realizes the method and device of baud rate self-adapting Active CN103389960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310319482.2A CN103389960B (en) 2013-07-26 2013-07-26 Power monitoring field realizes the method and device of baud rate self-adapting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310319482.2A CN103389960B (en) 2013-07-26 2013-07-26 Power monitoring field realizes the method and device of baud rate self-adapting

Publications (2)

Publication Number Publication Date
CN103389960A CN103389960A (en) 2013-11-13
CN103389960B true CN103389960B (en) 2016-08-10

Family

ID=49534237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310319482.2A Active CN103389960B (en) 2013-07-26 2013-07-26 Power monitoring field realizes the method and device of baud rate self-adapting

Country Status (1)

Country Link
CN (1) CN103389960B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199298B (en) * 2014-08-18 2016-10-26 广西师范大学 A kind of method of CAN baud rate self-adapting
CN104850527B (en) * 2015-06-12 2017-11-03 中国电子科技集团公司第四十七研究所 Communications protocol processor
CN105376066B (en) * 2015-12-15 2018-09-28 上海斐讯数据通信技术有限公司 The verification method and verification system of serial communication
CN107783434A (en) * 2016-08-30 2018-03-09 致伸科技股份有限公司 Automatic control system and the instrument method for automatically searching being applied thereon
CN106788920B (en) * 2016-12-19 2019-08-23 珠海格力电器股份有限公司 Baud rate deviation detection method and device and air conditioner indoor unit
CN108845897A (en) * 2018-05-25 2018-11-20 北京无线电测量研究所 Serial communication adjustment method, device and storage medium
CN108966251A (en) * 2018-07-12 2018-12-07 四川虹美智能科技有限公司 A kind of WiFi module baud rate collocation method, system and WiFi module
CN109634884A (en) * 2018-10-19 2019-04-16 珠海格力电器股份有限公司 Communication port connection method and device
CN109976247A (en) * 2019-04-22 2019-07-05 国网上海市电力公司 A kind of power distribution station communication failure automatic monitored control system and method
CN112463696A (en) * 2020-08-11 2021-03-09 上海麦腾物联网技术有限公司 Serial port baud rate self-adaption method
CN113542030A (en) * 2021-07-20 2021-10-22 深圳市泛海三江电子股份有限公司 Intelligent networking method and communication device based on networking communication of fire fighting system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060362A (en) * 2007-04-13 2007-10-24 北京神州天鸿科技有限公司 Satellite communication system-based multiple data service system
CN102231667A (en) * 2011-07-29 2011-11-02 飞天诚信科技股份有限公司 Method and device for registering serial device
CN102270168A (en) * 2011-08-09 2011-12-07 西安辉炜信息科技有限公司 Method for automatically detecting serial port information
CN103001734A (en) * 2012-10-17 2013-03-27 海军工程大学 Method for automatically detecting asynchronous serial port communication protocol on basis of level sampling

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060362A (en) * 2007-04-13 2007-10-24 北京神州天鸿科技有限公司 Satellite communication system-based multiple data service system
CN102231667A (en) * 2011-07-29 2011-11-02 飞天诚信科技股份有限公司 Method and device for registering serial device
CN102270168A (en) * 2011-08-09 2011-12-07 西安辉炜信息科技有限公司 Method for automatically detecting serial port information
CN103001734A (en) * 2012-10-17 2013-03-27 海军工程大学 Method for automatically detecting asynchronous serial port communication protocol on basis of level sampling

Also Published As

Publication number Publication date
CN103389960A (en) 2013-11-13

Similar Documents

Publication Publication Date Title
CN103389960B (en) Power monitoring field realizes the method and device of baud rate self-adapting
CN104331312B (en) A kind of firmware upgrade method and embedded device
EP3731446B1 (en) Method for transmitting uplink data and terminal device
EP3965481B1 (en) Signal transmission method and network device
US11877348B2 (en) Receive operation mode indication for power save
US20200351842A1 (en) Transmission Configuration Indication Switching Procedure In New Radio Mobile Communications
CN204652379U (en) A kind of wireless communication module based on the Lora communication technology
CN109245199A (en) Charging method, charging unit, power supply provide equipment and terminal to be charged
US10069661B2 (en) Communication method and communication node for device-to-device direct communication
CN105468466B (en) Processing method, the device and system of processor running frequency
CN103748949B (en) PRACH resource allocation methods, equipment and the system of LTE system
BR112019026631A2 (en) data transmission method and terminal device
US20210250965A1 (en) Method, terminal device and network device for transmitting channels
CN108521647A (en) A kind of matching method and bluetooth master of bluetooth SIM card
CN104270188A (en) Beidou satellite communication equipment
CN110209619A (en) The method and relevant apparatus of Auto-matching polytypic driver
CN110859058B (en) Additional security capability indication method and device in 5G mobile communication
CN105517127A (en) Method and device for controlling carrier aggregation function
CN103354513A (en) Flow monitoring method and mobile terminal
CN206470768U (en) The authentication device of built-in electronic ID card information
WO2017012090A1 (en) Method and device for configuring downlink demodulation reference signal (dmrs) port
CN107257586B (en) Mobile network connection method and system when intelligent terminal is connected with WiFi
CN104320530B (en) A kind of smart mobile phone for starting guiding dependent on external Universal Integrated Circuit Card
CN204178362U (en) A kind of multifunctional portable data card
CN110597492B (en) Module calling method and related products

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Method and device for self-adapting of Baud rate in field of power monitoring

Effective date of registration: 20170426

Granted publication date: 20160810

Pledgee: Shandong yamakou Leasing Co. Ltd.

Pledgor: Shandong Conwell Communication Technology Co., Ltd.

Registration number: 2017370000048

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20200805

Granted publication date: 20160810

Pledgee: Shandong yamakou Leasing Co.,Ltd.

Pledgor: SHANDONG KANGWEI COMMUNICATION TECHNOLOGY Co.,Ltd.

Registration number: 2017370000048

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 250101 A203, block F, entrepreneurship square, Qilu Software Park, No.1 Shunhua Road, high tech Development Zone, Jinan City, Shandong Province

Patentee after: Conway Communication Technology Co., Ltd

Address before: 250101 Qilu Software Park, No. 1 Shunhua Road, Jinan High-tech Development Zone, Shandong Province, A 203

Patentee before: SHANDONG KANGWEI COMMUNICATION TECHNOLOGY Co.,Ltd.