CN112491675B - Data communication method, device, equipment and computer readable storage medium - Google Patents

Data communication method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112491675B
CN112491675B CN202011155249.1A CN202011155249A CN112491675B CN 112491675 B CN112491675 B CN 112491675B CN 202011155249 A CN202011155249 A CN 202011155249A CN 112491675 B CN112491675 B CN 112491675B
Authority
CN
China
Prior art keywords
target
equipment
communication
devices
time interval
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
CN202011155249.1A
Other languages
Chinese (zh)
Other versions
CN112491675A (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.)
Chuangze Intelligent Robot Group Co ltd
Original Assignee
Chuangze Intelligent Robot Group 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 Chuangze Intelligent Robot Group Co ltd filed Critical Chuangze Intelligent Robot Group Co ltd
Priority to CN202011155249.1A priority Critical patent/CN112491675B/en
Publication of CN112491675A publication Critical patent/CN112491675A/en
Application granted granted Critical
Publication of CN112491675B publication Critical patent/CN112491675B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/40143Bus networks involving priority mechanisms
    • H04L12/4015Bus networks involving priority mechanisms by scheduling the transmission of messages at the 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/40143Bus networks involving priority mechanisms
    • H04L12/40156Bus networks involving priority mechanisms by using dedicated slots associated with a priority level
    • 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
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a data communication method, a device, equipment and a computer readable storage medium, wherein a plurality of target 485 devices are connected to the same 485 bus interface, and data corresponding to each 485 device has different real-time requirements, so that a corresponding scheduling time interval is preset for each target 485 device, and when the time from the last communication end of the target 485 device reaches the self-corresponding preset scheduling time interval, the target 485 device can communicate with the target 485 device through the 485 bus interface connected with the target 485 device based on the communication protocol corresponding to the target 485 device, and the data communication with the plurality of 485 devices with different communication protocols can be realized through one 485 bus interface, so that the mounting capacity of the 485 devices on a robot is improved, and the development of the robot is facilitated.

Description

Data communication method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a data communication method, a data communication apparatus, a device, and a computer-readable storage medium.
Background
The robot is widely applied in various fields nowadays, a large number of 485 devices are arranged on the robot, the 485 devices can perform data communication with a master controller in the robot through a 485 bus, in the prior art, because communication protocols adopted by the 485 devices for data communication are different (for example, a standard Modbus protocol and other proprietary protocols are available), the master controller cannot communicate with a plurality of 485 devices through a single 485 bus interface, but only one 485 device is connected to each 485 bus interface, so that data interaction between the master controller and various 485 devices with different communication protocols is realized, but because the number of 485 bus interfaces on the master controller is limited, the connectable number of 485 devices on the robot is small, and the development of the robot is limited.
Therefore, how to provide a solution to the above technical problems is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a data communication method, which improves the mounting capacity of 485 equipment on a robot and is beneficial to the development of the robot; another object of the present invention is to provide a data communication device, a device and a computer readable storage medium, which improve the mounting capability of 485 devices on a robot, and are beneficial to the development of the robot.
In order to solve the above technical problem, the present invention provides a data communication method, including:
judging whether the time from the target 485 equipment to the last communication end reaches a corresponding preset scheduling time interval or not;
if yes, based on a communication protocol corresponding to the target 485 equipment, communicating with the target 485 equipment through a 485 bus interface connected with the target 485 equipment;
the 485 bus interface is connected with a plurality of 485 devices at the same time.
Preferably, if the communication protocol is reached, based on the communication protocol corresponding to the target 485 device, the communication with the target 485 device through the 485 bus interface connected to the target 485 device specifically includes:
if so, judging whether a plurality of target 485 devices which reach the corresponding preset scheduling time intervals at the same time currently are available;
if not, directly communicating with the target 485 equipment through a 485 bus interface connected with the target 485 equipment based on a communication protocol corresponding to the target 485 equipment;
and if the number of the target 485 devices is multiple, the communication with the target 485 devices is carried out through 485 bus interfaces connected with the target 485 devices on the basis of communication protocols corresponding to the target 485 devices according to the preset priority order.
Preferably, before the time that the target 485 device is away from the end of the last communication reaches the preset scheduling time interval corresponding to the target 485 device, the data communication method further includes:
judging whether a preemptive communication instruction of designated 485 equipment is received;
if the information is received, based on a communication protocol corresponding to the specified 485 equipment, the information is communicated with the specified 485 equipment through a 485 bus interface connected with the specified 485 equipment;
and if not, executing the step of judging whether the time from the target 485 equipment to the last communication end reaches the corresponding preset scheduling time interval.
Preferably, the communication with the target 485 device through a 485 bus interface connected to the target 485 device based on the communication protocol corresponding to the target 485 device specifically includes:
based on a communication protocol corresponding to the target 485 device, sending a data acquisition request to the target 485 device through a 485 bus interface connected with the target 485 device;
judging whether a response packet of the target 485 device is received within a preset time period;
if so, analyzing the response packet and calling a corresponding response scheduling interface to process the analyzed response packet;
if not, the communication with the target 485 equipment is terminated.
Preferably, the data communication method further includes:
judging whether the scheduling time interval meets corresponding preset modification conditions or not;
and if so, modifying the scheduling time interval meeting the corresponding preset modification condition into a temporary time interval.
Preferably, the preset modification condition comprises a modification instruction received from the human-computer interaction device for the specified scheduling time interval and a specific state of the robot.
In order to solve the above technical problem, the present invention further provides a data communication apparatus, including:
the first judgment module is used for judging whether the time from the last communication end of the target 485 equipment reaches a preset scheduling time interval corresponding to the target 485 equipment, and if so, the communication module is triggered;
the communication module is used for communicating with the target 485 device through a 485 bus interface connected with the target 485 device based on a communication protocol corresponding to the target 485 device;
and the 485 bus interface is simultaneously connected with a plurality of 485 devices.
Preferably, the data communication apparatus further comprises:
the second judgment module is used for judging whether the scheduling time interval meets the corresponding preset modification condition or not, and if so, the modification module is triggered;
and the modification module is used for modifying the scheduling time interval meeting the corresponding preset modification condition into a temporary time interval.
In order to solve the above technical problem, the present invention further provides a data communication device, including:
a memory for storing a computer program;
a processor for implementing the steps of the data communication method as described in any one of the above when executing the computer program.
To solve the above technical problem, the present invention further provides a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the data communication method as described in any one of the above.
The invention provides a data communication method, which is characterized in that a plurality of target 485 devices are connected to the same 485 bus interface, and data corresponding to each 485 device have different real-time requirements, so that a corresponding scheduling time interval is preset for each target 485 device, and when the time from the last communication end of the target 485 device to the last communication end reaches the corresponding preset scheduling time interval, the data communication with the plurality of 485 devices with different communication protocols can be realized through a single 485 bus interface based on the communication protocol corresponding to the target 485 devices, the communication with the target 485 devices is realized through the 485 bus interface connected with the target 485 devices, the mounting capacity of the 485 devices on a robot is improved, and the development of the robot is facilitated.
The invention also provides a data communication device, equipment and a computer readable storage medium, which have the same beneficial effects as the data communication method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart of a data communication method according to the present invention;
fig. 2 is a schematic structural diagram of a data communication device according to the present invention;
fig. 3 is a schematic structural diagram of a data communication device according to the present invention.
Detailed Description
The core of the invention is to provide a data communication method, which improves the mounting capacity of 485 equipment on the robot and is beneficial to the development of the robot; another core of the present invention is to provide a data communication device, a device and a computer readable storage medium, which improve the mounting capability of 485 devices on a robot and are beneficial to the development of the robot.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data communication method provided in the present invention, where the data communication method includes:
step S1: judging whether the time from the last communication completion of the target 485 equipment reaches a preset scheduling time interval corresponding to the target 485 equipment or not;
specifically, in view of the technical problems in the background art, the applicant has designed a communication scheme for implementing data communication between multiple 485 devices by using the same 485 bus interface, which requires that multiple target 485 devices are connected to the same 485 bus interface, and after connection, the program in the embodiment of the present invention may be executed to perform a communication process between the master controller and each target 485 device.
The master controller can only communicate with one individual 485 device through one individual 485 bus interface at the same time, so the embodiment of the invention adopts the idea of time division multiplexing, the communication process of each 485 device is respectively executed at different times through one individual 485 bus interface, and the real-time requirements of each 485 device on data transmission are different, for example, some 485 devices require to transmit their own data to the master controller once every 3 seconds, and some 485 devices may need to transmit their own data to the master controller once every minute.
Step S2: if the target 485 device is reached, based on a communication protocol corresponding to the target 485 device, the target 485 device is communicated with through a 485 bus interface connected with the target 485 device;
and the 485 bus interface is simultaneously connected with a plurality of 485 devices.
Specifically, when the time from the last communication end of the target device to the corresponding preset scheduling time interval reaches, the target device needs to perform next data communication, and at this time, the master controller can communicate with the target 485 device through the 485 bus interface connected with the target 485 device, and because only 1 target 485 device meeting the communication trigger condition at the same time is usually provided, the embodiment of the invention can smoothly realize data communication with a plurality of 485 devices with different communication protocols through a single 485 bus interface, thereby saving the number of interfaces and improving the capability of the master controller for mounting the 485 devices.
The number of the bus nodes may be set autonomously, which needs to meet the relevant requirements of the 485 bus, for example, the number of the bus nodes may be set to 20, and the embodiment of the present invention is not limited herein.
The invention provides a data communication method, which is characterized in that a plurality of target 485 devices are connected to the same 485 bus interface, and data corresponding to each 485 device has different real-time requirements, so that the corresponding scheduling time interval is preset for each target 485 device, when the time from the last communication end of the target 485 device reaches the corresponding preset scheduling time interval, the data communication with the plurality of 485 devices with different communication protocols can be realized through a single 485 bus interface based on the communication protocol corresponding to the target 485 devices, the 485 bus interface connected with the target 485 devices is communicated with the target 485 devices, the mounting capacity of the 485 devices on a robot is improved, and the development of the robot is facilitated.
On the basis of the above-described embodiment:
as a preferred embodiment, if the communication is achieved, based on a communication protocol corresponding to the target 485 device, the communication with the target 485 device through the 485 bus interface connected to the target 485 device specifically includes:
if yes, judging whether a plurality of target 485 devices which reach the corresponding preset scheduling time intervals at the same time currently are available;
if not, directly communicating with the target 485 equipment through a 485 bus interface connected with the target 485 equipment on the basis of a communication protocol corresponding to the target 485 equipment;
and if the number of the target 485 devices is multiple, the communication with the target 485 devices is carried out through 485 bus interfaces connected with the target 485 devices according to the sequence of preset priorities and based on communication protocols corresponding to the target 485 devices.
In particular, considering that in a normal situation, the number of target 485 devices simultaneously meeting the condition that the time from the end of last communication reaches the preset scheduling time interval corresponding to the target 485 device is 1, but there is a possibility that a plurality of target 485 devices simultaneously meet the condition, in order to smoothly and normally perform data communication between the main controller and each target 485 device under the condition, in the embodiment of the present invention, a priority is preset for each 485 device, and when the condition occurs, the 485 devices can communicate with the target 485 devices through 485 bus interfaces connected with the target 485 devices according to the preset priority sequence and based on communication protocols corresponding to the target 485 devices, so that normal communication of the plurality of 485 devices is realized, and the priority communication requirement of the 485 devices with higher real-time requirements is met.
As a preferred embodiment, the data communication method further includes the step of determining whether the time from the last communication end of the target 485 device reaches a preset scheduling time interval corresponding to the target 485 device, and the step of:
judging whether a preemptive communication instruction of the designated 485 equipment is received;
if the information is received, based on a communication protocol corresponding to the designated 485 equipment, the information is communicated with the designated 485 equipment through a 485 bus interface connected with the designated 485 equipment;
and if not, executing a step of judging whether the time from the target 485 equipment to the last communication end reaches a corresponding preset scheduling time interval.
Specifically, in the foregoing solution, the communication scheduling scheme under a normal condition is provided, but in the process of performing normal communication scheduling, if an upper computer or a user suddenly proposes an emergency demand for data in a certain 485 device, it is not necessary to wait for a pre-scheduling time interval of the 485 device, and after receiving a preemptive communication instruction for a specified 485 device, the communication process with the specified 485 device may be directly arranged, and after the communication is finished, the normal flow of performing data communication according to the scheduling time interval is resumed, so that the emergency data acquisition demand is smoothly satisfied.
The preemptive communication instruction for the designated 485 device may be sent by multiple devices, for example, may be sent by an upper computer, or may be sent by a user through a human-computer interaction device, and the like, and the embodiment of the present invention is not limited herein.
As a preferred embodiment, based on a communication protocol corresponding to the target 485 device, the communication with the target 485 device through the 485 bus interface connected to the target 485 device specifically includes:
based on a communication protocol corresponding to the target 485 device, sending a data acquisition request to the target 485 device through a 485 bus interface connected with the target 485 device;
judging whether a response packet of the target 485 device is received within a preset time period;
if so, analyzing the response packet and calling a corresponding response scheduling interface to process the analyzed response packet;
if not, the communication with the target 485 equipment is terminated.
Specifically, because the communication protocols adopted by each target 485 device may be different, in the embodiment of the present invention, when communicating with the 485 device, a data acquisition request needs to be sent based on the communication protocol corresponding to the target 485 device, and a response packet fed back by the target 485 device can be obtained, and when analyzing the response packet, the communication protocol corresponding to the target 485 device can also be used for analyzing, so as to facilitate processing of response packets of different types of 485 devices.
In consideration of the fact that any target 485 device may have a condition that communication cannot be performed, for example, communication cannot be performed due to a fault or being directly unplugged, in this case, the master controller may not wait for the response packet fed back by the target 485 device all the time, so a preset time period, which is equivalent to a timeout interval, is set in the embodiment of the present invention, and if the response packet of the target 485 device is not received within the preset time period, communication with the target 485 device may be terminated, so that the master controller may communicate with the normal 485 device.
The preset time period may be set autonomously, for example, set to 5s, and the embodiment of the present invention is not limited herein.
As a preferred embodiment, the data communication method further includes:
judging whether the scheduling time interval meets the corresponding preset modification condition or not;
and if so, modifying the scheduling time interval meeting the corresponding preset modification condition into a temporary time interval.
Specifically, in some cases, the 485 device has some disadvantages in a single scheduling time interval, for example, in a normal case, because the battery power does not jump instantly, the scheduling time interval of the battery power acquiring device may be configured to be 2 minutes, and in a special case, for example, when the battery is charged, in order to update and display the power information more timely, the scheduling time interval of the battery power acquiring device may be temporarily modified to be 500ms in the charging state of the battery, so that the real-time requirement of different data communications of the same 485 device is met.
As a preferred embodiment, the preset modification condition includes a modification instruction received from the human-computer interaction device for a specified scheduling time interval and a specific state of the robot.
Specifically, the user may actively use the human-computer interaction device to modify the instruction of the designated 485 device at the designated scheduling time interval, so that the flexibility is high, and in the characteristic state of the robot, the corresponding scheduling time interval may also be modified, for example, the scheduling time interval of the battery power acquisition device is modified to be shorter in the charging state, so that the degree of automation is high.
Of course, besides the two preset modification conditions provided above, the preset modification conditions may be of other various types, and the embodiment of the present invention is not limited herein.
In addition, it is noted that various preset parameters in the embodiment of the present invention, such as a preset scheduling time interval, a preset time period, and a response scheduling interface, may be processed in a form of an index frame, which is convenient for maintenance and expansion.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a data communication device according to the present invention, the data communication device including:
the first judging module 1 is used for judging whether the time from the target 485 equipment to the last communication end reaches a corresponding preset scheduling time interval, and if so, the communication module 2 is triggered;
the communication module 2 is used for communicating with the target 485 equipment through a 485 bus interface connected with the target 485 equipment based on a communication protocol corresponding to the target 485 equipment;
and the 485 bus interface is simultaneously connected with a plurality of 485 devices.
As a preferred embodiment, the data communication apparatus further includes:
the second judgment module is used for judging whether the scheduling time interval meets the corresponding preset modification condition or not, and if so, the modification module is triggered;
and the modification module is used for modifying the scheduling time interval meeting the corresponding preset modification condition into a temporary time interval.
For the introduction of the data communication apparatus provided in the embodiment of the present invention, please refer to the foregoing embodiment of the data communication method, and the embodiment of the present invention is not described herein again.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a data communication device according to the present invention, the data communication device includes:
a memory 3 for storing a computer program;
a processor 4 for implementing the steps of the data communication method as in the previous embodiments when executing the computer program.
For introducing the data communication device provided in the embodiment of the present invention, please refer to the foregoing embodiment of the data communication method, and details of the embodiment of the present invention are not repeated herein.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data communication method as in the previous embodiments.
For the introduction of the computer-readable storage medium provided by the embodiment of the present invention, please refer to the foregoing embodiment of the data communication method, which is not described herein again.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one of 8230, and" comprising 8230does not exclude the presence of additional like elements in a process, method, article, or apparatus comprising the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method of data communication, comprising:
judging whether the time from the last communication completion of the target 485 equipment reaches a preset scheduling time interval corresponding to the target 485 equipment or not;
if yes, based on a communication protocol corresponding to the target 485 equipment, communicating with the target 485 equipment through a 485 bus interface connected with the target 485 equipment;
the 485 bus interface is connected with a plurality of 485 devices simultaneously;
if the target 485 device is reached, based on a communication protocol corresponding to the target 485 device, the communication with the target 485 device through a 485 bus interface connected with the target 485 device specifically includes:
if yes, judging whether a plurality of target 485 devices which reach the corresponding preset scheduling time interval of the target 485 devices at the same time currently are available;
if not, directly communicating with the target 485 equipment through a 485 bus interface connected with the target 485 equipment based on a communication protocol corresponding to the target 485 equipment;
if the number of the target 485 devices is multiple, the target 485 devices are communicated with through 485 bus interfaces connected with the target 485 devices according to the sequence of preset priorities and based on communication protocols corresponding to the target 485 devices;
before the time of judging whether the distance from the target 485 device to the last communication end reaches the preset scheduling time interval corresponding to the target 485 device, the data communication method further comprises the following steps:
judging whether a preemptive communication instruction of the designated 485 equipment is received;
if the information is received, based on a communication protocol corresponding to the specified 485 equipment, the information is communicated with the specified 485 equipment through a 485 bus interface connected with the specified 485 equipment;
if not, executing the step of judging whether the time from the target 485 equipment to the last communication end reaches the corresponding preset scheduling time interval per se;
the communication protocols corresponding to the target 485 devices connected with the 485 bus interface are different.
2. The data communication method according to claim 1, wherein the communication with the target 485 device through a 485 bus interface connected to the target 485 device based on the communication protocol corresponding to the target 485 device specifically comprises:
based on a communication protocol corresponding to the target 485 device, sending a data acquisition request to the target 485 device through a 485 bus interface connected with the target 485 device;
judging whether a response packet of the target 485 equipment is received within a preset time period or not;
if so, analyzing the response packet and calling a corresponding response scheduling interface to process the analyzed response packet;
if not, the communication with the target 485 equipment is terminated.
3. The data communication method according to any one of claims 1 to 2, characterized in that the data communication method further comprises:
judging whether the scheduling time interval meets corresponding preset modification conditions or not;
and if so, modifying the scheduling time interval meeting the corresponding preset modification condition into a temporary time interval.
4. The data communication method according to claim 3, wherein the preset modification condition comprises a modification instruction received from a human-computer interaction device for the specified scheduling time interval and a specific state of the robot.
5. A data communication apparatus, comprising:
the first judgment module is used for judging whether the time from the last communication end of the target 485 equipment reaches a preset scheduling time interval corresponding to the target 485 equipment, and if so, the communication module is triggered;
the communication module is used for communicating with the target 485 device through a 485 bus interface connected with the target 485 device based on a communication protocol corresponding to the target 485 device;
the 485 bus interface is simultaneously connected with a plurality of 485 devices;
if yes, based on a communication protocol corresponding to the target 485 device, the communication with the target 485 device through a 485 bus interface connected with the target 485 device specifically includes:
if yes, judging whether a plurality of target 485 devices which reach the corresponding preset scheduling time interval of the target 485 devices at the same time currently are available;
if not, directly communicating with the target 485 equipment through a 485 bus interface connected with the target 485 equipment based on a communication protocol corresponding to the target 485 equipment;
if the number of the target 485 devices is multiple, the target 485 devices are communicated with through 485 bus interfaces connected with the target 485 devices according to the sequence of preset priorities and based on communication protocols corresponding to the target 485 devices;
before the time for judging whether the distance from the target 485 device to the last communication end reaches the preset scheduling time interval corresponding to the target 485 device, the data communication device is further configured to:
judging whether a preemptive communication instruction of the designated 485 equipment is received;
if the information is received, based on a communication protocol corresponding to the specified 485 equipment, the information is communicated with the specified 485 equipment through a 485 bus interface connected with the specified 485 equipment;
if not, executing the step of judging whether the time from the target 485 equipment to the last communication end reaches the corresponding preset scheduling time interval;
the communication protocols corresponding to the target 485 devices connected with the 485 bus interface are different.
6. The data communication apparatus according to claim 5, further comprising:
the second judgment module is used for judging whether the scheduling time interval meets the corresponding preset modification condition or not, and if so, the modification module is triggered;
and the modification module is used for modifying the scheduling time interval meeting the corresponding preset modification condition into a temporary time interval.
7. A data communication device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the data communication method according to any one of claims 1 to 4 when executing the computer program.
8. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data communication method according to any one of claims 1 to 4.
CN202011155249.1A 2020-10-26 2020-10-26 Data communication method, device, equipment and computer readable storage medium Active CN112491675B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011155249.1A CN112491675B (en) 2020-10-26 2020-10-26 Data communication method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011155249.1A CN112491675B (en) 2020-10-26 2020-10-26 Data communication method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112491675A CN112491675A (en) 2021-03-12
CN112491675B true CN112491675B (en) 2022-10-18

Family

ID=74927527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011155249.1A Active CN112491675B (en) 2020-10-26 2020-10-26 Data communication method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112491675B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113294887A (en) * 2021-05-07 2021-08-24 宁波奥克斯电气股份有限公司 Competitive RS485 communication method and device and air conditioning system
CN113568968A (en) * 2021-07-30 2021-10-29 重庆电子工程职业学院 Grid-based intelligent community big data service system
CN115664599B (en) * 2022-12-08 2023-03-28 杭州云酷智能科技有限公司 Data transmission method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546141A (en) * 2012-02-20 2012-07-04 杭州海康威视系统技术有限公司 485 bus system and asynchronous half-duplex communication method thereof
CN109495215A (en) * 2018-12-20 2019-03-19 山东比特智能科技股份有限公司 A kind of communication means of half-duplex bus, system and device and readable storage medium storing program for executing

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070121670A1 (en) * 2005-11-29 2007-05-31 Delta Electronics, Inc. Method for converting, editing and modifying communication protocol
CN201690467U (en) * 2010-04-29 2010-12-29 光一科技股份有限公司 RS485 bus communication time division multiplex circuit
CN102664781B (en) * 2012-04-10 2016-01-27 安徽科力信息产业有限责任公司 The control method of a kind of multinode RS485 bus data transmission route
CN104506449A (en) * 2014-12-29 2015-04-08 重庆瑞坤科技发展有限公司 Wired-wireless-compatible intelligent router

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546141A (en) * 2012-02-20 2012-07-04 杭州海康威视系统技术有限公司 485 bus system and asynchronous half-duplex communication method thereof
CN109495215A (en) * 2018-12-20 2019-03-19 山东比特智能科技股份有限公司 A kind of communication means of half-duplex bus, system and device and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN112491675A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN112491675B (en) Data communication method, device, equipment and computer readable storage medium
CN105657639B (en) Dual-mode equipment and its method realized while communicated
EP0221708A2 (en) Communication system for the transfer of small digital message blocks and large digital message blocks
CN102484607B (en) Communication method in a profinet communication system
CN111580995A (en) Synchronous communication method and system of distributed cloud platform and Internet of things intelligent terminal based on MQTT asynchronous communication scene
CN112929366A (en) Wireless gaming protocol
CN112165413B (en) Equipment state reporting method and device and electronic device
CN110972120A (en) Low-power-consumption Bluetooth device multilink management method, system and device
CN105007209B (en) A kind of poll means of communication based on RS485
CN109891400A (en) Method, apparatus and storage medium based on SPI asynchronous process event
CN110501979A (en) A kind of cluster control method, system and terminal device
CN106656711B (en) A kind of predefined method of token bus time slot
US10091823B2 (en) Call collision processing method, terminal and transfer platform
CN109445806B (en) Ble-based multi-device upgrading method, device, system and terminal
EP2498565A1 (en) Channel occupying method, mobile AP and external STA
CN111885171A (en) VR model rapid cloud deployment method
CN111405534A (en) Information transmission method, first terminal and computer storage medium
WO2013068925A2 (en) Method and apparatus for controlling wireless devices
CN108399096B (en) Multi-task scheduling time sequence monitoring method and system for battery management system
CN102917370A (en) Method, device and system for determining corresponding near-end unit of far-end unit and far-end unit
CN109673044A (en) Communication control method, chip, the gateway apparatus of chip
CN106982156B (en) Priority setting method, device, communication system, equipment and readable storage medium storing program for executing
US20090198768A1 (en) Asynchronous request-response communication method
CN115103425A (en) Connection service adjusting method and device
CN113702850A (en) Battery detection method for transmitting CAN message based on process flow

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