Movatterモバイル変換


[0]ホーム

URL:


CN106953809B - 485 time-sharing communication-based equipment resource acquisition method - Google Patents

485 time-sharing communication-based equipment resource acquisition method
Download PDF

Info

Publication number
CN106953809B
CN106953809BCN201710103780.6ACN201710103780ACN106953809BCN 106953809 BCN106953809 BCN 106953809BCN 201710103780 ACN201710103780 ACN 201710103780ACN 106953809 BCN106953809 BCN 106953809B
Authority
CN
China
Prior art keywords
resource
master device
slave
slave device
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
CN201710103780.6A
Other languages
Chinese (zh)
Other versions
CN106953809A (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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies 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 Fiberhome Telecommunication Technologies Co LtdfiledCriticalFiberhome Telecommunication Technologies Co Ltd
Priority to CN201710103780.6ApriorityCriticalpatent/CN106953809B/en
Publication of CN106953809ApublicationCriticalpatent/CN106953809A/en
Priority to PCT/CN2017/111558prioritypatent/WO2018153127A1/en
Application grantedgrantedCritical
Publication of CN106953809BpublicationCriticalpatent/CN106953809B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a 485 time-sharing communication-based equipment resource acquisition method, which comprises the following steps: determining the time slot of the master device and each slave device connected with the master device through an RS485 bus; in the time slot of each slave device, sending a resource change message to the master device; in the time slot of the master device, simultaneously returning a resource acquisition request to the corresponding slave device according to the received resource change message; and according to the resource acquisition request received by the slave device, transmitting the resource data to the master device in the time slot of the slave device. The invention realizes that the master device and the slave device send data in respective time slots, and the master device can send the resource acquisition request to the slave device in a concurrent manner, and the slave device returns the resource data to the master device in a time-sharing manner, so that the resource acquisition of the slave device by the master device can be completed quickly and accurately, the communication conflict is avoided, and the invention has the advantages of concurrency, high efficiency, safety and redundancy, is convenient to manage, and can meet the requirement of large-batch data acquisition of the communication device.

Description

485 time-sharing communication-based equipment resource acquisition method
Technical Field
The invention relates to the field of communication, in particular to a 485 time-sharing communication-based equipment resource acquisition method.
Background
When the half-duplex 485 communication mode is applied to a plurality of master nodes and slave nodes, only one node can send data at a time, and if a plurality of nodes send data at the same time, communication conflict occurs. The conventional method for acquiring resources of communication equipment generally uses such a half-duplex 485 communication mode, which includes the following two methods:
the first is to adopt a polling mode of the master device, the master device is always master, the slave device is always slave, the master device initiates communication each time, and the slave device responds, so that communication collision is not easy to occur, but the polling mode of the master device is queried at certain intervals, so that the efficiency of acquiring resources is low. Particularly, when the slave equipment has no resource change, the master equipment also sends an acquisition command to the slave equipment for resource acquisition, the interval time of each acquisition is short, the consumption of the MCU of the master equipment is overlarge, and other tasks are influenced; the second is to adopt a mode of reporting resource change to the master device by the slave device, and because the mode is a half-duplex 485 communication mode, communication conflict can be caused, and finally the slave device needs to repeatedly send the resource change to the master device.
In summary, the existing method for acquiring resources by using a half-duplex 485 communication mode has the following disadvantages:
(1) the efficiency of collecting resources is low;
(2) communication collisions are easily generated.
Disclosure of Invention
The invention aims to solve the technical problems that the existing method for acquiring resources of communication equipment by using a half-duplex 485 communication mode is low in efficiency and easy to generate communication conflicts.
In order to solve the technical problem, the technical scheme adopted by the invention is to provide an equipment resource acquisition method based on 485 time-sharing communication, which comprises the following steps:
determining the time slot of the master device and each slave device connected with the master device through an RS485 bus;
in the time slot of each slave device, sending a resource change message to the master device;
in the time slot of the master device, simultaneously returning a resource acquisition request to the corresponding slave device according to the received resource change message;
and according to the resource acquisition request received by the slave device, transmitting the resource data to the master device in the time slot of the slave device.
In the above technical solution, determining whether resource data sent by the slave device conflicts according to a conflict detection method specifically includes:
and sequentially detecting whether the parity check bit, the data length, the stop bit and the data frame of the resource data sent by the slave equipment are correct, and if so, determining that the resource data sent by the slave equipment are not collided.
In the technical scheme, the configuration parameters of the RS485 communication interface of the master device are acquired, the RS485 communication interface of the slave device is subjected to parameter configuration according to the configuration parameters, and the master device and the slave device communicate by calling respective RS485 communication interfaces.
In the above technical solution, the configuration parameters include a baud rate, a data bit, a stop bit, and a parity bit.
In the above technical solution, when the slave device receives a resource acquisition request, the slave device compresses the current resource data, and sends the compressed resource data to the master device in the time slot of the slave device, and the master device decompresses the compressed resource data.
In the above technical solution, the resource data received by the master device is decompressed, and the resource information table of the master device is updated by using the decompressed resource data.
The invention realizes that the master device and the slave device send data in respective time slots, and the master device can send the resource acquisition request to the slave device in parallel, and the slave device returns the resource data to the master device in a time-sharing manner, so that the resource acquisition of the slave device by the master device can be completed quickly and accurately, the communication conflict is avoided, and the invention has the advantages of concurrency, high efficiency, safety and redundancy, is convenient for management, and can meet the requirement of large-batch data acquisition of the communication device.
Drawings
Fig. 1 is a flow chart of an equipment resource acquisition method based on 485 time-sharing communication in the invention.
Detailed Description
The invention is described in detail below with reference to the drawings and the detailed description.
The embodiment of the invention provides a 485 time-sharing communication-based equipment resource acquisition method, which comprises the following steps as shown in figure 1:
and S1, establishing the electric connection between the master device and each slave device through the RS485 bus, and determining the time slot of the master device and each slave device.
And S2, acquiring configuration parameters of the RS485 communication interface of the master device, and configuring the parameters of the RS485 communication interface of the slave device according to the configuration parameters.
The configuration parameters include baud rate, data bits, stop bits, and parity bits.
And S3, calling the RS485 communication interface of each slave device to send a resource change message to the master device in the time slot of each slave device.
According to the scheme, the time-sharing communication of the RS485 communication interface is adopted, each slave device can call the RS485 communication interface to send data to the master device in each time slot, therefore, each slave device cannot generate communication conflict, the resource change message can be accurately and quickly reported to the master device, and meanwhile, the master device can accurately and quickly receive the resource change message of each slave device without generating communication conflict.
And S4, in the time slot of the master device, calling the RS485 communication interface according to the resource change message received by the master device, and simultaneously returning a resource acquisition request to the corresponding slave device.
According to the scheme, the time-sharing communication of the RS485 communication interface is adopted, the data can be sent by the master device in the own time slot, and the resource acquisition request can be sent to the slave device by the master device in parallel, so that the resource acquisition of the slave device by the master device can be completed quickly.
And S5, compressing the current resource data of the slave device according to the resource acquisition request received by the slave device, calling an RS485 communication interface in the time slot of the slave device, and sending the compressed resource data to the master device.
Determining whether resource data sent by slave equipment conflicts according to a conflict detection method, specifically: and sequentially detecting whether the parity check bit, the data length, the stop bit and the data frame of the resource data sent by the slave equipment are correct, and if so, determining that the resource data sent by the slave equipment are not collided.
And S6, decompressing the resource data received by the main device, and updating the resource information table of the main device by using the decompressed resource data.
The invention realizes that the master device and the slave device send data in respective time slots, and the master device can concurrently send the resource acquisition request to the slave device, and the slave device returns the resource data to the master device in a time-sharing manner, so that the resource acquisition of the slave device by the master device can be rapidly and accurately completed, the communication conflict is avoided, and the invention has the advantages of concurrency, high efficiency, safety and redundancy, is convenient for management, and can meet the requirement of large-batch data acquisition of the communication device.
The present invention is not limited to the above-mentioned preferred embodiments, and any structural changes made by anyone in the light of the present invention, all the technical solutions similar or similar to the present invention, fall within the protection scope of the present invention.

Claims (5)

CN201710103780.6A2017-02-242017-02-24485 time-sharing communication-based equipment resource acquisition methodActiveCN106953809B (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN201710103780.6ACN106953809B (en)2017-02-242017-02-24485 time-sharing communication-based equipment resource acquisition method
PCT/CN2017/111558WO2018153127A1 (en)2017-02-242017-11-17Device resource collection method based on 485 time-sharing communication

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710103780.6ACN106953809B (en)2017-02-242017-02-24485 time-sharing communication-based equipment resource acquisition method

Publications (2)

Publication NumberPublication Date
CN106953809A CN106953809A (en)2017-07-14
CN106953809Btrue CN106953809B (en)2020-04-14

Family

ID=59466490

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710103780.6AActiveCN106953809B (en)2017-02-242017-02-24485 time-sharing communication-based equipment resource acquisition method

Country Status (2)

CountryLink
CN (1)CN106953809B (en)
WO (1)WO2018153127A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106953809B (en)*2017-02-242020-04-14烽火通信科技股份有限公司485 time-sharing communication-based equipment resource acquisition method
CN108039993A (en)*2017-12-152018-05-15广东雅达电子股份有限公司A kind of method that branch equipment information is quickly collected in automatic meter reading system
CN111464407B (en)*2020-02-282021-11-09湖北三江航天红峰控制有限公司Communication device and method based on half-duplex bus
CN116248612A (en)*2023-02-242023-06-09上海繁易信息科技股份有限公司 A many-to-one bus extension method and device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20080273527A1 (en)*2007-05-032008-11-06The University Of LeicesterDistributed system
JP4999006B2 (en)*2008-04-212012-08-15独立行政法人産業技術総合研究所 Serial bus transmission system
EP2434687A4 (en)*2009-07-292012-03-28Huawei Tech Co LtdData communication method, communication equipment and communication system
CN102546141B (en)*2012-02-202015-02-18杭州海康威视系统技术有限公司485 bus system and asynchronous half-duplex communication method thereof
CN103001722B (en)*2012-11-232015-09-02北京东土科技股份有限公司A kind of data transmission method based on time triggered Ethernet and node device
CN104283749B (en)*2014-09-252017-12-01烽火通信科技股份有限公司Business disk upgrade method based on the half-duplex bus of RS 485
CN105608037A (en)*2015-09-252016-05-25杭州威力克通信系统有限公司RS485 bus-based communication method and device
CN105978779B (en)*2016-06-232019-03-19北京东土科技股份有限公司Real-time communication method, apparatus and system based on industry internet
CN106953809B (en)*2017-02-242020-04-14烽火通信科技股份有限公司485 time-sharing communication-based equipment resource acquisition method
CN107294827B (en)*2017-05-272019-10-25烽火通信科技股份有限公司Avoid the RS485 communication system and method for master-slave equipment conflict

Also Published As

Publication numberPublication date
CN106953809A (en)2017-07-14
WO2018153127A1 (en)2018-08-30

Similar Documents

PublicationPublication DateTitle
CN106953809B (en)485 time-sharing communication-based equipment resource acquisition method
CN109067617B (en)V2X protocol consistency test method, device and system
CN107465764B (en)Star topology based internet of things communication system, gateway equipment and method
CN111263338B (en)Network distribution method of Bluetooth Mesh network, related network distribution equipment and system
CN104410557A (en)Dynamic networking method and communication method based on RS-485
US11419175B2 (en)Reconstructing a personal area network or system after a failure in the network or system
EP2908567A1 (en)Data sending method, receiving method and device
CN105376766A (en)Internet-of-things data transmission method
CN106033641A (en)A multifunctional intelligent control system achieved by a power line carrier and a controlling method thereof
CN112585927A (en)Communication link detection method, device and system and movable platform
CN102869032B (en)Device and method for monitoring and alarming power supply of base station
US20160286583A1 (en)Method for terminal accessing base station, and apparatus
CN111650915A (en)CAN bus control method and device, vehicle control unit, storage medium and vehicle
CN107908992B (en) An identity recognition-based power system network security method and system
CN106875664B (en)Exclusive data acquisition method based on CAN bus
CN109217986A (en)A kind of data transmission method and system based on Internet of Things
CN106304241B (en)Data transmission method, repeater and gateway
CN117424774A (en)Communication anti-interference method and device, electronic equipment and storage medium
CN114884805B (en)Data transmission method, device, terminal and storage medium
CN116347266A (en) Data transmission method and energy storage device
CN204945691U (en)A kind of C4 bus
CN109951309B (en)Electric energy cloud acquisition system network node maintenance method and device
CN102013918B (en)Method, system and device for transmitting data
CN115915334A (en)System message sending method, terminal equipment and base station
CN219041799U (en)Protocol conversion gateway

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp