CN114884765A - PLC bus communication method and system based on relay equipment and relay equipment - Google Patents

PLC bus communication method and system based on relay equipment and relay equipment Download PDF

Info

Publication number
CN114884765A
CN114884765A CN202210042608.5A CN202210042608A CN114884765A CN 114884765 A CN114884765 A CN 114884765A CN 202210042608 A CN202210042608 A CN 202210042608A CN 114884765 A CN114884765 A CN 114884765A
Authority
CN
China
Prior art keywords
control module
relay device
message
main control
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210042608.5A
Other languages
Chinese (zh)
Inventor
李东声
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tendyron Corp
Original Assignee
Tendyron Corp
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 Tendyron Corp filed Critical Tendyron Corp
Priority to CN202210042608.5A priority Critical patent/CN114884765A/en
Publication of CN114884765A publication Critical patent/CN114884765A/en
Pending legal-status Critical Current

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/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/40006Architecture of a communication node
    • H04L12/40013Details regarding a bus controller
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

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

Abstract

The invention provides a PLC bus communication method and system based on relay equipment and the relay equipment.

Description

PLC bus communication method and system based on relay equipment and relay equipment
Technical Field
The invention relates to the technical field of PLC communication, in particular to a PLC bus communication method and system based on a relay device and the relay device.
Background
In the existing PLC bus communication system, signal attenuation exists, when a certain device sends data, only a closer device can correctly receive the data, a farther device cannot receive or erroneously receives the data, and if the farther device is required to receive the data, the data transmission efficiency is low. Therefore, how to design a data transmission scheme capable of correctly receiving data and improving signal transmission efficiency is an urgent problem to be solved.
Disclosure of Invention
The present invention is directed to solving the above problems.
The invention mainly aims to provide a PLC bus communication method based on relay equipment;
another object of the present invention is to provide a PLC bus communication system based on a relay device;
it is still another object of the present invention to provide a relay apparatus.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention provides a PLC bus communication method based on relay equipment, which is applied to a PLC bus communication system, wherein the PLC bus communication system comprises: the relay equipment comprises a plurality of relay equipment, a preset number of bus equipment is arranged between every two adjacent relay equipment, the relay equipment comprises a main control module and a secondary control module, and the main control module is connected with the secondary control module in a preset connection mode; the method comprises the following steps: the method comprises the following steps that when an obtained transmission message is a downlink message, a main control module of the ith relay device sends the transmission message, a sub-control module of the (i + 1) th relay device receives the transmission message, whether a message to be uploaded exists or not is judged, if the message to be uploaded exists, the message to be uploaded is sent to the main control module of the ith relay device, transmission operation is executed, if the message to be uploaded does not exist, the transmission operation is executed, and the transmission operation comprises the following steps: judging whether the transmission message needs downlink transmission, if not, judging whether a bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, if not, discarding the transmission message, if the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, sending a hand-lifting uplink message, if so, judging whether the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, if not, sending the transmission message to a main control module of the (i + 1) th relay device, if the bus equipment between the ith relay equipment and the (i + 1) th relay equipment is required to process the transmission message, the lifting uplink message is sent, and the transmission message is sent to the main control module of the (i + 1) th relay equipment; the method comprises the steps that when an obtained transmission message is an uplink message, a main control module of the ith relay device sends the transmission message to a secondary control module of the ith relay device, the secondary control module of the ith relay device receives the transmission message, the secondary control module of the ith relay device sends the transmission message to a main control module of the (i-1) th relay device under the condition that the transmission message is judged to be transmitted in an uplink mode, and the secondary control module of the ith relay device sends the transmission message to the main control module of the ith relay device under the condition that the transmission message is judged to be transmitted in a downlink mode.
In addition, when the secondary control module of the ith relay device determines to transmit the transmission packet uplink, the sending of the transmission packet to the main control module of the ith-1 relay device includes: and judging whether cache waiting is needed, if so, sending the transmission message to the main control module of the i-1 th relay device after the cache waiting is due, and if not, sending the transmission message to the main control module of the i-1 th relay device.
In addition, after the sub-control module of the (i + 1) th relay device determines that the bus device between the (i) th relay device and the (i + 1) th relay device is required to process the transmission message and send the hand-lifting uplink message, the method further includes: the method comprises the steps that a main control module of the ith relay device receives a processing message, the processing message is set between the main control module of the ith relay device and a sub-control module of the (i + 1) th relay device, after receiving the hand-lifting uplink message, the bus device obtains delay time according to the address of the bus device, and after the delay time reaches, the bus device is sent to the main control module of the ith relay device.
Furthermore, the method further comprises: if the processing message comprises a long data identifier which is used for indicating that data is not sent out completely, the main control module of the ith relay device sends a roll call message to the bus device which sends the long data identifier and receives a roll call response, wherein the roll call response is generated by the bus device which sends the long data identifier and carries the response of the data which is not sent out completely.
Furthermore, the method further comprises: the main control module of the ith relay device acquires a first time synchronization instruction; sending a time scale signal, and recording local time when the time scale signal is sent; sending a time mark message, wherein the time mark message comprises: local time when the time scale signal is transmitted; the auxiliary control module of the (i + 1) th relay device receives the time scale signal and records the local time of receiving the time scale signal; and receiving the time mark message, calculating a time offset value, correcting a local clock of the auxiliary control module of the (i + 1) th relay device, generating a second time synchronization instruction and sending the second time synchronization instruction to the main control module of the (i + 1) th relay device.
Furthermore, the method further comprises: and the bus equipment arranged between the master control module of the ith relay equipment and the slave control module of the (i + 1) th relay equipment receives the time scale signal, respectively records the local time of respectively receiving the time scale signal, receives the time scale message, respectively calculates a time offset value, and corrects the local clock of respectively.
Furthermore, the method further comprises: and if the master control module of the ith relay equipment does not receive the hand-lifting uplink message within the preset time, retransmitting the transmission message.
In addition, the (i + 1) th relay device includes a plurality of main control modules, and the main control module that sends the transmission packet to the (i + 1) th relay device includes: and sending the transmission message to a main control module corresponding to the address parameter in the (i + 1) th relay equipment according to the address parameter in the transmission message.
Another aspect of the present invention provides a relay device, including: the system comprises a main control module and a secondary control module, wherein the main control module is connected with the secondary control module in a preset connection mode; wherein: the main control module is used for sending the transmission message under the condition that the acquired transmission message is a downlink message; the secondary control module is configured to receive a transmission packet sent by the main control module of the previous relay device, determine whether a packet to be uploaded exists, send the packet to be uploaded to the main control module of the previous relay device if the packet to be uploaded exists, and execute a transmission operation, and if the packet to be uploaded does not exist, execute the transmission operation, where the transmission operation includes: judging whether the transmission message needs downlink transmission, if not, judging whether a bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, if not, discarding the transmission message, if the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, sending a hand-lifting uplink message, if so, judging whether the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, and if not, sending the transmission message to the main control module, if the bus equipment between the ith relay equipment and the (i + 1) th relay equipment is required to process the transmission message, sending the hand-lifting uplink message and sending the transmission message to the main control module; the main control module is further configured to send the transmission packet to the secondary control module when the acquired transmission packet is an uplink packet; the secondary control module is further configured to receive the transmission packet, send the transmission packet to the main control module of the previous relay device when it is determined that the transmission packet is transmitted in an uplink manner, and send the transmission packet to the main control module when it is determined that the transmission packet is transmitted in a downlink manner.
In addition, the sending, by the secondary control module, the transmission packet to the primary control module of the previous relay device when it is determined that the transmission packet is transmitted uplink in the following manner includes: and judging whether cache waiting is needed, if so, sending the transmission message to the master control module of the previous relay equipment after the cache waiting is due, and if not, sending the transmission message to the master control module of the previous relay equipment.
In addition, the bus device that i +1 th relay device's secondary control module judges between the i th relay device and the i +1 th relay device of needs handles transmission message sends after lifting the hand and going upward the message, host system still is used for after the lifting the hand and going upward the message that the secondary control module of receiving next relay device sent, receives the processing message, it is in for setting up to handle the message host system with bus device between the secondary control module of next relay device receives behind the lifting the hand and going upward the message, according to the address of self, obtain the delay time to reach the back at the delay time master system sends.
In addition, the main control module is further configured to send a roll call packet to the bus device that sends the long data identifier if the processing packet includes the long data identifier, where the long data identifier is used to indicate that data has not been sent out, and receive the roll call response, where the roll call response is generated by the bus device that sends the long data identifier and carries a response of the data that has not been sent out.
In addition, the main control module is further configured to obtain a first time synchronization instruction; sending a time mark signal, and recording the local time when the time mark signal is sent; sending a time mark message, wherein the time mark message comprises: local time when the time scale signal is transmitted; the secondary control module is further configured to receive a time scale signal sent by the main control module of the previous relay device, and record local time of receiving the time scale signal sent by the main control module of the previous relay device; and receiving a time mark message sent by the main control module of the previous relay device, calculating a time deviation value, correcting a local clock, generating a second time synchronization instruction and sending the second time synchronization instruction to the main control module.
In addition, the main control module is further configured to resend the transmission message if the hand-lifting uplink message is not received within a preset time.
In addition, the master control module includes a plurality of, the secondary control module sends the transmission packet to the master control module by the following method: and sending the transmission message to a main control module corresponding to the address parameter according to the address parameter in the transmission message.
The invention further provides a PLC bus communication system based on the relay equipment, which comprises a plurality of relay equipment, wherein a preset number of bus equipment is arranged between every two adjacent relay equipment.
According to the technical scheme provided by the invention, the invention provides the PLC bus communication method and system based on the relay equipment and the relay equipment, a novel PLC bus communication mode is provided, data forwarding is carried out through the relay equipment, signal attenuation is reduced, meanwhile, the bus equipment positioned between two adjacent relay equipment can correctly receive data, and the data transmission efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced 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 based on the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a PLC bus communication system based on a relay device according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a downlink transmission flow and an uplink transmission flow according to an embodiment of the present invention;
FIG. 3 is a schematic view of a hand raising process provided in an embodiment of the present invention;
fig. 4 is a schematic diagram of data transmission of a bus device according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating another data transmission of a bus device according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating data transmission of another bus device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a specific PLC bus communication system based on a relay device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention are 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 only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is a schematic structural diagram illustrating a PLC bus communication system based on a relay device according to an embodiment of the present invention, and referring to fig. 1, the PLC bus communication system based on a relay device according to an embodiment of the present invention includes: the system comprises a plurality of relay devices, and a preset number of bus devices are arranged between every two adjacent relay devices. The preset number of bus devices arranged between each two adjacent relay devices may be the same or different, for example, 15 to 25 bus devices may be arranged, which is not limited in the present invention.
Wherein, the relay equipment includes: the main control module is connected with the auxiliary control module in a preset connection mode. The main control module and the auxiliary control module are respectively connected through an SPI (Serial Peripheral Interface) Serial port, and the main control module and the auxiliary control module are connected through an isolation filter.
The transmission direction of uplink transmission mentioned in the present invention is from the i +1 th relay device to the i +1 th relay device, the transmission direction of downlink transmission is from the i +1 th relay device to the i +1 th relay device, the uplink message is a message transmitted in the uplink transmission direction, and the downlink message is a message transmitted in the downlink transmission direction.
And each relay device is sequentially provided with an auxiliary control module and a main control module according to the downlink transmission direction. That is, only the bus device and the sub-control module of the (i + 1) th relay device that are arranged between the main control module of the ith relay device and the sub-control module of the (i + 1) th relay device can receive the downlink message sent by the main control module of the ith relay device, only the uplink message sent by the main control module of the ith relay device can be sent to the sub-control module of the ith relay device through the SPI serial port, and uplink transmission is performed through the sub-control module of the ith relay device, and only the bus device and the main control module of the (i-1) th relay device that are arranged between the main control module of the (i-1) th relay device and the sub-control module of the ith relay device can receive the uplink message.
The bus device arranged between the main control module of the ith relay device and the sub-control module of the (i + 1) th relay device can receive the downlink message sent by the main control module of the ith relay device and the hands-off uplink message sent by the sub-control module of the (i + 1) th relay device, and send the uplink message to the main control module of the ith relay device.
Each relay device takes the MAC address of the secondary control module as the MAC address of the relay device and binds the MAC address with the logic address of the relay device, each bus device is allocated with the corresponding logic address according to a preset mode, and the logic addresses of the relay device and each bus device are numbered according to the sequence from near to far from the initial control device of the bus. The downlink transmission direction is from a device with a small logical address number to a device with a large logical address number, and the uplink transmission direction is from a device with a large logical address number to a device with a small logical address number.
After receiving any message, the relay device of the present invention may determine that the message is an uplink message or a downlink message, and the manner of determining the uplink message or the downlink message includes:
and if the received message is sent from the slave control module of the relay equipment through the SPI serial port, the message is determined to be a downlink message, and the message is sent to the bus equipment between the relay equipment and the next relay equipment and/or the slave control module of the next relay equipment.
After receiving any message, the relay device of the present invention determines that the message needs uplink transmission or downlink transmission, and the manner of determining uplink transmission or downlink transmission includes:
the secondary control module of each relay device determines uplink transmission or downlink transmission according to the address parameter carried in the message, if the address parameter is larger than the self logical address, the downlink transmission is determined, the message is sent to the main control module of the relay device through the SPI serial port, and if the address parameter is smaller than the self address parameter, the uplink transmission is determined, and the message is sent to the main control module of the previous relay device.
Of course, the method for determining whether the message is an uplink message or a downlink message in the present invention is not limited to the method for determining whether the message needs uplink transmission or downlink transmission, and the method for determining whether the message is an uplink message or a downlink message, which needs uplink transmission or downlink transmission, can also be performed by writing an identifier in the message according to the information indicated by the identifier.
Based on the PLC bus communication system, the following provides a PLC bus communication method based on a relay device according to the present invention, the method including:
the method comprises the following steps that when an obtained transmission message is a downlink message, a main control module of the ith relay device sends the transmission message, a sub-control module of the (i + 1) th relay device receives the transmission message, judges whether the message to be uploaded exists or not, if the message to be uploaded exists, the message to be uploaded is sent to the main control module of the ith relay device, transmission operation is executed, if the message to be uploaded does not exist, the transmission operation is executed, and the transmission operation comprises the following steps: judging whether the transmission message needs downlink transmission, if not, judging whether the bus equipment between the ith relay equipment and the (i + 1) th relay equipment needs to process the transmission message, if not, discarding the transmission message, if the bus equipment between the ith relay equipment and the (i + 1) th relay equipment needs to process the transmission message, sending an uplink message, if so, judging whether the bus equipment between the ith relay equipment and the (i + 1) th relay equipment needs to process the transmission message, if not, sending the transmission message to the main control module of the (i + 1) th relay equipment, if the bus equipment between the ith relay equipment and the (i + 1) th relay equipment is required to process the transmission message, sending a hand-lifting uplink message, and sending the transmission message to a main control module of the (i + 1) th relay equipment;
the method comprises the steps that when an obtained transmission message is an uplink message, a main control module of the ith relay device sends the transmission message to a secondary control module of the ith relay device, the secondary control module of the ith relay device receives the transmission message, the secondary control module of the ith relay device sends the transmission message to a main control module of the (i-1) th relay device under the condition that the transmission message is judged to be transmitted in an uplink mode, and the secondary control module of the ith relay device sends the transmission message to the main control module of the ith relay device under the condition that the transmission message is judged to be transmitted in a downlink mode.
As an optional implementation manner of the embodiment of the present invention, the method for PLC bus communication based on a relay device further includes: a main control module of the ith relay equipment acquires a first time synchronization instruction; sending a time mark signal, and recording the local time when the time mark signal is sent; and sending a time mark message, wherein the time mark message comprises: local time when the time scale signal is transmitted; the auxiliary control module of the (i + 1) th relay device receives the time mark signal and records the local time of receiving the time mark signal; receiving the time mark message, calculating a time offset value, correcting a local clock of the secondary control module of the (i + 1) th relay device, generating a second time synchronization instruction and sending the second time synchronization instruction to the main control module of the (i + 1) th relay device.
As an optional implementation manner of the embodiment of the present invention, the method for PLC bus communication based on a relay device further includes: and the bus equipment arranged between the main control module of the ith relay equipment and the sub-control module of the (i + 1) th relay equipment receives the time mark signals, respectively records the local time of respectively receiving the time mark signals, receives the time mark messages, respectively calculates time deviation values and corrects the respective local clocks.
Specifically, time synchronization of the bus may be initiated via a master control module of the relay device, and the slave control module of each relay device and the bus device perform time synchronization. After the secondary control module of the relay device sends the time synchronization instruction to the main control module of the relay device, the main control module of the relay device continues to execute the initiated process until the last relay device on the bus completes time synchronization.
Specifically, taking fig. 2 as an example, downlink transmission and uplink transmission of the ith relay device provided in the embodiment of the present invention are described:
wherein, the downlink transmission comprises:
s101a, the secondary control module of the ith relay device acquires a downlink message, and sends the downlink message to the main control module of the ith relay device through the SPI serial port, wherein the downlink message can be received by the secondary control module of the ith relay device from the main control module of the (i-1) th relay device or from the main control module of the ith relay device;
s102a, the main control module of the ith relay device sends the downlink packet to the secondary control module of the (i + 1) th relay device, where the sending mode includes: modifying the destination address of the downlink message into the address of the (i + 1) th relay device, or setting the destination address as a broadcast address for broadcast transmission;
s103a, after receiving the downlink message, the slave control module of the (i + 1) th relay device sends the downlink message to the master control module of the (i + 1) th relay device through the SPI serial port. In this step, after receiving the downlink message, the slave control module of the (i + 1) th relay device also determines whether a message to be uploaded exists, if the message to be uploaded exists, the message to be uploaded is sent to the master control module of the (i) th relay device, the downlink message is sent to the master control module of the (i + 1) th relay device through the SPI serial port, and if the message to be uploaded does not exist, the downlink message is directly sent to the master control module of the (i + 1) th relay device through the SPI serial port.
The uplink transmission includes:
s101b, the secondary control module of the ith relay device acquires an uplink message and sends the uplink message to the main control module of the (i-1) th relay device, wherein the uplink message can be received by the secondary control module of the ith relay device from the main control module of the (i-1) th relay device or received by the main control module of the ith relay device; the sending mode comprises the following steps: modifying the destination address of the uplink message into the address of the (i-1) th relay equipment, or setting the destination address as a broadcast address for broadcast transmission;
s102b, the main control module of the i-1 th relay device sends the uplink message to the secondary control module of the i-1 th relay device through the SPI serial port.
As an optional implementation manner of the embodiment of the present invention, when determining that the transmission packet is transmitted in an uplink manner, the sending, by the secondary control module of the ith relay device, the transmission packet to the main control module of the i-1 th relay device includes: and judging whether cache waiting is needed, if so, sending the transmission message to the main control module of the (i-1) th relay equipment after the cache waiting is due, and if not, sending the transmission message to the main control module of the (i-1) th relay equipment. Specifically, under the condition that the secondary control module of the ith relay device cannot perform uplink transmission immediately, the buffer waits for a certain time to perform uplink transmission, so that signal aliasing is avoided when a message is sent to the main control module of the (i-1) th relay device.
Taking fig. 3 as an example, a hand-lifting process provided by the embodiment of the present invention is explained:
s201, a secondary control module of the ith relay device acquires a downlink message, and sends the downlink message to a main control module of the ith relay device through an SPI (serial peripheral interface) serial port, wherein the downlink message can be received by the secondary control module of the ith relay device from the main control module of the ith-1 relay device or received by the main control module of the ith relay device;
s202, a main control module of the ith relay device broadcasts and sends the downlink message, the downlink message carries address parameters of bus devices needing to respond, a secondary control module of the (i + 1) th relay device receives the downlink message, the secondary control module of the (i + 1) th relay device judges whether the transmission message needs downlink transmission, if the transmission message does not need downlink transmission, the step S204 is executed, and if the transmission message needs downlink transmission, the step S203 is executed;
s203, the secondary control module of the (i + 1) th relay device sends the downlink message to the main control module of the (i + 1) th relay device through the SPI serial port, and executes the step S204;
s204, the sub-control module of the (i + 1) th relay device judges whether the downlink message needs to be processed, if the transmission message does not need to be processed by the bus device between the (i) th relay device and the (i + 1) th relay device, the transmission message is discarded, if the transmission message needs to be processed by the bus device between the (i) th relay device and the (i + 1) th relay device, the hand-lifting uplink message is sent, and the sending mode of the hand-lifting uplink message comprises the following steps: setting a destination address as a broadcast address for broadcast transmission; the need to process the downlink packet refers to: the address parameter carried in the downlink message is used to indicate that the bus device corresponding to the address parameter between the ith relay device and the (i + 1) th relay device needs to process the downlink message.
As an optional implementation manner of the embodiment of the present invention, if the slave control module of the (i + 1) th relay device receives the uplink packet and there is a downlink packet to be processed at this time, the slave control module sends the uplink packet to the master control module of the (i) th relay device after waiting for a certain time for buffering the uplink packet (after the operation of processing the transmission packet by the bus device between the (i) th relay device and the (i + 1) th relay device is completed).
In this step, the master control module of the ith relay device waits for the processed message sent by the bus device after receiving the hand-lifting uplink message.
As an optional implementation manner of the embodiment of the present invention, the method for PLC bus communication based on a relay device further includes: and if the master control module of the ith relay equipment does not receive the hand-lifting uplink message within the preset time, retransmitting the transmission message. Specifically, if the master control module of the ith relay device finishes sending the downlink message and if the hand-lifting uplink message is not received within the preset time, the slave control module of the (i + 1) th relay device is considered not to receive the downlink message or a link error occurs, the downlink message is sent again, so that the slave control module of the (i + 1) th relay device can correctly receive the downlink message, and if the hand-lifting uplink message is not received after repeated execution for multiple times, the link error is considered and the wrong device can be reported, so that related personnel can perform link maintenance.
And S205, generating a processing message by the bus equipment corresponding to the address parameter between the ith relay equipment and the (i + 1) th relay equipment, after receiving the hand-lifting uplink message, sending the processing message to the main control module of the ith relay equipment in a preset mode, and respectively receiving the processing message sent by each bus equipment by the main control module of the ith relay equipment.
As an optional implementation manner of the embodiment of the present invention, after the sub-control module of the (i + 1) th relay device determines that the bus device between the (i) th relay device and the (i + 1) th relay device is required to process the transmission message, and sends the hand-lifting uplink message, the PLC bus communication method based on the relay device further includes: the master control module of the ith relay device receives a processing message, wherein the processing message is sent to the master control module of the ith relay device after a bus device arranged between the master control module of the ith relay device and the auxiliary control module of the (i + 1) th relay device receives the hand-lifting uplink message, and the delay time is obtained according to the address of the bus device and is sent to the master control module of the ith relay device after the delay time is reached. Each bus device transmits the processing message after delaying for a period of time, so that the problem of signal aliasing caused by the fact that the bus devices transmit the processing messages at the same time is solved.
As an optional implementation manner of the embodiment of the present invention, the method for PLC bus communication based on a relay device further includes: if the processing message comprises a long data identifier which is used for indicating that the data is not sent out, the main control module of the ith relay device sends the roll call message to the bus device which sends the long data identifier, and receives a roll call response which is generated for the bus device which sends the long data identifier and carries the response of the data which is not sent out. Because the data volume of the data sent by the bus equipment is limited, if the bus equipment needs to send long data, the long data can be split and sent, the main control module of the ith relay equipment is repeatedly executed to send the roll call message, and the bus equipment returns the roll call response operation to finish the operation of sending the long data.
And S206, the main control module of the ith relay device sends the processing message to the secondary control module of the ith relay device through the SPI serial port, wherein the main control module of the ith relay device can recombine the processing message sent by each bus device and then send the processing message to the secondary control module of the ith relay device, and the processing message can also be sent to the secondary control module of the ith relay device every time one processing message is received.
Taking fig. 4 as an example, a description is given to a data transmission flow of a bus device according to an embodiment of the present invention: in this example, the a bus device and the B bus device are each located between the ith relay device and the (i + 1) th relay device.
S301, a main control module of an ith relay device broadcasts and sends a downlink message (for example, a message indicating data transmission, where the message indicating data transmission is used to indicate that, after the downlink message is sent, a bus device between the ith relay device and an (i + 1) th relay device can start a data transmission function), and the bus device between the ith relay device and the (i + 1) th relay device and a sub-control module of the (i + 1) th relay device receive the downlink message;
s302, the sub-control module of the (i + 1) th relay device sends the hand-lifting uplink message, and the sending mode of the hand-lifting uplink message comprises the following steps: setting a destination address as a broadcast address for broadcast transmission;
s303, after receiving the hand-lifting uplink message, the bus device A calculates delay time according to a logic address of the bus device A, and after the delay time is up, the bus device A sends a processing message to a main control module of the ith relay device, wherein the processing message comprises an address parameter which indicates that the message to be processed is transmitted to the bus device B, and the address parameter can be the logic address of the bus device B, for example;
s304, after receiving the processing message, the main control module of the ith relay device sends the processing message to the secondary control module of the ith relay device through the SPI serial port;
s305, the auxiliary control module of the ith relay device judges whether the address parameter indication in the processed message is sent to the B bus device, and the logic address of the B bus device is larger than the logic address of the B bus device, so that the message to be processed is sent to the main control module of the ith relay device through the SPI serial port;
s306, the main control module of the ith relay device sends the processed packet to the B bus device, where the sending mode may include: and broadcasting or modifying the destination address into a logical address of the B bus equipment for transmission, so that the B bus equipment receives the processing message transmitted by the A bus equipment.
Taking fig. 5 as an example, a description is given to another data transmission flow of a bus device according to an embodiment of the present invention: in this example, the a bus devices are each located between the i-1 st relay device and the i-th relay device, and the B bus device is located between the i-th relay device and the i +1 th relay device.
S401, a main control module of an i-1 th relay device broadcasts and sends a downlink message (for example, a message indicating data transmission, the message indicating data transmission is used for indicating that after the downlink message is sent, a bus device between the i-1 th relay device and the i-th relay device can start a data transmission function), and the bus device between the i-1 th relay device and the i-th relay device and a sub-control module of the i-th relay device receive the downlink message;
s402, the auxiliary control module of the ith relay device sends the hand-lifting uplink message, and the sending mode of the hand-lifting uplink message comprises the following steps: setting a destination address as a broadcast address for broadcast transmission;
s403, after receiving the hand-lifting uplink message, the bus device A calculates delay time according to a logic address of the bus device A, and after the delay time is up, sends a processing message to a main control module of the (i-1) th relay device, wherein the processing message comprises an address parameter which indicates that the message to be processed is transmitted to the bus device B, and the address parameter can be the logic address of the bus device B, for example;
s404, after receiving the processing message, the main control module of the i-1 th relay device sends the processing message to the auxiliary control module of the i-1 th relay device through the SPI serial port;
s405, the secondary control module of the i-1 th relay device judges whether the address parameter indication in the processing message is sent to the B bus device, and the logic address of the B bus device is larger than the logic address of the B bus device, and sends the processing message to the primary control module of the i-1 th relay device through the SPI serial port; or the auxiliary control module of the i-1 th relay device judges whether the address parameter indication in the processing message is sent to the B bus device, and the logical address of the B bus device is larger than that of the auxiliary control module of the i-th relay device, the processing message carries information indicating that the main control module of the i-1 th relay device sends the processing message to the auxiliary control module of the i-th relay device, and the processing message is sent to the main control module of the i-1 th relay device through the SPI serial port;
s406, the main control module of the i-1 th relay device receives the processing message, and if the processing message carries information indicating that the main control module of the i-1 th relay device sends the processing message to the auxiliary control module of the i-th relay device, the processing message is sent to the auxiliary control module of the i-th relay device; or directly sending the processing message in a broadcast way; or the main control module of the i-1 th relay equipment judges whether the address parameter indication is sent to the B bus equipment, the logical address of the B bus equipment is larger than that of the auxiliary control module of the i-th relay equipment, and the processing message is sent by taking the logical address of the auxiliary control module of the i-th relay equipment as a destination address;
s407, the auxiliary control module of the ith relay device receives the processing message, and judges whether the address parameter indication in the processing message is sent to the B bus device, and the logic address of the B bus device is larger than the logic address of the B bus device, so that the message to be processed is sent to the main control module of the ith relay device through the SPI serial port;
s408, the main control module of the ith relay device sends the processed packet to the B bus device, and the sending mode may include: and broadcasting or modifying the destination address into a logical address of the B bus equipment for transmission, so that the B bus equipment receives the processing message transmitted by the A bus equipment.
Taking fig. 6 as an example, a description is given to a data transmission flow of another bus device according to an embodiment of the present invention: in this example, the a bus devices are located between the ith relay device and the (i + 1) th relay device, and the B bus devices are located between the (i-1) th relay device and the ith relay device.
S501, a main control module of an ith relay device broadcasts and sends a downlink message (for example, a message indicating data transmission, the message indicating data transmission is used for indicating that after the downlink message is sent, a bus device between the ith relay device and an (i + 1) th relay device can start a data transmission function), and the bus device between the ith relay device and the (i + 1) th relay device and a secondary control module of the (i + 1) th relay device receive the downlink message;
s502, the auxiliary control module of the (i + 1) th relay device sends the hand-lifting uplink message, and the sending mode of the hand-lifting uplink message comprises the following steps: setting a destination address as a broadcast address for broadcast transmission;
s503, after receiving the hand-lifting uplink message, the bus device A calculates delay time according to a self logic address, and after the delay time is up, sends a processing message to a main control module of the ith relay device, wherein the processing message comprises an address parameter which indicates that the message to be processed is transmitted to the bus device B, and the address parameter can be the logic address of the bus device B, for example;
s504, after receiving the processing message, the main control module of the ith relay device sends the processing message to the secondary control module of the ith relay device through the SPI serial port;
s505, the auxiliary control module of the ith relay equipment judges whether the address parameter indication in the processing message is sent to the B bus equipment, the logic address of the B bus equipment is smaller than the logic address of the B bus equipment, and the processing message is sent to a main control module of the (i-1) th relay equipment in a broadcast sending mode or in a sending mode by taking the logic address of the (i-1) th relay equipment as a destination address;
s506, the main control module of the i-1 th relay device sends the processing message to the auxiliary control module of the i-1 th relay device through the SPI serial port;
s507, the auxiliary control module of the i-1 th relay device receives the processing message, judges whether the address parameter indication in the processing message is sent to the B bus device, and the logic address of the B bus device is larger than that of the auxiliary control module of the i-1 th relay device, and sends the processing message to the main control module of the i-1 th relay device through the SPI serial port;
s508, the main control module of the i-1 th relay device receives the processing packet, and sends the processing packet to the B bus device, where the sending method may include: and broadcasting or modifying the destination address into a logical address of the B bus equipment for transmission, so that the B bus equipment receives the processing message transmitted by the A bus equipment.
As an optional implementation manner of the embodiment of the present invention, the (i + 1) th relay device includes a plurality of main control modules, and the main control module that sends the transmission packet to the (i + 1) th relay device includes: and sending the transmission message to a main control module corresponding to the address parameter in the (i + 1) th relay equipment according to the address parameter in the transmission message. In this embodiment, one relay device may include a plurality of main control modules, thereby implementing communication with a branch line.
Taking fig. 7 as an example, a description is given to a data transmission flow of another bus device according to an embodiment of the present invention: in this example, the a bus devices are located between the ith relay device and the (i + 1) th relay device, and the B bus devices are located between the (i-1) th relay device and the ith relay device.
(1) The bus device A between two adjacent relay devices sends a message to the bus device B:
a bus equipment (logic address is 1.1.1) sends a message, and the address parameter carried by the message is the logic address 1.1.3 of B bus equipment;
on the relay device 0.1.3, the main control module managing the branch line 1.1.0 in the relay device 0.1.3 receives the message with the address parameter of 1.1.3, and transfers the message to the auxiliary control module on the relay device 0.1.3 through the internal circuit.
The auxiliary control module on the relay equipment 0.1.3 judges that the target equipment is on the branch of the relay equipment according to the address parameter of the message, and transfers the message to the main control module managing the branch line 1.1.0 again through the internal circuit;
the main control module managing the branch line 1.1.0 sends out the message according to the sending convention of the downlink message, and the B bus device 1.1.3 receives the message.
(2) The method comprises the following steps that A bus equipment sends a message to C bus equipment, wherein the A bus equipment and the C bus equipment are positioned between different adjacent relay equipment:
a bus equipment (logic address is 1.1.1) sends a message, and the address parameter carried by the message is the logic address 1.1.7 of C bus equipment;
on the relay device 0.1.3, the main control module managing the branch line 1.1.0 in the relay device 0.1.3 receives the message with the address parameter of 1.1.7, and transfers the message to the auxiliary control module on the relay device 0.1.3 through the internal circuit.
The auxiliary control module on the relay equipment 0.1.3 judges that the target equipment is on the branch of the relay equipment according to the address parameter 1.1.7 of the message, and transfers the message to the main control module managing the branch line 1.1.0 again through the internal circuit;
the main control module managing the branch line 1.1.0 sends out the message according to the sending convention of the downlink message;
the secondary control module of the relay device 1.1.4 receives the message, and the secondary control module of the relay device 1.1.4 judges that the message needs to continue downlink transmission according to the address parameter 1.1.7 of the message, so that the message is transferred to the main control module of the relay device 1.1.4 through an internal circuit;
the main control module of the relay device 1.1.4 sends the message by the transmission agreement of the downlink message, and the C bus device 1.1.7 receives the message.
(3) D, the bus equipment sends messages to the C bus equipment on other branches:
d bus equipment (the logic address is 1.2.2) sends a message, and the address parameter carried by the message is the logic address 1.1.7 of the C bus equipment;
the main control module of the management branch 1.2.0 on the relay device 0.2.5 receives the message with the address parameter of 1.1.7, and transfers the received message to the secondary control module on the relay device 0.2.5 through an internal circuit;
the secondary control module on the relay device 0.2.5 judges that the destination device is not on the administered branch or the tail of the connected branch according to the address parameter 1.1.7 of the message, and uploads the message to the main control module managing 0.2.0 branches on the relay device 0.0.20 according to a default routing strategy;
the main control module managing 0.2.0 branches on the trunk device 0.0.20 receives the message, and transfers the received message to the secondary control module of the trunk device 0.0.20 through an internal circuit;
the secondary control module of the relay device 0.0.20 determines that the message needs to be transmitted in an uplink manner according to the address parameter of the message, and uploads the message to the main control module of the relay device 0.0.16;
after receiving the message, the main control module of the relay device 0.0.16 continues to forward the message in the uplink until the secondary control module of the relay device 0.0.8;
the secondary control module of the relay equipment 0.0.8 judges that the target equipment is on the 0.1.0 branch managed by the relay equipment 0.0.8 according to the address parameter of the message, and transfers the message to the primary control module of the relay equipment 0.0.8 management 0.1.0 branch through an internal circuit;
the relay device 0.0.8 manages the main control module of the 0.1.0 branch to forward the message in the downlink until the message is sent to the C bus device 1.1.7.
Therefore, the PLC bus communication method based on the relay equipment provided by the embodiment of the invention provides a new PLC bus communication mode, data forwarding is carried out through the relay equipment, signal attenuation is reduced, meanwhile, the bus equipment positioned between two adjacent relay equipment can correctly receive data, and the data transmission efficiency is improved.
In the following, a brief description is given of the structure and function of the relay device provided in the embodiment of the present invention, and other matters are not to be taken in the detailed description, referring to the relevant description in the PLC bus communication method based on the relay device, the relay device is applied to the PLC bus communication method based on the relay device for data forwarding, and the relay device includes: the system comprises a main control module and a secondary control module, wherein the main control module is connected with the secondary control module in a preset connection mode;
the main control module is used for sending the transmission message under the condition that the acquired transmission message is a downlink message;
the auxiliary control module is used for receiving the transmission message sent by the main control module of the previous relay device, judging whether a message to be uploaded exists or not, if the message to be uploaded exists, sending the message to be uploaded to the main control module of the previous relay device, and executing transmission operation, and if the message does not exist, executing transmission operation, wherein the transmission operation comprises the following steps: judging whether the transmission message needs downlink transmission, if not, judging whether the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, if not, discarding the transmission message, if the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, sending the uplink message, if the downlink transmission needs, judging whether the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, if the bus device between the ith relay device and the (i + 1) th relay device does not need to process the transmission message, sending the transmission message to a main control module, if the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, sending the hand-lifting uplink message and sending the transmission message to the main control module;
the main control module is also used for sending the transmission message to the auxiliary control module under the condition that the obtained transmission message is an uplink message;
and the secondary control module is also used for receiving the transmission message, sending the transmission message to the main control module of the previous relay device under the condition of judging that the transmission message is transmitted in an uplink manner, and sending the transmission message to the main control module under the condition of judging that the transmission message is transmitted in a downlink manner.
As an optional implementation manner of the embodiment of the present invention, the sending, by the secondary control module, the transmission packet to the primary control module of the previous relay device in a case that it is determined that the transmission packet is transmitted uplink in the following manner includes: and judging whether cache waiting is needed, if so, sending the transmission message to the main control module of the previous relay equipment after the cache waiting is due, and if not, sending the transmission message to the main control module of the previous relay equipment.
As an optional implementation manner of the embodiment of the present invention, after the sub-control module of the (i + 1) th relay device determines that the bus device between the (i) th relay device and the (i + 1) th relay device is required to process the transmission message, and sends the hand-lifting uplink message, the main control module is further configured to receive the processing message after receiving the hand-lifting uplink message sent by the sub-control module of the next relay device, where the processing message is obtained according to an address of the bus device arranged between the main control module and the sub-control module of the next relay device after receiving the hand-lifting uplink message, and is sent to the main control module after the time delay reaches the address of the bus device.
As an optional implementation manner of the embodiment of the present invention, the main control module is further configured to send the roll call packet to the bus device that sends the long data identifier if the processing packet includes the long data identifier, where the long data identifier is used to indicate that data is not sent out, and receive a roll call response, where the roll call response is generated by the bus device that sends the long data identifier and carries a response of the data that is not sent out.
As an optional implementation manner of the embodiment of the present invention, the main control module is further configured to obtain a first time synchronization instruction; sending a time mark signal, and recording the local time when the time mark signal is sent; and sending a time mark message, wherein the time mark message comprises: local time when the time scale signal is transmitted; the secondary control module is also used for receiving the time scale signal sent by the main control module of the previous relay device and recording the local time of receiving the time scale signal sent by the main control module of the previous relay device; and receiving a time mark message sent by the main control module of the previous relay device, calculating a time deviation value, correcting a local clock, generating a second time synchronization instruction and sending the second time synchronization instruction to the main control module.
As an optional implementation manner of the embodiment of the present invention, the main control module is further configured to resend the transmission message if the uplink message of the handset is not received within the preset time.
As an optional implementation manner of the embodiment of the present invention, the master control module includes a plurality of slave control modules, and the sending of the transmission packet to the master control module by the slave control module in the following manner includes: and sending the transmission message to a main control module corresponding to the address parameter according to the address parameter in the transmission message.
Therefore, the relay device provided by the embodiment of the invention provides a new communication mode of the PLC bus, the data is forwarded through the relay device, the signal attenuation is reduced, meanwhile, the bus device positioned between two adjacent relay devices can correctly receive the data, and the data transmission efficiency is improved.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made in the above embodiments by those of ordinary skill in the art without departing from the principle and spirit of the present invention. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (16)

1. A PLC bus communication method based on a relay device is applied to a PLC bus communication system, and the PLC bus communication system comprises: the relay equipment comprises a plurality of relay equipment, a preset number of bus equipment is arranged between every two adjacent relay equipment, the relay equipment comprises a main control module and a secondary control module, and the main control module is connected with the secondary control module in a preset connection mode;
the method comprises the following steps:
under the condition that the obtained transmission message is a downlink message, the main control module of the ith relay equipment sends the transmission message, the auxiliary control module of the (i + 1) th relay equipment receives the transmission message, judges whether a message to be uploaded exists, if the message to be uploaded exists, sends the message to be uploaded to the main control module of the ith relay equipment and executes transmission operation, and if the message to be uploaded does not exist, executes the transmission operation, wherein the transmission operation comprises the following steps: judging whether the transmission message needs downlink transmission, if not, judging whether a bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, if not, discarding the transmission message, if the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, sending a hand-lifting uplink message, if so, judging whether the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, if not, sending the transmission message to a main control module of the (i + 1) th relay device, if the bus equipment between the ith relay equipment and the (i + 1) th relay equipment is required to process the transmission message, the lifting uplink message is sent, and the transmission message is sent to the main control module of the (i + 1) th relay equipment;
the method comprises the steps that when an obtained transmission message is an uplink message, a main control module of the ith relay device sends the transmission message to a secondary control module of the ith relay device, the secondary control module of the ith relay device receives the transmission message, the secondary control module of the ith relay device sends the transmission message to a main control module of the (i-1) th relay device under the condition that the transmission message is judged to be transmitted in an uplink mode, and the secondary control module of the ith relay device sends the transmission message to the main control module of the ith relay device under the condition that the transmission message is judged to be transmitted in a downlink mode.
2. The method according to claim 1, wherein, when the secondary control module of the i-th relay device determines to uplink-transmit the transmission packet, the sending the transmission packet to the main control module of the i-1-th relay device includes:
and judging whether cache waiting is needed, if so, sending the transmission message to the main control module of the i-1 th relay device after the cache waiting is due, and if not, sending the transmission message to the main control module of the i-1 th relay device.
3. The method according to claim 1, wherein after the slave control module of the (i + 1) th relay device determines that the bus device between the (i) th relay device and the (i + 1) th relay device is required to process the transmission packet, and sends the hands-off uplink packet, the method further comprises:
the method comprises the steps that a main control module of the ith relay device receives a processing message, the processing message is set between the main control module of the ith relay device and a sub-control module of the (i + 1) th relay device, after receiving the hand-lifting uplink message, the bus device obtains delay time according to the address of the bus device, and after the delay time reaches, the bus device is sent to the main control module of the ith relay device.
4. The method of claim 3, further comprising:
if the processing message comprises a long data identifier which is used for indicating that data is not sent out completely, the main control module of the ith relay device sends a roll call message to the bus device which sends the long data identifier and receives a roll call response, wherein the roll call response is generated by the bus device which sends the long data identifier and carries the response of the data which is not sent out completely.
5. The method of claim 1, further comprising:
the main control module of the ith relay device acquires a first time synchronization instruction; sending a time mark signal, and recording the local time when the time mark signal is sent; sending a time mark message, wherein the time mark message comprises: local time when the time scale signal is transmitted;
the auxiliary control module of the (i + 1) th relay device receives the time scale signal and records the local time of receiving the time scale signal; and receiving the time mark message, calculating a time offset value, correcting a local clock of the auxiliary control module of the (i + 1) th relay device, generating a second time synchronization instruction and sending the second time synchronization instruction to the main control module of the (i + 1) th relay device.
6. The method of claim 5, further comprising:
and the bus equipment arranged between the master control module of the ith relay equipment and the slave control module of the (i + 1) th relay equipment receives the time scale signal, respectively records the local time of respectively receiving the time scale signal, receives the time scale message, respectively calculates a time offset value, and corrects the local clock of respectively.
7. The method of claim 1, further comprising:
and if the master control module of the ith relay equipment does not receive the hand-lifting uplink message within the preset time, retransmitting the transmission message.
8. The method according to claim 1, wherein the (i + 1) th relay device includes a plurality of master control modules, and the sending the transmission packet to the (i + 1) th relay device includes:
and sending the transmission message to a main control module corresponding to the address parameter in the (i + 1) th relay equipment according to the address parameter in the transmission message.
9. A relay device, comprising: the system comprises a main control module and a secondary control module, wherein the main control module is connected with the secondary control module in a preset connection mode; wherein:
the main control module is used for sending the transmission message under the condition that the acquired transmission message is a downlink message;
the secondary control module is configured to receive a transmission packet sent by the main control module of the previous relay device, determine whether a packet to be uploaded exists, send the packet to be uploaded to the main control module of the previous relay device if the packet to be uploaded exists, and execute a transmission operation, and if the packet to be uploaded does not exist, execute the transmission operation, where the transmission operation includes: judging whether the transmission message needs downlink transmission, if not, judging whether a bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, if not, discarding the transmission message, if the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, sending a hand-lifting uplink message, if so, judging whether the bus device between the ith relay device and the (i + 1) th relay device needs to process the transmission message, and if not, sending the transmission message to the main control module, if the bus equipment between the ith relay equipment and the (i + 1) th relay equipment is required to process the transmission message, sending the hand-lifting uplink message and sending the transmission message to the main control module;
the main control module is further configured to send the transmission packet to the secondary control module when the acquired transmission packet is an uplink packet;
the secondary control module is further configured to receive the transmission packet, send the transmission packet to the main control module of the previous relay device when it is determined that the transmission packet is transmitted in an uplink manner, and send the transmission packet to the main control module when it is determined that the transmission packet is transmitted in a downlink manner.
10. The relay device according to claim 9, wherein the master control module that sends the transmission packet to the previous relay device when determining that the transmission packet is transmitted uplink by using the following method:
and judging whether cache waiting is needed, if so, sending the transmission message to the main control module of the previous relay device after the cache waiting is due, and if not, sending the transmission message to the main control module of the previous relay device.
11. The relay device according to claim 9, wherein after the sub-control module of the i +1 th relay device determines that the bus device between the i-th relay device and the i +1 th relay device is required to process the transmission packet and send the hand-up packet, the main control module is further configured to receive a processing packet after receiving the hand-up packet sent by the sub-control module of the next relay device, where the processing packet is received by the bus device between the main control module and the sub-control module of the next relay device, obtain a delay time according to an address of the bus device, and send the delay time to the main control module after the delay time reaches.
12. The relay device of claim 11,
the main control module is further configured to send a roll call packet to the bus device that sends the long data identifier if the processing packet includes the long data identifier, where the long data identifier is used to indicate that data is not sent out, and receive the roll call response, where the roll call response is generated by the bus device that sends the long data identifier and carries a response of the data that is not sent out.
13. The relay device of claim 9,
the main control module is also used for acquiring a first time synchronization instruction; sending a time mark signal, and recording the local time when the time mark signal is sent; sending a time mark message, wherein the time mark message comprises: local time when the time scale signal is transmitted;
the secondary control module is further configured to receive a time scale signal sent by the main control module of the previous relay device, and record local time of receiving the time scale signal sent by the main control module of the previous relay device; and receiving a time mark message sent by the main control module of the previous relay device, calculating a time deviation value, correcting a local clock, generating a second time synchronization instruction and sending the second time synchronization instruction to the main control module.
14. The relay device of claim 9,
the master control module is further configured to resend the transmission message if the hand-lifting uplink message is not received within a preset time.
15. The relay device according to claim 9, wherein the master control module includes a plurality of slave control modules, and the sending the transmission packet to the master control module by the slave control module includes:
and sending the transmission message to a main control module corresponding to the address parameter according to the address parameter in the transmission message.
16. A PLC bus communication system based on a relay device, comprising a plurality of relay devices according to any one of claims 9 to 15, wherein a predetermined number of bus devices are provided between every two adjacent relay devices.
CN202210042608.5A 2022-01-14 2022-01-14 PLC bus communication method and system based on relay equipment and relay equipment Pending CN114884765A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210042608.5A CN114884765A (en) 2022-01-14 2022-01-14 PLC bus communication method and system based on relay equipment and relay equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210042608.5A CN114884765A (en) 2022-01-14 2022-01-14 PLC bus communication method and system based on relay equipment and relay equipment

Publications (1)

Publication Number Publication Date
CN114884765A true CN114884765A (en) 2022-08-09

Family

ID=82667081

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210042608.5A Pending CN114884765A (en) 2022-01-14 2022-01-14 PLC bus communication method and system based on relay equipment and relay equipment

Country Status (1)

Country Link
CN (1) CN114884765A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102007032845A1 (en) * 2007-07-12 2009-01-22 Systeme Helmholz Gmbh Bi-directional bus repeater for coupling of two buses, has two transmission or receiving units to which two buses are coupled, where bus-repeater is formed as integrated circuit and is integrated in bus plug
CN103828312A (en) * 2012-07-24 2014-05-28 松下电器产业株式会社 Bus system and relay device
CN104756446A (en) * 2012-10-31 2015-07-01 通快机床两合公司 Repeater, CAN communication system, and method for transmitting data telegram within CAN communication system
CN109729444A (en) * 2018-09-30 2019-05-07 深圳前海达闼云端智能科技有限公司 ONU equipment, PON-CAN bus architecture, robot system
CN109981329A (en) * 2017-12-28 2019-07-05 华为终端有限公司 Determine the method, equipment and system of network equipment connection relationship
CN110710165A (en) * 2017-05-24 2020-01-17 Wago管理有限责任公司 Method for determining data bus user equipment of local bus
CN111510217A (en) * 2020-04-15 2020-08-07 南京大学 Photoelectric hybrid bus system applied to long-distance communication of high-speed train

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102007032845A1 (en) * 2007-07-12 2009-01-22 Systeme Helmholz Gmbh Bi-directional bus repeater for coupling of two buses, has two transmission or receiving units to which two buses are coupled, where bus-repeater is formed as integrated circuit and is integrated in bus plug
CN103828312A (en) * 2012-07-24 2014-05-28 松下电器产业株式会社 Bus system and relay device
CN104756446A (en) * 2012-10-31 2015-07-01 通快机床两合公司 Repeater, CAN communication system, and method for transmitting data telegram within CAN communication system
CN110710165A (en) * 2017-05-24 2020-01-17 Wago管理有限责任公司 Method for determining data bus user equipment of local bus
CN109981329A (en) * 2017-12-28 2019-07-05 华为终端有限公司 Determine the method, equipment and system of network equipment connection relationship
CN109729444A (en) * 2018-09-30 2019-05-07 深圳前海达闼云端智能科技有限公司 ONU equipment, PON-CAN bus architecture, robot system
CN111510217A (en) * 2020-04-15 2020-08-07 南京大学 Photoelectric hybrid bus system applied to long-distance communication of high-speed train

Similar Documents

Publication Publication Date Title
US7801173B2 (en) Communication message conversion apparatus and communication message conversion method
JP6500123B2 (en) In-vehicle gateway device and in-vehicle network system
US8572615B2 (en) Parallel computing system, synchronization device, and control method of parallel computing system
EP3927064A1 (en) Transmission method, terminal, and network device
US4901313A (en) A-point to multi-points communication system
JPH0681113B2 (en) Time division multiplex wireless communication system
US7436831B2 (en) Wireless network load generator dynamic MAC hardware address manipulation
US20140052863A1 (en) Node Address Allocation
WO2022111342A1 (en) Communication synchronization method and apparatus, storage medium, chip and related device
US11564241B2 (en) Method for operating a radio communication system for an industrial automation system, radio communication system, base station and subscriber station
EP2846470A1 (en) A method of mobile terminal internal communications
CN107154948A (en) A kind of multi-protocol data exchange method applied to car launcher information control system
WO2016101600A1 (en) Line card determination, determination processing method and device, and line card determination system
CN114884765A (en) PLC bus communication method and system based on relay equipment and relay equipment
CN101184032B (en) Stacked system equipment communication method
CN116567094A (en) Service information processing method based on micro service system
JPH11341041A (en) Relay communication system, its data transfer guarantee monitoring method and communication equipment used for the method
JP2009188623A (en) Network repeater and network repeating method
JP2000269988A (en) Multiple address data transmission system
JPH09261269A (en) Data delivery method
JPS62237835A (en) Data communication control method
CN114726803B (en) Method, communication device, apparatus and storage medium for measuring and feeding back delay information
CN108923537B (en) Intelligent substation maintenance method based on link switching
JP3508615B2 (en) No. Seven-signal level-2 multiplexer and level-2 multiplexer
CN115766595A (en) Communication system for rapid scanning inside PLC

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