Power carrier communication system and method
By grouping the loop unit in the power carrier communication system and feedback the address information and status information by itself when matching the packet identification, the problem of low information transmission efficiency in the prior art is solved, and more efficient communication and resource conservation is achieved .
Patent Information
- Application Number
- CN202411268950.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing power carrier communication system, since the loop card needs to poll multiple loop units one by one to obtain status information, the information transmission efficiency is low, and the number of loop units is large, the communication efficiency is low.
Dividing the loop unit into different packets, each loop unit has a packet identification and a location identification. The loop card sends an online query command frame through the bus. The loop unit itself feedbacks the address information and reports the status information when matching the packet identification. Only when it is received Wake up while querying commands to keep communication idle.
The information transmission efficiency between the loop card and the loop unit is improved, the consumption of system resources is reduced, and the communication is idle.
Smart Images

Figure CN119182423A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power carrier communication, and in particular, to a power carrier communication system and method. Background Art
[0002] At present, the power carrier communication system usually includes: a loop card and multiple loop units, the loop card is the host, and the loop unit is the slave. When the loop card and the multiple loop units communicate, the loop card polls each of the multiple loop units one by one to obtain the status information of each loop unit. Due to the large number of loop units, the efficiency of information transmission is very low. Summary of the invention
[0003] In order to solve the above problems, the purpose of the embodiments of the present application is to provide a power carrier communication system and method.
[0004] In a first aspect, an embodiment of the present application provides a power carrier communication system, including: a loop card and a plurality of loop units;
[0005] The loop card is connected to each loop unit in the plurality of loop units via a bus; wherein each loop unit is divided into different loop unit groups, each loop unit has address information of the loop unit group in which it is located, and the address information of the loop unit group in which each loop unit is located includes: a group identifier of the loop unit group in which the loop unit is located and a position identifier in the loop unit group;
[0006] The loop card is used to send the online query command frame to each loop unit through the bus when the time length from the last time the online query command frame was sent to each loop unit reaches a preset time length, wherein the online query command frame includes: a data unit carrying a group identifier of a loop unit group that needs an online response, a data unit carrying an event response bit, and a data unit carrying feedback address information of the loop unit in the loop unit group that needs an online response;
[0007] Receiving position identifiers fed back by loop units in a loop unit group that needs an online response, and, if there is a loop unit that needs to report an event among the loop units, receiving status information reported by the loop unit that needs to report the event;
[0008] The loop unit is used to, upon receiving the online query command frame sent by the loop card, respond to the data unit of the loop unit feedback address information in the loop unit group requiring online response carried in the online query command frame if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, and feed back the location identifier of the loop unit itself to the loop card;
[0009] If there is an event that needs to be reported, the data unit of the event response bit carried in the online query command frame is responded to, and the state information of the loop unit is reported to the loop card.
[0010] In a second aspect, an embodiment of the present application further provides a power carrier communication method for realizing the function of the loop card described in the first aspect above, the method comprising:
[0011] When the time length from the last time an online query command frame was sent to each loop unit reaches a preset time length, the online query command frame is sent to each loop unit through the bus, wherein the online query command frame includes: a data unit carrying a group identifier of a loop unit group that needs an online response, a data unit carrying an event response bit, and a data unit carrying feedback address information of a loop unit in the loop unit group that needs an online response;
[0012] Receive the position identifiers fed back by the loop units in the loop unit group that needs online response, and when there is a loop unit that needs to report an event among the loop units, receive the status information reported by the loop unit that needs to report the event.
[0013] In a third aspect, an embodiment of the present application further provides a power carrier communication method for realizing the function of the loop unit described in the first aspect above, the method comprising:
[0014] In the case of receiving the online query command frame sent by the loop card, if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, then responding to the data unit of the loop unit feedback address information in the loop unit group requiring online response carried in the online query command frame, the position identifier of the loop unit itself is fed back to the loop card;
[0015] If there is an event that needs to be reported, the data unit of the event response bit carried in the online query command frame is responded to, and the state information of the loop unit is reported to the loop card.
[0016] In the scheme provided in the first aspect of the above-mentioned embodiment of the present application, in the power carrier communication system, each loop unit is divided into different loop unit groups, and each loop unit has the address information of the loop unit group to which it belongs; the loop card is used to send an online query command to each loop unit through the bus, receive the position identifier fed back by the loop unit in the loop unit group that needs to be responded to online, and when there is a loop unit that needs to report an event in each of the loop units, receive the status information reported by the loop unit that needs to report the event; the loop unit is used to, when receiving the online query command frame sent by the loop card, if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, then respond to the data unit of the loop unit feedback address information in the loop unit group that needs to be responded to online carried in the online query command frame, and automatically respond to the loop unit The loop card feeds back its own location identification to the loop card. Compared with the method in the related art that requires the loop card to poll each of the multiple loop units one by one to obtain the status information of each loop unit, when the group identification in the online query command frame received from the loop card matches the group identification of the loop unit itself, the loop unit feeds back its own address information to the loop card, and reports the loop unit's own status information to the loop card when there is an event to be reported. The loop card does not need to poll multiple loop units one by one, and the loop unit can report the status information by itself, so that the loop unit can report the status information in time, thereby improving the information transmission efficiency between the loop card and the loop unit; moreover, the loop unit will only be awakened when it receives the online query command frame sent by the loop card, and is in a sleep state in other cases, thereby maintaining communication idleness to the greatest extent and saving system resources.
[0017] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A schematic diagram of the structure of the power carrier communication system provided in Example 1 of the present application is shown;
[0020] Figure 2 A schematic diagram showing the loop card provided in Embodiment 1 of the present application sending a data unit to the loop unit and the loop unit feeding back a current pulse in the low level section of the data unit sent by the loop unit;
[0021] Figure 3 It shows that the loop card provided in Example 1 of the present application sends an online query command to the loop unit, and the loop unit 3, the loop unit 41 and the loop unit 45 respond to the online query command;
[0022] Figure 4 A flow chart of a power carrier communication method provided in Embodiment 2 of the present application is shown;
[0023] Figure 5 A flow chart of another power carrier communication method provided in Example 3 of the present application is shown. DETAILED DESCRIPTION
[0024] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0025] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0026] In this application, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0027] Before introducing the power carrier communication system and method proposed in this application, the following definitions are given:
[0028] The term "online query command" and the term "online query command frame" have the same meaning.
[0029] At present, the power carrier communication system usually includes: a loop card and multiple loop units, the loop card is the host, and the loop unit is the slave. When the loop card and the multiple loop units communicate, the loop card polls each of the multiple loop units one by one to obtain the status information of each loop unit. Due to the large number of loop units, the efficiency of information transmission is very low.
[0030] Power carrier communication refers to a special communication method that uses power lines as the medium for information transmission to transmit voice or data.
[0031] See also Figure 1 The schematic diagram of the structure of the power carrier communication system shown in the figure includes: 1 loop card and 256 loop units, wherein the 1 loop card and the 256 loop units are connected via a bus.
[0032] The loop card serves as the host in the power carrier communication system, and the loop unit serves as the slave in the power carrier communication system, so the loop card can interact with each of the 256 loop units.
[0033] Moreover, if Figure 1 As shown, every 16 loop units among the 256 loop units can be divided into a group, thereby obtaining 16 loop unit groups, and the group identifier and position identifier of the loop group to which the loop unit is located are assigned to the loop units in different loop unit groups. The group identifier and position identifier assigned to the loop unit form the address information of the loop unit.
[0034] The position identifier is used to indicate the position sequence of the loop unit within the loop unit group.
[0035] In the same loop unit group, the smaller the position identifier of the loop unit is, the closer the loop unit is to the front of the loop unit group.
[0036] In one implementation, the group identifier and the location identifier may each consist of a 4-bit binary number, and the address information of the loop unit then consists of an 8-bit binary number string.
[0037] The first 4 bits of the address information of the loop unit are the group identifier, and the last 4 bits are the position identifier. Then, the value range of the group identifier and the position identifier is between 0 and 15, and can be any integer between 0 and 15.
[0038] For example, when the address information of a loop unit is 10100101, it means that the loop unit group to which the loop unit belongs is 10 (if the address information of the loop unit is a hexadecimal number, the address information of the loop unit is d5, where the group identifier is d and the position identifier is 5), and the position in the loop unit group 10 is 5.
[0039] Based on this, the present embodiment proposes a power carrier communication system and method, in which each loop unit is divided into different loop unit groups, each loop unit has address information of the loop unit group to which it belongs; a loop card is used to send an online query command to each loop unit through a bus, receive a position identifier fed back by a loop unit in the loop unit group that needs an online response, and receive status information reported by the loop unit that needs to report an event when there is a loop unit that needs to report an event in each of the loop units; the loop unit is used to, when receiving an online query command frame sent by the loop card, respond to the loop unit that needs an online response carried in the online query command frame if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself. The loop unit in the unit grouping feeds back the data unit of the address information, feeds back the loop unit's own location identifier to the loop card, and when the group identifier in the online query command frame sent by the loop card matches the group identifier of the loop unit itself, the loop unit feeds back its own address information to the loop card, and reports the loop unit's own status information to the loop card when there is an event to be reported, without the loop card polling multiple loop units one by one, so that the loop unit can report the status information by itself, so that the loop unit can report the status information in time, improving the information transmission efficiency between the loop card and the loop unit; moreover, the loop unit will only be awakened when receiving the online query command frame sent by the loop card, and is in a sleeping state in other cases, which keeps the communication idle to the greatest extent and saves system resources. In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0040] Example 1
[0041] This embodiment provides a power carrier communication system, including: a loop card and a plurality of loop units.
[0042] Among them, multiple loop units are the above Figure 1 256 loop units shown.
[0043] The loop card and each loop unit in the multiple loop units are connected through a bus; wherein each loop unit is divided into different loop unit groups, each loop unit has address information of the loop unit group in which it is located, and the address information of the loop unit group in which each loop unit is located includes: a group identifier of the loop unit group in which the loop unit is located and a position identifier within the loop unit group.
[0044] The loop card is used to send the online query command frame to each loop unit through the bus when the time length since the last online query command frame was sent to each loop unit reaches a preset time length, wherein the online query command frame includes: a data unit carrying a group identifier of the loop unit group that needs an online response, a data unit carrying an event response bit, and a data unit carrying loop unit feedback address information in the loop unit group that needs an online response; a position identifier for receiving loop unit feedback in the loop unit group that needs an online response, and when there is a loop unit that needs to report an event in each of the loop units, receiving status information reported by the loop unit that needs to report the event.
[0045] Here, the preset duration is generally 2 to 3 seconds.
[0046] See also Figure 2 The schematic diagram shown is that the loop card sends a data unit to the loop unit and the loop unit feeds back a current pulse in the low level segment of the data unit sent by the loop unit. A single data unit is a pulse signal; multiple data units sent by the loop card to the loop unit are continuous pulse signals.
[0047] A single data unit includes: a low level segment and a high level segment.
[0048] Here, the low level segment refers to the period of time when the low level continues; the high level segment refers to the period of time when the high level continues.
[0049] The low level segment is the response bit of the loop unit feedback current pulse, and the high level segment is the data sent by the loop card to the loop unit or the feedback information when the loop unit current pulse is received in the low level segment.
[0050] In a single data unit, when the loop card receives the current pulse of the loop unit in the low level segment, the loop card outputs a high level segment of the first duration as feedback information to each loop unit.
[0051] In a single data unit, when the loop card does not receive the current pulse of the loop unit in the low level segment, the loop card outputs a high level segment of the second duration as feedback information to each loop unit; wherein the time length of the first duration is greater than the time length of the second duration.
[0052] In the case of the data unit designed above, the loop unit is required to parse all data units sent by the loop card.
[0053] Optionally, in order to reduce the complexity of system design, the loop unit does not need to parse all data units sent by the loop card. The low-level segment in the data unit is the response bit of the loop unit's feedback current pulse, and the high-level segment is the data sent by the loop card to the loop unit or the feedback information when the loop unit's current pulse is received in the low-level segment. It may only appear when the loop card sends an event query command frame to the loop unit. In other cases, the loop card sends to the loop unit a loop unit with a high-level segment of the second duration, and the loop unit does not need to parse the data unit sent by the loop card, thereby reducing the complexity of system design.
[0054] like Figure 2 As shown, among the continuous data units sent by the loop card, AR1 is a data unit and AR0 is a data unit; wherein, R0 in AR1 and AR0 is a low level segment.
[0055] TA1 in AR1 is a high level segment; TA0 in AR0 is a high level segment.
[0056] Since there is a loop unit generating a current pulse to feed back to the loop card in the low level segment R0 of AR1, and there is no loop unit generating a current pulse to feed back to the loop card in the low level segment R0 of AR0; therefore, the time length of TA1 in AR1 is the first time length; the time length of TA0 in AR0 is the second time length.
[0057] After completing the introduction of the data unit, the functions implemented by the loop unit are introduced through the following content.
[0058] The loop unit is used to, upon receiving the online query command frame sent by the loop card, respond to the data unit of the loop unit feedback address information in the loop unit group requiring online response carried in the online query command frame if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, and feed back the location identifier of the loop unit itself to the loop card;
[0059] If there is an event that needs to be reported, the data unit of the event response bit carried in the online query command frame is responded to, and the state information of the loop unit is reported to the loop card.
[0060] The loop card is used to send the online query command frame to each loop unit through a bus, including the following specific steps:
[0061] A continuous pulse signal as the online query command frame is sent to each loop unit through the bus in the order of a data unit carrying a group identifier of a loop unit group that requires an online response, a data unit carrying an event response bit, and a data unit carrying loop unit feedback address information in the loop unit group that requires an online response.
[0062] Here, the loop unit that feeds back a current pulse to the loop card in the low level segment of the data unit carrying the event response bit is the loop unit that needs to report the event.
[0063] The above events include, but are not limited to: loop unit alarm, loop unit undervoltage, loop unit dirtiness, loop unit power failure, and loop unit sound and light activation.
[0064] The loop unit is used to, when receiving an online query command frame sent by the loop card, respond to the data unit of loop unit feedback address information in the loop unit group requiring online response carried in the online query command frame if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, and feed back the location identifier of the loop unit itself to the loop card; if there is an event to be reported, respond to the data unit of the event response bit carried in the online query command frame, and report the status information of the loop unit to the loop card, including the following steps (1) to (4):
[0065] (1) when receiving a data unit carrying a group identifier of a loop unit group requiring an online response in an online query command frame sent by the loop card, comparing the group identifier of the loop unit itself with the group identifier carried by the online query command frame to obtain a comparison result;
[0066] (2) when the comparison result indicates that the group identifier in the online query command frame matches the group identifier of the loop unit itself and there is no event that needs to be uploaded, after receiving the data unit carrying the event response bit, start to calculate the number of data units received that carry the loop unit feedback address information in the loop unit group that requires an online response;
[0067] (3) when it is determined that the number of data units carrying loop unit feedback address information in the received loop unit group requiring online response is equal to the size of the location identifier of the loop unit itself in the loop unit group, determining that the currently received data unit is a data unit matching the location identifier of the loop unit itself;
[0068] (4) Feedback a current pulse to the loop card in the low-level segment of the data unit that matches the position identifier of the loop unit itself, complete the work of responding to the data unit of the loop unit feedback address information in the loop unit group that needs to be responded to online carried in the online query command frame, and feed back the position identifier of the loop unit itself to the loop card.
[0069] In the above step (2), no event needs to be uploaded, which means: when the loop unit receives the online query command frame, if it is determined that the state of the loop unit itself has not changed during the period between the currently received online query command frame and the last received online query command frame, the loop unit will not feedback a current pulse to the loop card in the low level segment of the data unit carrying the event response bit, which means that the loop unit has no event to upload to the loop card.
[0070] The data unit carrying the event response bit is the data unit carrying the event response bit in the online query command frame.
[0071] When the comparison result indicates that the group identifier in the online query command frame matches the group identifier of the loop unit itself, the loop unit may further perform a flashing operation.
[0072] The advantage of flashing lights in groups of loop units in the power carrier communication system proposed in this embodiment is that it will not cause too much current pulling and also demonstrates the coordination of the system.
[0073] Through the above steps (1) to (4), the process of feeding back the location identifier of the loop unit itself to the loop card in response to the data unit of the loop unit feedback address information in the loop unit group requiring online response carried in the online query command frame is described.
[0074] The following process will continue to explain the process performed by the loop unit that does not need to respond online but needs to report events:
[0075] The loop unit is used to, when receiving an online query command frame sent by the loop card, respond to the data unit of the loop unit feedback address information in the loop unit group requiring online response carried in the online query command frame if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, and feed back the location identifier of the loop unit itself to the loop card; if there is an event to be reported, respond to the data unit of the event response bit carried in the online query command frame, and report the status information of the loop unit to the loop card, and also includes the following specific steps (5) to (10):
[0076] (5) when receiving a data unit carrying a group identifier of a loop unit group requiring an online response in an online query command frame sent by the loop card, comparing the group identifier of the loop unit itself with the group identifier carried by the online query command frame to obtain a comparison result;
[0077] (6) when the comparison result indicates that the group identifier in the online query command frame does not match the group identifier of the loop unit itself and there is an event that needs to be uploaded, a current pulse is fed back to the loop card in the low level segment of the data unit carrying the event response bit, thereby feeding back to the loop card that there is an event that needs to be reported;
[0078] (7) receiving an event query command frame sent by the loop card, and upon receiving a data unit in the event query command frame carrying feedback address information of a loop unit that needs to report an event and receiving a high level segment of the first duration output by the loop card, determining that other loop units have responded to the loop card with address information, then stopping responding to the event query command frame;
[0079] (8) upon receiving the data unit in the event query command frame that carries the feedback address information of the loop unit that needs to report the event and receiving the high level segment of the second duration output by the loop card, determining that no other loop unit responds to the address information to the loop card, then feeding back a current pulse as the address information to the loop card during the low level segment of the data unit that carries the feedback address information of the loop unit that needs to report the event, thereby responding to the loop card with the address information of the loop unit itself bit by bit;
[0080] (9) after receiving the status query command frame sent by the loop card, obtaining the status character string of the loop unit itself, and performing a CRC-8 check on the status character string to obtain first check information;
[0081] (10) The status character string and the first verification information are sent to the loop card to complete the event reporting.
[0082] In the above step (6), there is an event that needs to be uploaded, which means that: after the loop unit receives the online query command frame, when it is determined that the state of the loop unit itself has changed during the period between the currently received online query command frame and the last received online query command frame, the loop unit will feedback a current pulse to the loop card in the low level segment of the data unit carrying the event response bit, indicating that the loop unit has an event that needs to be uploaded to the loop card.
[0083] In the above steps (7) to (8), the loop unit determines whether there are other loop units currently responding to the loop card with address information by receiving the data unit carrying the loop unit feedback address information of the event to be reported in the event query command frame and receiving high-level segments of different durations output by the loop card, so that each loop unit can perform address conflict check.
[0084] Moreover, since the loop unit with larger address information sends out the current pulse that feeds back the address information earlier when responding to the address information, when multiple loop units need to report events to the loop card, the multiple loop units will report the events to the loop card in order from large to small address information.
[0085] The larger the address information is, the larger the grouping identifier of the loop unit group in which the loop unit is located in the address information is. That is, the larger the grouping identifier of the loop unit group in which the loop unit is located in the address information is, the earlier the current pulse for feeding back the address information is sent when responding to the address information.
[0086] In the above step (9), the status string is cached in the register set in the loop unit.
[0087] The specific process of performing CRC-8 check on the status character string to obtain the first check information is prior art and will not be described in detail here.
[0088] The loop card is used to receive status information reported by the loop unit that needs to report an event when there is a loop unit that needs to report an event in each of the loop units, including the following specific steps (11) to (19):
[0089] (11) If the low level segment of the data unit carrying the event response bit in the online query command frame receives the current pulse fed back by the loop unit, an event query command frame is sent to each of the loop units, wherein the event query command frame includes: an event query command frame identifier and a data unit carrying feedback address information of the loop unit to which the event needs to be reported;
[0090] (12) if the low level segment of the data unit carrying the feedback address information of the loop unit of the event to be reported in the event query command frame receives the current pulse as the address information fed back by the loop unit, then outputting a high level segment of the first duration to each loop unit;
[0091] (13) if the low level segment of the data unit carrying the feedback address information of the loop unit of the event to be reported in the event query command frame does not receive the current pulse as the address information fed back by the loop unit, then output a high level segment of the second duration to each loop unit;
[0092] (14) after receiving the address information of the loop unit to which the event needs to be uploaded, based on the address information of the loop unit to which the event needs to be uploaded, sending a status query command frame to the loop unit to which the event needs to be uploaded;
[0093] (15) receiving the status character string and the first verification information fed back by the loop unit of the event that needs to be uploaded;
[0094] (16) performing a CRC-8 check on the received status character string to obtain second check information;
[0095] (17) when the first verification information and the second verification information are the same, obtaining a stored status string, and comparing the stored status string with the received status string to obtain a comparison result;
[0096] (18) obtaining the changed characters in the status string based on the obtained comparison result, and determining the event reported by the loop unit according to the obtained changed characters in the status string;
[0097] (19) Using the received status character string, the stored status character string is updated to complete the storage operation of the received status character string.
[0098] In the above step (11), if the low level segment of the data unit carrying the event response bit in the online query command frame receives the current pulse fed back by the loop unit, it means that a loop unit needs to upload an event.
[0099] In the above step (12), the high-level segment of the first duration output by the loop card to each loop unit refers to the high-level segment in the data unit carrying the feedback address information of the loop unit that needs to report the event.
[0100] In the above step (13), the high level segment of the second duration output by the loop card to each loop unit refers to the high level segment in the data unit carrying the feedback address information of the loop unit that needs to report the event.
[0101] In the above step (16), the loop card performs CRC-8 check on the received status character string to obtain the second check information. The specific process is prior art and will not be described here.
[0102] When the comparison result indicates that the group identifier in the online query command frame matches the group identifier of the loop unit itself and there is an event to be uploaded, the loop unit executes the above steps (1) to (10) in parallel, which will not be repeated here.
[0103] See also Figure 3The loop card shown sends an online query command to the loop unit, as well as responses of loop unit 3, loop unit 41 and loop unit 45 to the online query command (ie, online query command frame).
[0104] In the online query command frame:
[0105] EVT stands for event response bit, and the loop unit that reports the event responds at this bit.
[0106] ONLINE indicates the online response bit, and the loop unit responds to the response bit with matching bit number.
[0107] When the loop card sends the second group of online query commands, the loop unit 3 with event reporting responds in the EVT position, and the loop units 41 and 45 with matching group numbers respond in the response position with matching bit numbers.
[0108] The event response bit is the above-mentioned data unit carrying the event response bit.
[0109] The online response bit is a data unit of loop unit feedback address information in the loop unit group requiring online response carried in the above-mentioned online query command frame.
[0110] To summarize, the present embodiment proposes a power carrier communication system, in which each loop unit is divided into different loop unit groups, each loop unit having address information of the loop unit group to which it belongs; a loop card for sending an online query command to each loop unit through a bus, receiving a position identifier fed back by a loop unit in the loop unit group that needs an online response, and receiving status information reported by the loop unit that needs to report an event when there is a loop unit in each of the loop units that needs to report an event; a loop unit for, upon receiving an online query command frame sent by the loop card, responding to a data unit of the loop unit feedback address information in the loop unit group that needs an online response carried in the online query command frame if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, The location identifier of the unit itself is fed back to the loop card. Compared with the method in the related art that requires the loop card to poll each of the multiple loop units one by one to obtain the status information of each loop unit, when the group identifier in the online query command frame received from the loop card matches the group identifier of the loop unit itself, the loop unit feeds back its own address information to the loop card, and reports the loop unit's own status information to the loop card when there is an event to be reported. There is no need for the loop card to poll multiple loop units one by one, and the loop unit can report the status information by itself, so that the loop unit can report the status information in time, thereby improving the efficiency of information transmission between the loop card and the loop unit; moreover, the loop unit will only be awakened when it receives the online query command frame sent by the loop card, and is in a sleep state in other cases, thereby maintaining communication idleness to the greatest extent and saving system resources.
[0111] Example 2
[0112] See also Figure 4 The flowchart of a power carrier communication method shown in FIG. 1 is a flowchart of a power carrier communication method shown in FIG. 1 . This embodiment proposes a power carrier communication method for realizing the function of the loop card described in the above embodiment 1. The method includes the following specific steps:
[0113] Step 400: When the time length since the last time an online query command frame was sent to each loop unit reaches a preset time length, the online query command frame is sent to each loop unit through the bus, wherein the online query command frame includes: a data unit carrying a group identifier of a loop unit group that requires an online response, a data unit carrying an event response bit, and a data unit carrying feedback address information of the loop unit in the loop unit group that requires an online response.
[0114] Step 402: Receive position identifiers fed back by loop units in a loop unit group that requires online response, and if there is a loop unit that requires event reporting among the loop units, receive status information reported by the loop unit that requires event reporting.
[0115] In the above step 402, when there is a circuit unit that needs to report an event in each of the circuit units, receiving the status information reported by the circuit unit that needs to report the event includes the following steps (20) to (27):
[0116] (20) If the low level segment of the data unit carrying the event response bit in the online query command frame receives the current pulse fed back by the loop unit, an event query command frame is sent to each of the loop units, wherein the event query command frame includes: an event query command frame identifier and a data unit carrying feedback address information of the loop unit to which the event needs to be reported;
[0117] (21) if the low level segment of the data unit carrying the feedback address information of the loop unit of the event to be reported in the event query command frame receives the current pulse as the address information fed back by the loop unit, then outputting a high level segment of the first duration to each loop unit;
[0118] (22) after receiving the address information of the loop unit that needs to upload the event, based on the address information of the loop unit that needs to upload the event, sending a status query command frame to the loop unit that needs to upload the event;
[0119] (23) receiving the status character string and the first verification information fed back by the loop unit of the event that needs to be uploaded;
[0120] (24) performing a CRC-8 check on the received status character string to obtain second check information;
[0121] (25) when the first verification information and the second verification information are the same, obtaining a stored status string, and comparing the stored status string with the received status string to obtain a comparison result;
[0122] (26) obtaining the changed characters in the status string based on the obtained comparison result, and determining the event reported by the loop unit according to the obtained changed characters in the status string;
[0123] (27) Using the received status character string, the stored status character string is updated to complete the storage operation of the received status character string.
[0124] In summary, this embodiment proposes a power carrier communication method, in which each loop unit is divided into different loop unit groups, and each loop unit has address information of the loop unit group to which it belongs; a loop card is used to send an online query command to each loop unit through a bus, receive a position identifier fed back by a loop unit in the loop unit group that needs an online response, and receive status information reported by the loop unit that needs to report an event when there is a loop unit that needs to report an event in each of the loop units; the loop unit is used to, when receiving an online query command frame sent by the loop card, respond to the data unit of the loop unit feedback address information in the loop unit group that needs an online response carried in the online query command frame if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, and send the loop unit The location identifier of the unit itself is fed back to the loop card. Compared with the method in the related art that requires the loop card to poll each of the multiple loop units one by one to obtain the status information of each loop unit, when the group identifier in the online query command frame received from the loop card matches the group identifier of the loop unit itself, the loop unit feeds back its own address information to the loop card, and reports the loop unit's own status information to the loop card when there is an event to be reported. There is no need for the loop card to poll multiple loop units one by one, and the loop unit can report the status information by itself, so that the loop unit can report the status information in time, thereby improving the efficiency of information transmission between the loop card and the loop unit; moreover, the loop unit will only be awakened when it receives the online query command frame sent by the loop card, and is in a sleep state in other cases, thereby maintaining communication idleness to the greatest extent and saving system resources.
[0125] Example 3
[0126] See also Figure 5 The flowchart of a power carrier communication method shown in FIG. 1 is a flowchart of a power carrier communication method shown in FIG. 1 . This embodiment proposes a power carrier communication method for realizing the function of the loop unit described in the above embodiment 1. The method includes the following specific steps:
[0127] Step 500: When receiving an online query command frame sent by the loop card, if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, then in response to the data unit of the loop unit feedback address information in the loop unit group that requires an online response carried in the online query command frame, the location identifier of the loop unit itself is fed back to the loop card.
[0128] Step 502: If there is an event to be reported, respond to the data unit of the event response bit carried in the online query command frame, and report the status information of the loop unit to the loop card.
[0129] In the above step 500, when receiving the online query command frame sent by the loop card, if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, then responding to the data unit of the loop unit feedback address information in the loop unit group that needs online response carried in the online query command frame, the position identifier of the loop unit itself is fed back to the loop card; if there is an event that needs to be reported, responding to the data unit of the event response bit carried in the online query command frame, and reporting the status information of the loop unit to the loop card, including the following steps (30) to (3x):
[0130] (30) when receiving a data unit carrying a group identifier of a loop unit group requiring an online response in an online query command frame sent by the loop card, comparing the group identifier of the loop unit itself with the group identifier carried by the online query command frame to obtain a comparison result;
[0131] (31) when the comparison result indicates that the group identifier in the online query command frame matches the group identifier of the loop unit itself and there is no event that needs to be uploaded, after receiving the data unit carrying the event response bit, start to calculate the number of data units received that carry the loop unit feedback address information in the loop unit group that requires an online response;
[0132] (32) when it is determined that the number of data units carrying loop unit feedback address information in the received loop unit group requiring online response is equal to the size of the location identifier of the loop unit itself in the loop unit group, determining that the currently received data unit is a data unit matching the location identifier of the loop unit itself;
[0133] (33) Feedback a current pulse to the loop card in the low-level segment of the data unit that matches the position identifier of the loop unit itself, complete the work of responding to the data unit of the loop unit feedback address information in the loop unit group that needs an online response carried in the online query command frame, and feed back the position identifier of the loop unit itself to the loop card.
[0134] Further, in the case of receiving the online query command frame sent by the loop card, if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, then responding to the data unit of the loop unit feedback address information in the loop unit group that needs online response carried in the online query command frame, and feeding back the location identifier of the loop unit itself to the loop card; if there is an event that needs to be reported, responding to the data unit of the event response bit carried in the online query command frame, and reporting the status information of the loop unit to the loop card, also includes:
[0135] (34) when receiving a data unit carrying a group identifier of a loop unit group requiring an online response in an online query command frame sent by the loop card, comparing the group identifier of the loop unit itself with the group identifier carried by the online query command frame to obtain a comparison result;
[0136] (35) when the comparison result indicates that the group identifier in the online query command frame does not match the group identifier of the loop unit itself and there is an event that needs to be uploaded, a current pulse is fed back to the loop card in the low level segment of the data unit carrying the event response bit, thereby feeding back to the loop card that there is an event that needs to be reported;
[0137] (36) receiving an event query command frame sent by the loop card, and upon receiving a data unit in the event query command frame carrying feedback address information of a loop unit that needs to report an event and receiving a high level segment of the first duration output by the loop card, determining that other loop units have responded to the loop card with address information, then stopping responding to the event query command frame;
[0138] (37) when receiving the data unit in the event query command frame that carries the feedback address information of the loop unit that needs to report the event and receiving the high level segment of the second duration output by the loop card, it is determined that no other loop unit responds to the address information of the loop card, and then, during the low level segment of the data unit that carries the feedback address information of the loop unit that needs to report the event, a current pulse as the address information is fed back to the loop card, thereby responding to the loop card with the address information of the loop unit itself bit by bit;
[0139] (38) after receiving the status query command frame sent by the loop card, obtaining the status character string of the loop unit itself, and performing a CRC-8 check on the status character string to obtain first check information;
[0140] (39) Sending the status character string and the first verification information to the loop card to complete the event reporting.
[0141] Furthermore, the power carrier communication method proposed in this embodiment further includes:
[0142] When the comparison result indicates that the group identifier in the online query command frame matches the group identifier of the loop unit itself, a flashing light operation is performed.
[0143] In summary, this embodiment proposes a power carrier communication method, in which each loop unit is divided into different loop unit groups, and each loop unit has address information of the loop unit group to which it belongs; a loop card is used to send an online query command to each loop unit through a bus, receive a position identifier fed back by a loop unit in the loop unit group that needs an online response, and receive status information reported by the loop unit that needs to report an event when there is a loop unit that needs to report an event in each of the loop units; the loop unit is used to, when receiving an online query command frame sent by the loop card, respond to the data unit of the loop unit feedback address information in the loop unit group that needs an online response carried in the online query command frame if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, and send the loop unit The location identifier of the unit itself is fed back to the loop card. Compared with the method in the related art that requires the loop card to poll each of the multiple loop units one by one to obtain the status information of each loop unit, when the group identifier in the online query command frame received from the loop card matches the group identifier of the loop unit itself, the loop unit feeds back its own address information to the loop card, and reports the loop unit's own status information to the loop card when there is an event to be reported. There is no need for the loop card to poll multiple loop units one by one, and the loop unit can report the status information by itself, so that the loop unit can report the status information in time, thereby improving the efficiency of information transmission between the loop card and the loop unit; moreover, the loop unit will only be awakened when it receives the online query command frame sent by the loop card, and is in a sleep state in other cases, thereby maintaining communication idleness to the greatest extent and saving system resources.
[0144] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A power carrier communication system, characterized in that: include: Loop cards and multiple loop units; The loop card is connected to each loop unit in the plurality of loop units via a bus; wherein each loop unit is divided into different loop unit groups, each loop unit has address information of the loop unit group in which it is located, and the address information of the loop unit group in which each loop unit is located includes: a group identifier of the loop unit group in which the loop unit is located and a position identifier in the loop unit group; The loop card is used to send the online query command frame to each loop unit through the bus when the time length from the last time the online query command frame was sent to each loop unit reaches a preset time length, wherein the online query command frame includes: a data unit carrying a group identifier of a loop unit group that needs an online response, a data unit carrying an event response bit, and a data unit carrying feedback address information of the loop unit in the loop unit group that needs an online response; Receiving position identifiers fed back by loop units in a loop unit group that needs an online response, and, if there is a loop unit that needs to report an event among the loop units, receiving status information reported by the loop unit that needs to report the event; The loop unit is used to, upon receiving the online query command frame sent by the loop card, respond to the data unit of the loop unit feedback address information in the loop unit group requiring online response carried in the online query command frame if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, and feed back the location identifier of the loop unit itself to the loop card; If there is an event that needs to be reported, the data unit of the event response bit carried in the online query command frame is responded to, and the state information of the loop unit is reported to the loop card.
2. The power carrier communication system according to claim 1, characterized in that: A single data unit is a pulse signal; A single data unit includes: a low level segment and a high level segment; The low level segment is the response bit of the loop unit feedback current pulse, and the high level segment is the data sent by the loop card to the loop unit or the feedback information when the loop unit current pulse is received in the low level segment; In a single data unit, when the loop card receives the current pulse of the loop unit in the low level segment, the loop card outputs a high level segment of the first duration as feedback information to each loop unit; In a single data unit, when the loop card does not receive the current pulse of the loop unit in the low level segment, the loop card outputs a high level segment of the second duration as feedback information to each loop unit; wherein the duration of the first duration is greater than the duration of the second duration; The loop card is used to send the online query command frame to each loop unit through a bus, including: Sending a continuous pulse signal as the online query command frame to each loop unit via a bus in the order of a data unit carrying a group identifier of a loop unit group that needs an online response, a data unit carrying an event response bit, and a data unit carrying loop unit feedback address information in the loop unit group that needs an online response; The loop unit is used to, when receiving an online query command frame sent by the loop card, respond to the data unit of the loop unit feedback address information in the loop unit group that needs online response carried in the online query command frame if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, and feed back the position identifier of the loop unit itself to the loop card; if there is an event to be reported, respond to the data unit of the event response bit carried in the online query command frame, and report the status information of the loop unit to the loop card, including: When receiving a data unit carrying a group identifier of a loop unit group that needs an online response in an online query command frame sent by the loop card, comparing the group identifier of the loop unit itself with the group identifier carried by the online query command frame to obtain a comparison result; When the comparison result indicates that the group identifier in the online query command frame matches the group identifier of the loop unit itself and there is no event that needs to be uploaded, after receiving the data unit carrying the event response bit, start calculating the number of data units received that carry the loop unit feedback address information in the loop unit group that needs an online response; When it is determined that the number of data units carrying loop unit feedback address information in the received loop unit group requiring online response is equal to the size of the location identifier of the loop unit itself in the loop unit group, determining that the currently received data unit is a data unit matching the location identifier of the loop unit itself; In the low-level segment of the data unit that matches the position identifier of the loop unit itself, a current pulse is fed back to the loop card, completing the work of responding to the data unit of the loop unit feedback address information in the loop unit group that requires online response carried in the online query command frame, and feeding back the position identifier of the loop unit itself to the loop card.
3. The power carrier communication system according to claim 2, characterized in that: The loop unit is used to, when receiving an online query command frame sent by the loop card, respond to the data unit of the loop unit feedback address information in the loop unit group that needs online response carried in the online query command frame if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, and feed back the position identifier of the loop unit itself to the loop card; if there is an event to be reported, respond to the data unit of the event response bit carried in the online query command frame, and report the status information of the loop unit to the loop card, and also includes: When receiving a data unit carrying a group identifier of a loop unit group that needs an online response in an online query command frame sent by the loop card, comparing the group identifier of the loop unit itself with the group identifier carried by the online query command frame to obtain a comparison result; When the comparison result indicates that the group identifier in the online query command frame does not match the group identifier of the loop unit itself and there is an event that needs to be uploaded, a current pulse is fed back to the loop card in the low level segment of the data unit carrying the event response bit, thereby feeding back to the loop card that there is an event that needs to be reported; receiving an event query command frame sent by the loop card, and upon receiving a data unit in the event query command frame carrying feedback address information of a loop unit that needs to report an event and receiving a high level segment of the first duration output by the loop card, determining that other loop units have responded to the loop card with address information, then stopping responding to the event query command frame; When receiving the data unit carrying the feedback address information of the loop unit that needs to report the event in the event query command frame and receiving the high level segment of the second duration output by the loop card, it is determined that no other loop unit responds to the address information to the loop card, then feeding back a current pulse as the address information to the loop card during the low level segment of the data unit carrying the feedback address information of the loop unit that needs to report the event, thereby responding the address information of the loop unit itself to the loop card bit by bit; After receiving the status query command frame sent by the loop card, the status character string of the loop unit itself is obtained, and a CRC-8 check is performed on the status character string to obtain first check information; Sending the status character string and the first verification information to the loop card to complete the event reporting; The loop card is used to receive status information reported by the loop unit that needs to report an event when there is a loop unit that needs to report an event among the loop units, including: If the low level segment of the data unit carrying the event response bit in the online query command frame receives the current pulse fed back by the loop unit, an event query command frame is sent to each of the loop units, wherein the event query command frame includes: an event query command frame identifier and a data unit carrying feedback address information of the loop unit to which the event needs to be reported; If the low level segment of the data unit carrying the feedback address information of the loop unit of the event to be reported in the event query command frame receives the current pulse as the address information fed back by the loop unit, then a high level segment of the first duration is output to each loop unit; After receiving the address information of the loop unit to which the event needs to be uploaded, based on the address information of the loop unit to which the event needs to be uploaded, a status query command frame is sent to the loop unit to which the event needs to be uploaded; Receive the status character string and the first verification information fed back by the loop unit of the event that needs to be uploaded; Performing a CRC-8 check on the received status character string to obtain second check information; When the first verification information and the second verification information are the same, obtaining a stored status character string, and comparing the stored status character string with the received status character string to obtain a comparison result; Obtaining the changed characters in the status character string through the obtained comparison result, and determining the event reported by the loop unit according to the obtained changed characters in the status character string; The stored status character string is updated using the received status character string, thereby completing the storage operation of the received status character string.
4. The power carrier communication system according to claim 2, characterized in that: The loop unit is also specifically used for: When the comparison result indicates that the group identifier in the online query command frame matches the group identifier of the loop unit itself, a flashing light operation is performed.
5. A power carrier communication method, characterized in that: For realizing the function of the loop card according to any one of claims 1 to 4 above, the method comprises: When the time length from the last time an online query command frame was sent to each loop unit reaches a preset time length, the online query command frame is sent to each loop unit through the bus, wherein the online query command frame includes: a data unit carrying a group identifier of a loop unit group that needs an online response, a data unit carrying an event response bit, and a data unit carrying feedback address information of a loop unit in the loop unit group that needs an online response; Receive the position identifiers fed back by the loop units in the loop unit group that needs online response, and when there is a loop unit that needs to report an event among the loop units, receive the status information reported by the loop unit that needs to report the event.
6. The method according to claim 5, characterized in that In the case where there is a circuit unit that needs to report an event among the circuit units, receiving the status information reported by the circuit unit that needs to report the event includes: If the low level segment of the data unit carrying the event response bit in the online query command frame receives the current pulse fed back by the loop unit, an event query command frame is sent to each of the loop units, wherein the event query command frame includes: an event query command frame identifier and a data unit carrying feedback address information of the loop unit to which the event needs to be reported; If the low level segment of the data unit carrying the feedback address information of the loop unit of the event to be reported in the event query command frame receives the current pulse as the address information fed back by the loop unit, then a high level segment of the first duration is output to each loop unit; After receiving the address information of the loop unit to which the event needs to be uploaded, based on the address information of the loop unit to which the event needs to be uploaded, a status query command frame is sent to the loop unit to which the event needs to be uploaded; Receive the status character string and the first verification information fed back by the loop unit of the event that needs to be uploaded; Performing a CRC-8 check on the received status character string to obtain second check information; When the first verification information and the second verification information are the same, obtaining a stored status character string, and comparing the stored status character string with the received status character string to obtain a comparison result; Obtaining the changed characters in the status character string through the obtained comparison result, and determining the event reported by the loop unit according to the obtained changed characters in the status character string; The stored status character string is updated using the received status character string, thereby completing the storage operation of the received status character string.
7. A power carrier communication method, characterized in that: For realizing the function of the loop unit according to any one of claims 1 to 4 above, the method comprises: In the case of receiving the online query command frame sent by the loop card, if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, then responding to the data unit of the loop unit feedback address information in the loop unit group requiring online response carried in the online query command frame, the position identifier of the loop unit itself is fed back to the loop card; If there is an event that needs to be reported, the data unit of the event response bit carried in the online query command frame is responded to, and the state information of the loop unit is reported to the loop card.
8. The method according to claim 7, characterized in that In the case of receiving the online query command frame sent by the loop card, if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, then responding to the data unit of the loop unit feedback address information in the loop unit group that needs online response carried in the online query command frame, and feeding back the position identifier of the loop unit itself to the loop card; if there is an event that needs to be reported, responding to the data unit of the event response bit carried in the online query command frame, and reporting the status information of the loop unit to the loop card, including: When receiving a data unit carrying a group identifier of a loop unit group that needs an online response in an online query command frame sent by the loop card, comparing the group identifier of the loop unit itself with the group identifier carried by the online query command frame to obtain a comparison result; When the comparison result indicates that the group identifier in the online query command frame matches the group identifier of the loop unit itself and there is no event that needs to be uploaded, after receiving the data unit carrying the event response bit, start calculating the number of data units received that carry the loop unit feedback address information in the loop unit group that needs an online response; When it is determined that the number of data units carrying loop unit feedback address information in the received loop unit group requiring online response is equal to the size of the location identifier of the loop unit itself in the loop unit group, determining that the currently received data unit is a data unit matching the location identifier of the loop unit itself; In the low-level segment of the data unit that matches the position identifier of the loop unit itself, a current pulse is fed back to the loop card, completing the work of responding to the data unit of the loop unit feedback address information in the loop unit group that requires online response carried in the online query command frame, and feeding back the position identifier of the loop unit itself to the loop card.
9. The method according to claim 7, characterized in that: In the case of receiving the online query command frame sent by the loop card, if it is determined that the group identifier in the online query command frame matches the group identifier of the loop unit itself, then responding to the data unit of the loop unit feedback address information in the loop unit group that needs online response carried in the online query command frame, and feeding back the position identifier of the loop unit itself to the loop card; if there is an event to be reported, responding to the data unit of the event response bit carried in the online query command frame, and reporting the status information of the loop unit to the loop card, also includes: When receiving a data unit carrying a group identifier of a loop unit group that needs an online response in an online query command frame sent by the loop card, comparing the group identifier of the loop unit itself with the group identifier carried by the online query command frame to obtain a comparison result; When the comparison result indicates that the group identifier in the online query command frame does not match the group identifier of the loop unit itself and there is an event that needs to be uploaded, a current pulse is fed back to the loop card in the low level segment of the data unit carrying the event response bit, thereby feeding back to the loop card that there is an event that needs to be reported; receiving an event query command frame sent by the loop card, and upon receiving a data unit in the event query command frame carrying feedback address information of a loop unit that needs to report an event and receiving a high level segment of the first duration output by the loop card, determining that other loop units have responded to the loop card with address information, then stopping responding to the event query command frame; When receiving the data unit carrying the feedback address information of the loop unit that needs to report the event in the event query command frame and receiving the high level segment of the second duration output by the loop card, it is determined that no other loop unit responds to the address information to the loop card, then feeding back a current pulse as the address information to the loop card during the low level segment of the data unit carrying the feedback address information of the loop unit that needs to report the event, thereby responding the address information of the loop unit itself to the loop card bit by bit; After receiving the status query command frame sent by the loop card, the status character string of the loop unit itself is obtained, and a CRC-8 check is performed on the status character string to obtain first check information; The status character string and the first verification information are sent to the loop card to complete the event reporting.
10. The method according to claim 8, characterized in that Also includes: When the comparison result indicates that the group identifier in the online query command frame matches the group identifier of the loop unit itself, a flashing light operation is performed.
