CN107920008B - Communication means and device for RS485 network - Google Patents

Communication means and device for RS485 network Download PDF

Info

Publication number
CN107920008B
CN107920008B CN201711086330.7A CN201711086330A CN107920008B CN 107920008 B CN107920008 B CN 107920008B CN 201711086330 A CN201711086330 A CN 201711086330A CN 107920008 B CN107920008 B CN 107920008B
Authority
CN
China
Prior art keywords
equipment
data frame
time interval
network
communication
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
CN201711086330.7A
Other languages
Chinese (zh)
Other versions
CN107920008A (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.)
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 CN201711086330.7A priority Critical patent/CN107920008B/en
Publication of CN107920008A publication Critical patent/CN107920008A/en
Application granted granted Critical
Publication of CN107920008B publication Critical patent/CN107920008B/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
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial bus
    • H04L12/40078Bus configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/403Bus networks with centralised control, e.g. polling
    • H04L12/4035Bus networks with centralised control, e.g. polling in which slots of a TDMA packet structure are assigned based on a contention resolution carried out at a master unit

Abstract

The invention discloses a kind of communication means and device for RS485 network, wherein this method comprises: at least partly communication time interval of equipment in detection RS485 network;And when obtaining data at least partly from equipment in the equipment from RS485 network, equipment for having determined that communication time interval obtains data according to the communication time interval of equipment from the equipment.The present invention solves the problems, such as that RS485 network acquisition data efficiency is not high and real-time is lower, improves RS485 network and obtains the communication efficiency of data and improve real-time property.

Description

Communication means and device for RS485 network
Technical field
The present invention relates to fields of communication technology, in particular to a kind of communication means and dress for RS485 network It sets.
Background technique
In the system-level project of certain large sizes, for example energy management system includes that electrical equipment, generating equipment, storage are set It is standby etc., and it is key point that the stable data communication of electricity statistical management is carried out to various kinds of equipment.Ammeter, the gas of monitoring device The measuring equipments such as table, weather station are that the source of data is obtained in management system.
In the related technology, what equipment itself and application environment used is substantially RS485 communication modes, and this principal and subordinate's is logical News mode construction is simple, communication distance are remote.RS485 communication modes need to constantly call the roll equipment by data gateway, obtain each The data of equipment, reprocessing are forwarded to application layer parsing and management.
Gateway is usually all the data for going to read each equipment by certain time interval, and the communication speed of each equipment Difference, if gateway is called the roll, interval is faster than the slow equipment of certain data communications, just will appear data recovery entanglement, causes data different Often.So general gateway is called the roll according to the most slow equipment of communication speed in whole system, thus inevitably There is delay to system data, real-time property has discount.During doing data communication rate-matched, manpower is had unavoidably Waste.
It is not high real-time with acquisition data for communication efficiency when obtaining data at RS485 equipment in network in the related technology Property poor technical problem, not yet propose to efficiently solve scheme at present.
Summary of the invention
The present invention provides a kind of communication means and device for RS485 network, at least solve in the related technology from Communication efficiency is not high when obtaining data at RS485 equipment in network and obtains the poor technical problem of real-time property.
In order to solve the above technical problems, according to an aspect of an embodiment of the present invention, providing a kind of for RS485 network Communication means, this method comprises: in detection RS485 network at least partly equipment communication time interval;And when from When data are obtained in the equipment of RS485 network at least partly at equipment, the equipment for having determined that communication time interval, according to setting Standby communication time interval obtains data from the equipment.
In certain embodiments, the communication time interval of at least partly equipment in RS485 network is detected can include: for Each equipment in RS485 network at least partly in equipment: it to equipment sending point name data frame and records and sends described concrete number According to the first time of frame;It receives the reply data frame of equipment transmission and records and receive second time for replying data frame; And determine the communication time interval the time interval between the second time for the equipment at the first time.
In certain embodiments, for each equipment in RS485 network at least partly in equipment, further includes: judgement is The no reply data frame for receiving equipment transmission in the given time, if not receiving equipment hair within the predetermined time The reply data frame sent determines that the equipment is faulty equipment;And/or judge whether the reply data frame received is correct, if The reply data frame received is incorrect, determines that the equipment is faulty equipment.
In certain embodiments, the above method may also include that the equipment for not determining communication time interval, according to this The maximum communication time interval of RS485 network obtains data from the equipment.
In certain embodiments, according to repeatedly to equipment sending point name data frame and receiving the equipment and receive reply number The communication time interval of the equipment is determined according to the time interval between frame.
In order to solve the above technical problems, other side according to an embodiment of the present invention, provides a kind of for RS485 net The communication device of network, the device include: detection module, for detecting in RS485 network between at least partly call duration time of equipment Every;And module is obtained, for when obtaining data at least partly from equipment in the equipment from the RS485 network, for really The equipment for determining communication time interval obtains data according to the communication time interval of equipment from the equipment.
In certain embodiments, the detection module can be used for setting at least partly each of equipment in RS485 network It is standby, the first time of the roll-call data frame is sent to equipment sending point name data frame and recording, receives time of equipment transmission Complex data frame simultaneously records the second time for receiving the reply data frame, and determines the first time and second time Between time interval be the equipment communication time interval.
In certain embodiments, detection module, it may also be used for judge whether to receive equipment hair in the given time The reply data frame sent determines the equipment if not receiving the reply data frame of equipment transmission within the predetermined time For faulty equipment;And/or whether the reply data frame for judging to receive is correct, if the reply data frame received is not Correctly, determine that the equipment is faulty equipment.
In certain embodiments, the acquisition module, it may also be used for the equipment for not determining communication time interval, according to institute The maximum communication time interval for stating RS485 network obtains data from the equipment.
In certain embodiments, the detection module, can be used for according to repeatedly to equipment sending point name data frame with receive The equipment, which receives, replys the communication time interval that the time interval between data frame determines the equipment.
In the present invention, the communication time interval for detecting RS485 equipment in network, when obtaining data from equipment, according to The communication time interval of equipment obtains data from the equipment, improves communication efficiency and data that RS485 network obtains data Real-time.
Detailed description of the invention
Fig. 1 is the schematic diagram for obtaining data in RS485 network in the related technology;
Fig. 2 is the flow chart of the communication means provided in an embodiment of the present invention for RS485 network;
Fig. 3 is the schematic diagram that data are obtained in a kind of RS485 network of the embodiment of the present invention;
Fig. 4 is the communication device block diagram provided in an embodiment of the present invention for RS485 network;And
Fig. 5 is the schematic diagram of gateway provided in an embodiment of the present invention.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Fig. 1 is the schematic diagram for obtaining data in RS485 network in the related technology, as shown in Figure 1, must debug out difference first The call duration time of equipment detects, and calculates the maximum communication time interval of RS485 equipment in network and (is denoted as Tmax), then according to The each equipment of largest interval time poll roll-call, the time that such whole system data transmit one time is N*Tmax.The relevant technologies In when obtaining data from RS485 equipment in network, it is not high there are communication efficiency and obtain the poor technology of real-time property and ask Topic.
In order to solve the above technical problems, providing a kind of communication means for RS485 network according to embodiments of the present invention.
Fig. 2 is the flow chart of the communication means provided in an embodiment of the present invention for RS485 network, as shown in Fig. 2, the party Method includes: step S202 to step S204.
Step S202 detects the communication time interval of at least partly equipment in RS485 network.
Step S204 is logical for having determined that when obtaining data at least partly from equipment in the equipment from the RS485 network The equipment for believing time interval, obtains data according to the communication time interval of equipment from the equipment.
Technical solution through the embodiment of the present invention detects the communication time interval of RS485 equipment in network, from equipment When obtaining data, data are obtained from the equipment according to the communication time interval of equipment, improves in RS485 network and obtains data Communication efficiency.
In certain embodiments, in above-mentioned steps S202, at least partly each of equipment in RS485 network is set It is standby, can detection device by the following method communication time interval:
Step A, to equipment sending point name data frame and record send the roll-call data frame first time.
Step B receives the reply data frame of equipment transmission and records the second time for receiving the reply data frame.And
Step C determines the communication time interval at the first time the time interval between the second time for the equipment.
In certain embodiments, it before step B, also can determine whether to receive equipment transmission in the given time Reply data frame.If not receiving the reply data frame of equipment transmission within the predetermined time, it may be determined that the equipment is event Hinder equipment.If receiving the reply data frame of equipment transmission within the predetermined time, step B can be performed.
In certain embodiments, before step B, also can determine whether the reply data frame received is correct, if connect The reply data frame received is incorrect, it may be determined that the equipment is faulty equipment.If the reply data frame received is correct, can hold Row step B.
In certain embodiments, it before step B, also can determine whether to receive equipment transmission in the given time Reply data frame.If receiving the reply data frame of equipment transmission within the predetermined time, the reply received can determine whether Whether data frame is correct, if the reply data frame received is incorrect, it may be determined that the equipment is faulty equipment.If pre- at this The reply data frame received in fixing time is correct, and step B can be performed.
In certain embodiments, the communication time interval of above method detection device can be performed a plurality of times, according to repeatedly to setting Preparation, which send roll-call data frame and receives the equipment, receives the communication that the time interval between reply data frame determines the equipment Time interval.For example, when can choose the communication of maximum time interval in the multiple time intervals detected as the equipment Between be spaced, but not limited to this.
In certain embodiments, the equipment for not determining communication time interval, according to the maximum communication of the RS485 network Time interval obtains data from the equipment.
Fig. 3 is the schematic diagram that data are obtained in a kind of RS485 network of the embodiment of the present invention, as shown in figure 3, according to equipment Communication time interval, calculate different communication time intervals (be denoted as T1, T2, T3 ... Tn), the time for obtaining data is T1+ T2+T3…+Tn≤N*Tmax, improve the efficiency of data transmission forwarding.
In order to solve the above technical problems, the embodiment of the invention also provides a kind of communication devices for RS485 network.
Fig. 4 is the communication device block diagram provided in an embodiment of the present invention for RS485 network, as shown in figure 4, the device packet It includes: detection module 42, for detecting in RS485 network at least partly communication time interval of equipment.Module 44 is obtained, with detection Module 42 is connected, logical for having determined that for when obtaining data at least partly from equipment in the equipment from the RS485 network The equipment for believing time interval, obtains data according to the communication time interval of equipment from the equipment.
Technical solution through the embodiment of the present invention detects the communication time interval of RS485 equipment in network, from equipment When obtaining data, data are obtained from the equipment according to the communication time interval of equipment, improves in RS485 network and obtains data Communication efficiency.
In certain embodiments, the detection module 42 can be used for setting at least partly each of equipment in RS485 network It is standby, the first time of the roll-call data frame is sent to equipment sending point name data frame and recording, receives time of equipment transmission Complex data frame simultaneously records the second time for receiving the reply data frame, and determines the first time and second time Between time interval be the equipment communication time interval.
In certain embodiments, detection module 42, it may also be used for judge whether to receive the equipment in the given time The reply data frame of transmission determines that this sets if not receiving the reply data frame of equipment transmission within the predetermined time Standby is faulty equipment;And/or whether the reply data frame for judging to receive is correct, if the reply data frame received It is incorrect, determine that the equipment is faulty equipment.
In certain embodiments, the acquisition module 42, it may also be used for the equipment for not determining communication time interval, according to The maximum communication time interval of RS485 network obtains data from the equipment.
In certain embodiments, the detection module 42 can be used for according to repeatedly to equipment sending point name data frame and reception The communication time interval replied the time interval between data frame and determine the equipment is received to the equipment.
About the device in above-described embodiment, wherein each unit, module execute the concrete mode of operation related It is described in detail in the embodiment of this method, no detailed explanation will be given here.
Fig. 5 is the schematic diagram of gateway provided in an embodiment of the present invention, as shown in figure 5, gateway includes: that processing is single 52 and RS485 of member interface 54.Processing unit 52 can realize the above method provided in an embodiment of the present invention.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or The common knowledge in the art that person's adaptive change follows general principle of the invention and do not invent including the present invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (8)

1. a kind of communication means for RS485 network characterized by comprising
Detect the communication time interval of at least partly equipment in RS485 network;
Including: for each equipment in RS485 network at least partly in equipment, to equipment sending point name data frame and remember Record sends the first time of the roll-call data frame;It receives the reply data frame of equipment transmission and records and receive the reply number According to the second time of frame;And determine that the time interval between the first time and second time is the logical of the equipment Believe time interval;
And
When obtaining data at least partly from equipment in the equipment from the RS485 network, for having determined that communication time interval Equipment, data are obtained from the equipment according to the communication time interval of equipment.
2. the method as described in claim 1, which is characterized in that at least partly each of equipment in RS485 network is set It is standby, further includes:
Judge whether the reply data frame for receiving equipment transmission in the given time, if do not connect within the predetermined time The reply data frame for receiving equipment transmission determines that the equipment is faulty equipment;And/or
Judge whether the reply data frame received is correct, if the reply data frame received is incorrect, determines that the equipment is Faulty equipment.
3. the method as described in claim 1, which is characterized in that further include: the equipment for not determining communication time interval is pressed Data are obtained from the equipment according to the maximum communication time interval of the RS485 network.
4. method according to claim 1 or 2, which is characterized in that according to repeatedly to equipment sending point name data frame and reception The communication time interval replied the time interval between data frame and determine the equipment is received to the equipment.
5. a kind of communication device for RS485 network characterized by comprising
Detection module, for detecting in RS485 network at least partly communication time interval of equipment;And
Module is obtained, for when obtaining data at least partly from equipment in the equipment from the RS485 network, for having determined that The equipment of communication time interval obtains data according to the communication time interval of equipment from the equipment;
Wherein, the detection module, for each equipment in RS485 network at least partly in equipment, to equipment sending point Name data frame simultaneously records the first time for sending the roll-call data frame, receives the reply data frame of equipment transmission and records receipts To second time for replying data frame, and determine that the time interval between the first time and second time is The communication time interval of the equipment.
6. device as claimed in claim 5, which is characterized in that the detection module is also used to judge whether in the predetermined time The reply data frame of equipment transmission is inside received, if not receiving the reply number of equipment transmission within the predetermined time According to frame, determine that the equipment is faulty equipment;And/or whether the reply data frame for judging to receive is correct, if received Reply data frame it is incorrect, determine the equipment be faulty equipment.
7. device as claimed in claim 5, which is characterized in that the acquisition module is also used to for not determining call duration time The equipment at interval obtains data according to the maximum communication time interval of the RS485 network from the equipment.
8. such as device described in claim 5 or 6, which is characterized in that the detection module, for according to repeatedly to equipment transmission It roll-call data frame and receives the equipment and receives the time interval for replying between data frame and determine between the call duration time of the equipment Every.
CN201711086330.7A 2017-11-07 2017-11-07 Communication means and device for RS485 network Active CN107920008B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711086330.7A CN107920008B (en) 2017-11-07 2017-11-07 Communication means and device for RS485 network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711086330.7A CN107920008B (en) 2017-11-07 2017-11-07 Communication means and device for RS485 network

Publications (2)

Publication Number Publication Date
CN107920008A CN107920008A (en) 2018-04-17
CN107920008B true CN107920008B (en) 2019-11-05

Family

ID=61895221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711086330.7A Active CN107920008B (en) 2017-11-07 2017-11-07 Communication means and device for RS485 network

Country Status (1)

Country Link
CN (1) CN107920008B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045256A (en) * 2010-12-17 2011-05-04 北京航空航天大学 COTS (Commercial Off-The-Shelf) based bandwidth predistribution guarantee network function demonstration system
CN103037498A (en) * 2011-09-30 2013-04-10 上海贝尔股份有限公司 Method and device for adjusting timing advance in coordinated multi-point transmission
CN103200249A (en) * 2013-03-26 2013-07-10 大连理工大学 Method for achieving Internet of things intelligent data gateway system
CN103929263A (en) * 2014-04-30 2014-07-16 北京华力创通科技股份有限公司 Network communication method, network communication delay determining method and network communication local time synchronizing method
CN106052762A (en) * 2016-07-13 2016-10-26 徐李 Photoelectric correlative turbine liquid flow meter and cascade application thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI237477B (en) * 2002-09-18 2005-08-01 Icp Electronics Inc Gateway control apparatus and method for controlling digital asynchronous half-duplex serial signal transmission

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102045256A (en) * 2010-12-17 2011-05-04 北京航空航天大学 COTS (Commercial Off-The-Shelf) based bandwidth predistribution guarantee network function demonstration system
CN103037498A (en) * 2011-09-30 2013-04-10 上海贝尔股份有限公司 Method and device for adjusting timing advance in coordinated multi-point transmission
CN103200249A (en) * 2013-03-26 2013-07-10 大连理工大学 Method for achieving Internet of things intelligent data gateway system
CN103929263A (en) * 2014-04-30 2014-07-16 北京华力创通科技股份有限公司 Network communication method, network communication delay determining method and network communication local time synchronizing method
CN106052762A (en) * 2016-07-13 2016-10-26 徐李 Photoelectric correlative turbine liquid flow meter and cascade application thereof

Also Published As

Publication number Publication date
CN107920008A (en) 2018-04-17

Similar Documents

Publication Publication Date Title
US8880604B2 (en) Determination of a spammer through social network characterization
CN100536403C (en) Method and equipment of intelligent patrol detection for communication network
CN109391968A (en) Communication means and communication device
CN112235155B (en) Performance test method and device for cooperative formation service communication environment
CN104541536B (en) Method, user equipment and base station for detecting device to device signals
CN104469829A (en) Voice quality detection method and device
CN109995753A (en) A kind of equipment management Internet of Things cloud platform system
CN105516277B (en) Monitoring method for power grid electrical equipment temperature monitoring device
CN105009625A (en) Service testing method, device and system, network node and quality processing node
CN101873235A (en) Detection method of equipment network link, network management system and network system
CN113207146B (en) Wireless communication network quality monitoring system and method
CN107920008B (en) Communication means and device for RS485 network
CN104767650A (en) Message network delay measuring and calculating method and message network delay measuring and calculating device
CN105430623A (en) Monitoring method, device and system for RCS junk message
CN111479290A (en) L TE-based dynamic monitoring method, system, server and storage medium
CN104900021A (en) Security and protection processing method and device, security and protection terminal and security and protection processing server
CN106856599B (en) Terminal, detection service device, short message receiving-transmitting fault detection method and system
CN106101994A (en) The treating method and apparatus of warning message
CN107438270A (en) A kind of data processing method, terminal and base station
CN105163335B (en) A kind of network access management method, server, mobile terminal and system
CN104581765A (en) Pilot frequency interference detection method and equipment
CN106921987A (en) A kind of wireless communications method and device
CN108540347B (en) Network cable two-end signal delay sequence matching generation method for network signal tracing
CN106487493A (en) Full duplex receiving terminal network equipment and its full-duplex data transmission method
CN102652456A (en) Wireless communication network between participants of an assimilation step

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