Method and System for Rapid Identification and Determination of Address Codes of Bus-Type Fire Alarm Devices
Through the inspection instructions and compression algorithm of the fire controller, the rapid and accurate identification of the fire alarm address is achieved, and the problems of mechanical dial failure and electronic dialing are solved, which improves the efficiency and accuracy of bus device address recognition.
Patent Information
- Application Number
- CN202510415307.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-03
AI Technical Summary
In the existing fire alarm system, the mechanical dial address setting is prone to failure, the electronic dial requires special equipment and manual identification is complicated, which leads to difficulty in address identification and complex debugging, especially in large-scale projects, which is difficult to quickly and accurately identify the bus device address.
The fire control is used to send patrol instructions, and the ID information code of the fire alarm is converted into single-byte encoding through compression algorithms. Combined with the round patrol and mapping technology of different command codes, it realizes automatic identification and storage address encoding, avoiding mechanical dialing defects and cumbersome operations of electronic dialing.
It significantly shortens the address recognition cycle, avoids mechanical dial failure and electronic dialing cumbersome operations, improves engineering debugging efficiency, and ensures the accuracy and convenience of address recognition.
Smart Images

Figure CN119922165B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of bus-type fire alarm systems, and in particular to a method and system for quickly identifying and determining the address coding of a bus-type fire alarm. Background Art
[0002] In the field of fire alarm, especially for the communication bus between a fire controller and on-site alarms, the circuit principle is generally pulse transmission and current return coding, achieving half-duplex communication through two wires. Since there is no competition mechanism in this bus communication method, there is only one host on the bus. The pulse transmission end is the host, and the current return coding end is the slave. The host inquiry and slave response mechanism is adopted to prevent communication timing chaos. Therefore, in the same bus, each slave device must have a unique address, and this address information needs to be stored in the bus fire controller or in the bus loop board to ensure that each slave address can be normally inspected, and then the status or relevant information of each slave device can be obtained. The host can be understood as the fire controller installed in the fire monitoring room, and the slave can be understood as the detector / alarm installed at the engineering site.
[0003] There are generally two ways to set the address of the slave device: 1) DIP switch method. 2) Electronic coding method.
[0004] The DIP switch is mechanical, generally with 8-bit DIP, which requires more interface resources of the MCU and has a higher cost. The advantage of mechanical DIP is simplicity and intuitiveness, which can directly distinguish the address of this device and the address can be changed at any time. However, in the long-term operation of the mechanical DIP structure, there will be cases where individual DIPs fail. For example, it seems to be set to the OFF position on the surface, but actually it is in a conducting state; or it seems to be set to the ON position on the surface, but actually it is in an open state. At this time, it will cause the MCU to read the wrong state of the IO, and then cause the loss of this address and report a fault. This will result in a situation where the DIP address seen from the outside is different from the address obtained by the MCU, making it difficult to find faults.
[0005] The electronic coding method requires fewer interface resources of the MCU and has a lower cost. However, a dedicated encoder is needed to write the address, and the address information is stored in the memory inside the slave device and cannot be recognized from the outside. Therefore, it is usually necessary to manually record the internal stored address number on the product shell to facilitate quickly identifying the address information of the product during the inspection process.
[0006] In the actual engineering installation site, there are generally the following situations:
[0007] 1. The drawings have been designed, and the numbers of bus devices at each location are marked. The on-site installation workers need to set the addresses of the bus devices one by one at the construction site according to the drawings and then install them. For electronic coding, each worker needs to carry an encoder and work while looking Figure 1 while working, which is very inconvenient.
[0008] 2. The drawings have been designed, only the locations for installing bus devices are marked, but the numbers are not marked. The on-site installation workers need to set the numbers of the bus devices and install them while recording the set numbers on the drawings, and finally re-enter the drawing information into the controller to realize the correspondence between the device locations and the numbers, with a very large workload.
[0009] 3. For some small projects, when the number of bus devices is small, some construction parties do not have coding equipment and require the manufacturer to write the slave addresses in advance when shipping and mark the electronic address codes on the outer shell. In this case, if the products are taken wrongly or confused with those of other projects at the construction site, it will greatly increase the difficulty of debugging and searching. In addition, if it is necessary to replace or add bus devices, the subsequent communication and coordination work will also become extremely cumbersome.
[0010] 4. For some large projects, the number of bus devices is large, reaching hundreds, thousands or even thousands. Each device needs to be marked with an address one by one, and the pre-commissioning process is complex. Once there is a situation where the address is written wrongly or the dip switch goes wrong, it is difficult to find and time-consuming and laborious.
[0011] Based on the above actual situations, there is an urgent need in the current fire protection project to be able to quickly, accurately and automatically identify the device address codes on the alarm bus to improve the project commissioning efficiency. Summary of the Invention
[0012] In order to quickly identify the device address codes on the alarm bus to avoid the defects of mechanical dialing, electronic dialing requires special equipment and the trouble of manual address marking. The present application provides a method and system for quickly identifying and determining the address codes of a bus-type fire alarm.
[0013] In a first aspect, the present application provides a method for quickly identifying and determining the address codes of a bus-type fire alarm, adopting the following technical solutions:
[0014] A method for quickly identifying and determining the address codes of a bus-type fire alarm, with the fire controller as the execution entity, includes:
[0015] Send a patrol inspection instruction, where the patrol inspection instruction includes a patrol inspection address code and a first command code; after all fire alarms on the fire protection bus receive the patrol inspection instruction, they compress their own ID information codes according to the first command code to generate a corresponding first compression code as the local address code for the current round of fire controller patrol inspection; the ID information codes of the fire alarms are arranged according to the setting rules of the manufacturer, and both the patrol inspection address code and the local address code are single bytes;
[0016] Receive response data; when there is a match between the first compression code and the patrol inspection address code, the corresponding fire alarm sends the response data to the fire controller, and the response data includes the ID information code of the fire alarm itself and the first compression code generated by compressing the ID information code in this round;
[0017] Judge whether the response data is correct;
[0018] If so, store the ID information code of the received fire alarm in the database in sequence and send a confirmation instruction; after the fire alarm receives the confirmation instruction, judge again whether the patrol inspection address code matches the first compression code. If so, perform a confirmation mark, otherwise, do not process;
[0019] Increment the patrol inspection address code by 1, and repeat the above steps until all patrol inspection address codes within the range of single-byte data in this round are sent.
[0020] By adopting the above technical solution, since the complete ID information code of each fire alarm is unique, the ID information code (including content such as device type, production date, production batch, production serial number, etc.) can be compressed into an expected single-byte operation result through a compression algorithm and used as the local address code. In this way, the fire controller can perform patrol inspections one by one in the form of single-byte address commands. Since the maximum number of round-robin inspections is 256 times, and according to the standard specification requirements, a maximum of 240 address points can be installed on a fire alarm bus, this solution can significantly shorten the patrol inspection cycle. At the same time, the ID information code of the fire alarm obtained from each correct patrol inspection will be stored in the fire controller to confirm that the corresponding fire alarm has been correctly identified by the current patrol inspection instruction. This solution effectively realizes the rapid identification of the address codes of the fire alarms on the alarm bus, avoiding the defects of mechanical dialing and the cumbersome process of electronic dialing that requires special equipment and manual address identification.
[0021] Optionally, the step of judging whether the response data is correct further includes:
[0022] If not, send the next inspection instruction. The inspection address code in the next inspection instruction is the inspection address code in the previous inspection instruction + 1. Repeat the above steps until all inspection address codes within the range of single-byte data in this round are sent.
[0023] By adopting the above technical solution, although the response data of the fire alarm is received within the preset time duration, but after analysis, the response data is incorrect. Then it means that for the response data of this inquiry of the inspection address code, multiple fire alarms are sending back codes, resulting in incorrect received response data. So discard the response data and continue to send the inspection instruction and continue to inquire.
[0024] Optionally, the steps after sending the inspection instruction include:
[0025] Judge whether response data is received within the preset time duration;
[0026] If so, then judge whether the response data is correct;
[0027] If not, send the next inspection instruction. The inspection address code in the next inspection instruction is the inspection address code in the previous inspection instruction + 1. Repeat the above steps until all inspection address codes within the range of single-byte data in this round are sent.
[0028] By adopting the above technical solution, no response from any fire alarm is received within the preset time duration. Then it means that there is no matching local address code in this round. Therefore, the inspection instruction can be continued to be sent and the inquiry can be continued.
[0029] Optionally, after judging whether the response data is correct, it includes:
[0030] After completing one round of inspection, judge whether all fire alarms are marked;
[0031] If not, send the next round of inspection instruction; the next round of inspection instruction includes an inspection address code and a second command code. The marked fire alarms will no longer participate in the inspection response of this round; the unmarked fire alarms compress their own ID information codes according to the second command code to generate corresponding second compression codes as the local address codes for the inspection of the fire controller in this round; when the second compression code matches the inspection address code, the corresponding fire alarm sends the response data to the fire controller.
[0032] By adopting the above technical solution, although the complete ID information code of each fire alarm is unique and will not repeat, the single-byte operation results generated after compression may repeat; that is, although this method effectively reduces the number of inspections (up to 256 times per round), it may cause the phenomenon of duplicate local address encodings, resulting in incorrect data received by the fire controller and unable to accurately identify the ID information of the on-site fire alarms.
[0033] To overcome this problem, by the fire controller issuing different inspection commands in each round (i.e., each round has a different command code), the fire alarm can change the order of its own ID information code according to different command codes and compress it. That is, the same fire alarm obtains different compressed information sources, and thus obtains different expected operation results. In this way, it is possible to avoid the situation where several different fire alarms on the same bus obtain the same operation result under different inspection commands. After the fire controller performs another round of inspections, and the fire alarms correctly detected in the previous round do not respond to this round of inspections, the possibility of response conflicts with other fire alarms on the bus is further reduced, and the ID information code of the fire alarm that had a conflict in the previous round can be obtained quickly to the greatest extent. If there are still conflicts in this round, repeating this process several times can obtain the complete ID information codes of all the fire alarms on the bus. After obtaining the ID information codes of all the fire alarms on the bus, the ID information codes can be used as indexes to sequentially inspect the fire alarms on the bus one by one, and there will be no non-existent fire alarms being inspected, wasting inspection time and causing inspection delays.
[0034] Optionally, the method for quickly identifying and determining the address encoding further includes:
[0035] Based on an external trigger condition, the fire controller maps the ID information codes of the fire alarms stored in sequence internally into single-byte data as the mapped address, or uses the storage sequence number of the ID information codes of the fire alarms in the fire controller as the mapped address.
[0036] By adopting the above technical solution, the fire controller performs address mapping, maps the longer ID information codes of the fire alarms on the bus into single-byte lengths, and sequentially inspects the fire alarms on the bus one by one. There will be no non-existent fire alarms being inspected, wasting inspection time, so as to monitor the status of the fire alarms on the bus and facilitate management and communication. The more fire alarms there are on the fire alarm bus, the more convenient this method is.
[0037] Optionally, based on an external trigger condition, the fire controller maps the ID information codes of the fire alarms stored internally in sequence into single-byte data as the mapping address, or, after using the storage sequence number of the ID information codes of the fire alarms in the fire controller as the mapping address, further includes:
[0038] Sequentially sending mapping instructions one by one; the mapping instructions include the mapping address and the ID information code of the fire alarm; after the fire alarm receives the mapping instruction that matches its own ID information code, it updates its own address code according to the mapping address; the number of times of sending the mapping instruction is the same as the number of fire alarms.
[0039] By adopting the above technical solution, the fire controller can then perform inspections according to the single-byte address and display the address codes of the fire alarms, which is convenient for management and communication.
[0040] Optionally, the method for quickly identifying and determining the address code further includes:
[0041] When sending the mapping instruction, continuously send it n times, where n≥2; the fire alarm will update its own address code according to the mapping address only after continuously receiving the mapping instruction that matches its own ID information code n times.
[0042] By adopting the above technical solution, the accuracy and rigor of address modification can be ensured, and the occurrence of unexpected situations can be effectively prevented.
[0043] Optionally, before sending the inspection instruction, it includes:
[0044] When installing the fire alarm, send a broadcast inspection instruction; all fire alarms that can receive the broadcast inspection instruction light up their own LED for flashing prompts;
[0045] After all fire alarms are installed, receive the address code inspection instruction and enter the state of automatically setting the coding address.
[0046] By adopting the above technical solution, the on-site installation personnel can know that the currently installed fire alarm communicates normally with the bus.
[0047] In a second aspect, the present application provides a system for quickly identifying and determining the address code of a bus-type fire alarm, adopting the following technical solution:
[0048] A system for quickly identifying and determining the address code of a bus-type fire alarm includes a fire controller and a fire alarm;
[0049] Among them, the fire controller includes:
[0050] The first instruction sending module is used to send inspection instructions, and the inspection instructions include an inspection address code and a command code; the command codes in the inspection instructions for each round are different; the command codes of the inspection instructions sent each time in the same round are the same, and the inspection address code this time is the previous inspection address code + 1;
[0051] The data receiving module is used to receive response data;
[0052] The first judgment module is used to judge whether the response data is correct;
[0053] The storage module is used to store the ID information code of the fire alarm in the database in sequence when the response data is correct, and the instruction sending module sends a confirmation instruction;
[0054] The fire alarm includes:
[0055] The first instruction receiving module is used to receive the inspection instruction;
[0056] The data compression module is used to compress its own ID information code according to different command codes to generate a corresponding compression code as the local address code for the inspection of the fire controller in the corresponding round; the ID information codes of the fire alarm are arranged according to the setting rules of the manufacturer, and both the inspection address code and the local address code are single bytes;
[0057] The second judgment module is used to judge whether the compression code in each round matches the inspection address code in the corresponding round;
[0058] The data sending module is used to send the response data in the corresponding round when the compression code matches the inspection address code in the corresponding round;
[0059] The identification module, after the first instruction receiving module receives the confirmation instruction, the second judgment module judges again whether the compression code matches the inspection address code in the corresponding round. If so, the identification module performs a confirmation identification.
[0060] In summary, the present application has at least the following beneficial effects:
[0061] 1. After all fire alarms on the fire protection bus receive the inspection instruction, they compress their own ID information codes according to the first command code to generate corresponding first compression codes. The purpose of arranging the ID information codes of the fire alarms according to different setting rules is that since the complete ID information code of each fire alarm is unique, the ID information code (including content such as device type, production date, production batch, production serial number, etc.) can be compressed into an expected single-byte operation result through a compression algorithm and used as the local address code of the device. In this way, the fire control panel can conduct inspections one by one in the form of single-byte address commands. Since the maximum number of rounds of inspections is 256 times, and according to the requirements of the standard specification, a maximum of 240 address points can be installed on a fire alarm bus, this solution can significantly shorten the inspection cycle. At the same time, the ID information code of the fire alarm obtained from each correct inspection will be stored in the fire control panel to confirm that the corresponding fire alarm has been correctly identified by the current inspection instruction. This solution effectively realizes the rapid identification of the address codes of the fire alarms on the alarm bus, avoiding the defects of mechanical dialing and the cumbersome process of electronic dialing that requires special equipment and manual address identification.
[0062] 2. After completing one round of inspection, it is determined whether all fire alarms are marked. If not, the next round of inspection instructions is sent; the marked fire alarms will no longer participate in the inspection response of this round; the unmarked fire alarms compress their own ID information codes according to the second command code to generate the corresponding second compressed code. The purpose is that although the complete ID information codes of each fire alarm are unique and will not repeat, the single-byte operation results generated after compression may repeat; that is, although this method effectively reduces the number of inspections (up to 256 times per round), it may cause the phenomenon of duplicate local address codes, resulting in incorrect data received by the fire controller and unable to accurately identify the ID information of the on-site fire alarms. To overcome this problem, the fire controller issues different inspection instructions in each round (that is, the command codes in each round are different), and the fire alarms can change the order of their ID information codes and compress them according to different command codes. That is, the same fire alarm obtains different compressed information sources, and thus different expected operation results, so that the situation where certain different fire alarms on the same bus obtain the same operation result under different inspection instructions can be avoided. After the fire controller conducts another round of patrol, and the fire alarms correctly detected in the previous round do not respond to this round of patrol, the possibility of response conflicts with other fire alarms on the bus is further reduced, and the ID information codes of the fire alarms that had conflicts in the previous round can be obtained quickly to the greatest extent. If there are still conflict situations in this round, and so on for several rounds, the ID information codes of all fire alarms on the bus can be obtained completely. After obtaining the ID information codes of all fire alarms on the bus, the ID information codes can be used as an index to sequentially inspect the fire alarms on the bus one by one, and there will be no non-existent fire alarms being inspected, wasting inspection time and causing inspection delays.
[0063] 3. Based on external trigger conditions, the fire controller maps the ID information codes of the fire alarms stored in sequence internally into single-byte data as the mapping address, or uses the storage sequence number of the ID information codes of the fire alarms in the fire controller as the mapping address. The purpose is that the fire controller performs address mapping, maps the longer ID information codes of the fire alarms on the bus into single-byte length, and sequentially inspects the fire alarms on the bus one by one, so that no non-existent fire alarms will be inspected, wasting inspection time, in order to monitor the status of the fire alarms on the bus and facilitate management and communication. The more fire alarms there are on the fire alarm bus, the more convenient this method is. Description of the Drawings
[0064] Figure 1 is the flowchart of the method embodiment of this application;
[0065] Figure 2It is a schematic table for the ID information code compression of the fire alarm according to different command codes;
[0066] Figure 3 It is a flowchart after completing a round of inspection addresses from 000 to 255;
[0067] Figure 4 It is a structural block diagram of the system embodiment of the present application. Specific implementation manners
[0068] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following will combine the appended Figure 1 - appended Figure 4 , and clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0069] The first embodiment of the present application discloses a method for quickly identifying and determining the address coding of a bus-type fire alarm. As an implementation manner of the method for quickly identifying and determining the address coding, the method for quickly identifying and determining the address coding may include the following steps:
[0070] When installing the fire alarm, send a broadcast inspection instruction; all fire alarms that can receive the broadcast inspection instruction light up their own LEDs to flash and prompt; after all fire alarms are installed, receive the address coding inspection instruction.
[0071] Specifically, when installing the fire alarm, the fire controller sends a "broadcast inspection instruction" to the bus. All fire alarms that can receive the broadcast inspection instruction light up their own LEDs to flash and prompt, so that the on-site installation personnel know that the currently installed fire alarm communicates normally with the bus, and the fire alarm does not need to return a code.
[0072] After the on-site fire alarms are installed, the construction personnel operate the fire controller to issue an address coding inspection instruction, and the fire controller enters the state of automatically setting the coding address.
[0073] Refer to Figure 1 , further, after the fire controller enters the state of automatically setting the coding address, S110 - S160 can be executed:
[0074] S110. Send a patrol inspection instruction, where the patrol inspection instruction includes a patrol inspection address code and a first command code. After all the fire alarms on the fire protection bus receive the patrol inspection instruction, they compress their own ID information codes according to the first command code to generate corresponding first compressed codes as the local address codes for the current round of fire controller patrol inspection. The ID information codes of the fire alarms are arranged according to the manufacturer's set rules. Both the patrol inspection address code and the local address code are single bytes.
[0075] S120. Receive response data. When there is a match between the first compressed code and the patrol inspection address code, the corresponding fire alarm sends the response data to the fire controller. The response data includes the ID information code of the fire alarm itself and the first compressed code generated by compressing the ID information code in this round.
[0076] S130. Determine whether the response data is correct.
[0077] S140. If not, send the next patrol inspection instruction, where the patrol inspection address code in the next patrol inspection instruction is the patrol inspection address code of the previous patrol inspection instruction + 1.
[0078] S150. If so, store the received ID information codes of the fire alarms in the database in sequence and send a confirmation instruction. After the fire alarm receives the confirmation instruction, it determines again whether the patrol inspection address code matches the first compressed code. If so, it makes a confirmation mark; if not, it does not process.
[0079] S160. Repeat S110 - S150 until all the patrol inspection address codes within the range of single-byte data in this round are sent.
[0080] Specifically, S110 - S160 is a process of one-round polling, and the patrol inspection address code is the address code sent by the fire controller to the fire alarm. Before the patrol inspection, the ID information codes of all the fire alarms are arranged according to the manufacturer's set rules. For example, the arrangement order of the ID information codes of the fire alarms is device type - production year - production month - production batch - production serial number. The patrol inspection instruction includes a patrol inspection address code and a first command code. The patrol inspection address code ranges from 000 - 255, and the patrol inspection address code in each patrol inspection instruction is different in one-round polling. The first command code can be the same. For example, the patrol inspection address code (001) in the second sent patrol inspection instruction is the patrol inspection address code (000) in the first patrol inspection instruction + 1. The first command code represents the operation rule for compressing the ID information code of the fire alarm. For example, as shown in Figure 2 Taking the CRC-8 checksum compression algorithm as an example of the compression algorithm, four operation rules are listed. Of course, in other embodiments, other compression algorithms can also be used as long as the ID information code can be compressed into a single byte.
[0081] Among them, host command 1 refers to the first command code, host command 2 refers to the second command code, host command 3 refers to the third command code, and host command 4 refers to the fourth command code. The four operation rules indicate that 4 rounds of polling can be performed. The meaning of SWAP is to swap the upper and lower four bits of the content of this byte. For example, the original content is 0x12, and after SWAP, it becomes 0x21. The purpose of this is to ensure that the data sources participating in compression are different each time, so as to ensure that different command codes can generate different compressed data results. That is, for the ID information code of the same fire alarm, after being compressed by four different rules, the output results are different.
[0082] When the first CRC compression code generated by the fire alarm matches the inspection address code, the fire alarm sends response data to the fire controller. The response data includes not only the ID information code of the fire alarm itself and the first CRC compression code generated by compressing the ID information code in this round, but also additional check codes and frame headers and other data. The fire controller will judge whether the response data is correct. If so, it will store the ID information code of the fire alarm in the database in sequence and send a confirmation instruction.
[0083] Among them, the ways to judge whether the response data is correct can be: 1) The frame header is correct; 2) The address coding is consistent; 3) The check code of this communication frame is correct; 4) The device type code meets the regulations; 5) The production year code meets the regulations; 6) The production month code meets the regulations, etc.; Only when all the above contents are correct does it mean that the response data is correct; If any item is incorrect, it means that the response data is incorrect.
[0084] In addition, the way to store the ID information code of the fire alarm in the database in sequence can be: Place fire alarms of the same type in an independent area, and then sort them according to the production date; For fire alarms with the same production date, they are sorted according to the production batch; For fire alarms with the same production batch, they are sorted according to the production serial number. After sorting, the fire controller can perform inspections on the fire alarms on the bus based on the "production batch, production serial number".
[0085] When the fire alarm receives the confirmation instruction, it will judge again whether the inspection address code matches the first CRC compression code. If so, it will perform a confirmation flag to indicate that it has been inspected; If not, it will not be processed.
[0086] Furthermore, when the fire alarm sends response data to the fire controller, the fire controller needs to judge whether it receives the response data within a preset time; If so, it further judges whether the response data is correct; If not, it means that there is no matching local address coding in this time, then the fire controller increments the current inspection address code by 1 and continues to repeat until the inquiry of the inspection address codes from 0 to 255 is completed.
[0087] If within the preset duration, response data is received and the data is analyzed as correct (the judgment process is as described above), it indicates that for the current inspection address, there is a unique corresponding ID information code on the current bus. Then, the received ID information code is sequentially stored in the received database, and a confirmation instruction is sent. Then, the current inspection address code is incremented by 1 and the process is repeated until the interrogation of inspection address codes from 0 to 255 is completed.
[0088] If within the preset duration, response data is received, but the data is analyzed as incorrect, it means that for the data of this interrogation of the inspection address code, multiple fire alarms are sending back codes, resulting in incorrect response data received. Then, the response data is discarded, and the current inspection address code is incremented by 1 and the process is repeated until the interrogation of inspection address codes from 0 to 255 is completed.
[0089] During this round of inspection, the number of duplicate local address encodings cannot be determined temporarily. It is necessary to wait until the end of this round of inspection and then send a new command code to conduct a re-inspection.
[0090] Refer to Figure 3 , further, the method for quickly identifying and determining the address encoding may further include S210 - S230:
[0091] S210, after completing one round of inspection, determine whether all fire alarms are marked;
[0092] S220, if not, send the next round of inspection instructions; the next round of inspection instructions includes the inspection address code and the second command code. The marked fire alarms do not participate in the response to this round of inspection; the unmarked fire alarms compress their own ID information codes according to the second command code to generate corresponding second compressed codes as the local address encoding for this round of inspection by the fire controller. When the second compressed code matches the inspection address code, the corresponding fire alarm sends response data to the fire controller;
[0093] S230, execute S120 - S160, S210 - S230 until all fire alarms are marked.
[0094] Specifically, taking the compression algorithm CRC-8 as an example; the ID information codes of the fire alarms are arranged according to different predetermined rules respectively, and then CRC-8 verification is performed to obtain a single-byte CRC compression code respectively. This compression code is regarded as the local address code of the fire alarm. The fire controller adopts a single-address coding format and patrols all the fire alarms on the bus one by one from patrol address 000 to patrol address 255. When the patrol address code in the patrol instruction received by the fire alarm is consistent with its own CRC compression code, the fire alarm sends response data to the fire controller. If the fire controller can correctly receive the response data, then the ID information code of the fire alarm is stored in the database in sequence and feedback is sent to inform the fire alarm; if the fire controller does not receive the response data within the preset time period, it means that there is no such address in the current bus; if the fire alarm can receive the response data, but the response data does not conform to the correct decoding rule, it means that there are multiple identical local address codes on the bus. It may be that the ID information codes of different fire alarms are compressed to obtain the same compression code, so the phenomenon of simultaneous code return occurs, resulting in incorrect code return received by the fire controller.
[0095] In the first round of patrol, as long as there is a situation of receiving error once, it means that there are still unrecognized fire controllers on the bus. After the first round of patrol ends, the fire controller sends a new patrol command, and each fire alarm compresses the ID information code according to the new command code in the new patrol instruction to generate a new CRC compression code. The fire controller still adopts a single-address coding format and patrols all the fire alarms on the bus one by one from patrol address 000 to patrol address 255. When the patrol address code received by the fire alarm is consistent with the CRC compression code of this round of its own, the fire alarm responds to the fire controller. Because the fire alarm that responded correctly for the first time does not respond to the patrol response of this round, and the generation rule of the compression code is changed this time, it avoids the situation that the fire alarms with local address code conflicts in the previous round of patrol still conflict in this round of patrol. The fire controller adds the ID information code of the fire alarm that is correctly received to the database of the fire controller until all patrol addresses are patrolled.
[0096] If there is still a situation of receiving response data error in the second round of patrol, it means that there are still situations where local address codes conflict. The fire controller changes the patrol command again and repeats the patrol process of the second round.
[0097] The fire controller adopts multiple patrol commands. The fire alarm obtains multiple CRC compression codes by using different algorithms for the ID information code according to the patrol command of the fire controller. The purpose is to make different compression codes obtained each time. It avoids the situation that in different rounds of patrol, there are always a fixed number of fire alarms with the same address, which affects communication and causes the phenomenon of being unable to recognize.
[0098] Time Analysis:
[0099] The communication rate of the fire bus is generally 2400 bps, that is, 4 mS per byte; it takes 7 bytes for the fire controller to send a patrol inspection instruction once, that is, 28 ms; it takes 10 bytes for the fire alarm to respond once, that is, 40 ms; it takes 7 bytes for the fire controller to send a confirmation instruction once, that is, 28 ms; the idle time after each sending is 8 ms; the time for correctly receiving a response data once is: 28 + 8 + 40 + 8 + 28 + 8 = 120 ms; if all inspections in a round can be correctly received, the required time is 112 ms X 256 = 30 S; even if four rounds of inspections are carried out, the required time is only 120 seconds. That is to say, within 120 seconds, the ID information codes of all fire alarms on a bus can be automatically inspected without manual intervention, which greatly reduces the difficulty of engineering commissioning and shortens the commissioning time.
[0100] Furthermore, after the ID information codes of all fire alarms on the bus are stored in the database of the fire controller in sequence, the fire controller can directly use the ID information codes of the fire alarms as display information. However, this method does not conform to the management habits of people, and the numbers are too long, which is not convenient for communication and use. In order to make the display and communication more convenient, the originally long ID information codes need to be shortened. As mentioned above, it can be shortened to the length of one byte. Therefore, an external trigger condition can be given to the fire controller so that the fire controller maps the ID information codes stored in sequence in it into single-byte data as the mapping address, or directly uses the sequence number of the ID information code in the database as the mapping address; the external trigger condition can be that the worker operates the fire controller to enter the operation interface of the mapping address.
[0101] The fire controller has an independent operation interface to display the address information to be mapped. During this period, the sorting can also be changed manually, and even some ID information codes can be locked to prevent the mapping address from being changed. This method is applicable to the situation where several address points need to be added during future use to ensure that the original mapping address information remains unchanged. It is also possible to directly edit the required ID information codes. This method is applicable to the need for on-site product replacement, that is, the original product has a fault and is replaced with a new product, but the mapping address remains unchanged.
[0102] After the artificial confirmation of the re - mapping operation, the fire controller issues mapping instructions one by one. The mapping instructions include the mapping address and the ID information code of the fire alarm. After the fire alarm receives a mapping instruction that matches its own ID information code, it updates its address code according to the mapping address. The number of times the mapping instruction is sent matches the number of fire alarms, that is, all fire alarms need to have their addresses reset one by one. To ensure the accuracy of information, each mapping instruction will be sent repeatedly n times (n≥2). If the fire alarm on the bus receives mapping instructions that match its own ID information code continuously for n times, it will update its address code according to the mapping address. After that, the inspection and display can be carried out according to the single - byte address, which is convenient for management and communication.
[0103] Based on the above method embodiments, the second embodiment of the present application discloses a system for quickly identifying and determining the address code of a bus - type fire alarm. Referring to Figure 4 This system for quickly identifying and determining the address code may include a fire controller and a fire alarm.
[0104] Among them, the fire controller includes:
[0105] A first instruction sending module, which is used to send inspection instructions. The inspection instructions include an inspection address code and a command code. The command codes in each round of inspection instructions are different. The command codes of the inspection instructions sent each time in the same round are the same, and the current inspection address code is the previous inspection address code + 1;
[0106] A second instruction receiving module, which is used to receive address - code inspection instructions;
[0107] An address mapping module, which is used to map the ID information code of the fire alarm stored internally into single - byte data based on an external trigger condition;
[0108] A data receiving module, which is used to receive response data;
[0109] A first judgment module, which is used to judge whether the response data is correct;
[0110] A storage module, which is used to store the ID information code of the fire alarm into the database in sequence when the response data is correct, and the instruction sending module sends a confirmation instruction.
[0111] The fire alarm includes:
[0112] A first instruction receiving module, which is used to receive inspection instructions, broadcast inspection instructions, and mapping instructions;
[0113] A data compression module, which is used to compress its own ID information code according to different command codes to generate corresponding compressed codes as the local address codes for the inspection of the fire controller in corresponding rounds; the ID information codes of the fire alarms are arranged according to the setting rules of the manufacturer, and both the inspection address code and the local address code are single bytes.
[0114] A second judgment module, which is used to judge whether the compressed code in each round matches the inspection address code in the corresponding round.
[0115] A data sending module, which is used to send the response data in the corresponding round when the compressed code matches the inspection address code in the corresponding round.
[0116] An identification module. After the first instruction receiving module receives the confirmation instruction, the second judgment module judges again whether the compressed code matches the inspection address code in the corresponding round. If so, the identification module performs confirmation identification.
[0117] An LED module, which is used to light up and flash for prompting according to the broadcast inspection instruction.
[0118] An address change module, which is used to receive the mapped address according to the mapping instruction and update its own address code.
[0119] The modules of the address code quick identification and determination system of the bus-type fire alarm correspond one by one to the address code quick identification and determination method of the bus-type fire alarm, and will not be elaborated here.
[0120] The above are all the preferred embodiments of the present application, which do not limit the protection scope of the present application in turn. Any feature disclosed in this specification (including the abstract and drawings), unless specifically described, can be replaced by other equivalent or similar-purpose alternative features. That is, unless specifically described, each feature is only an example of a series of equivalent or similar features.
Claims
1. A method for quickly identifying and determining the address code of a bus-type fire alarm, characterized in that Taking the fire controller as the execution entity, it includes: Sending a patrol inspection instruction, where the patrol inspection instruction includes a patrol inspection address code and a first command code; after all the fire alarms on the fire bus receive the patrol inspection instruction, they compress their own ID information codes according to the first command code to generate corresponding first compression codes as the local address codes for the current round of fire controller patrol inspection; the ID information codes of the fire alarms are arranged according to the setting rules of the manufacturer, and both the patrol inspection address code and the local address code are single bytes; Receiving response data; when there is a match between the first compression code and the patrol inspection address code, the corresponding fire alarm sends the response data to the fire controller, and the response data includes the ID information code of the fire alarm itself and the first compression code generated by compressing the ID information code in this round; Judging whether the response data is correct; If so, store the received ID information code of the fire alarm into the database in sequence and send a confirmation instruction; after the fire alarm receives the confirmation instruction, judge again whether the patrol inspection address code matches the first compression code. If so, perform a confirmation mark, otherwise, do not process; Increment the patrol inspection address code by 1, and repeat the above steps until all the patrol inspection address codes within the range of single-byte data in this round are sent.
2. The method for quickly identifying and determining the address code of a bus-type fire alarm according to claim 1, characterized in that The step of judging whether the response data is correct further includes: If not, send the next patrol inspection instruction, where the patrol inspection address code in the next patrol inspection instruction is the patrol inspection address code in the previous patrol inspection instruction + 1, and repeat the above steps until all the patrol inspection address codes within the range of single-byte data in this round are sent.
3. A method for quickly identifying and determining the address code of a bus-type fire alarm according to claim 2, characterized in that, The steps after sending the patrol inspection instruction include: Judging whether response data is received within a preset time period; If so, then judge whether the response data is correct; If not, send the next patrol inspection instruction, where the patrol inspection address code in the next patrol inspection instruction is the patrol inspection address code in the previous patrol inspection instruction + 1, and repeat the above steps until all the patrol inspection address codes within the range of single-byte data in this round are sent.
4. The method for quickly identifying and determining the address code of a bus-type fire alarm according to claim 3, characterized in that, After judging whether the response data is correct, it includes: After completing one round of patrol inspection, judge whether all the fire alarms are marked; If not, send the next round of patrol inspection instruction; the next round of patrol inspection instruction includes a patrol inspection address code and a second command code, and the marked fire alarms no longer participate in the patrol inspection response in this round; the unmarked fire alarms compress their own ID information codes according to the second command code to generate corresponding second compression codes as the local address codes for the current round of fire controller patrol inspection; when the second compression code matches the patrol inspection address code, the corresponding fire alarm sends the response data to the fire controller.
5. A method for quickly identifying and determining the address code of a bus-type fire alarm according to claim 1, characterized in that, The method for quickly identifying and determining the address code further includes: Based on an external trigger condition, the fire controller maps the ID information codes of the fire alarms stored in sequence internally into single-byte data as the mapped address, or uses the storage sequence number of the ID information codes of the fire alarms in the fire controller as the mapped address.
6. The method for quickly identifying and determining the address code of a bus-type fire alarm according to claim 5, characterized in that, Based on external trigger conditions, the fire controller maps the ID information codes of the fire alarms stored in sequence internally into single-byte data as mapping addresses, or, after using the storage sequence numbers of the ID information codes of the fire alarms in the fire controller as mapping addresses, further includes: Sequentially sending mapping instructions; the mapping instructions include mapping addresses and the ID information codes of the fire alarms; after the fire alarm receives the mapping instruction that matches its own ID information code, it updates its own address code according to the mapping address; the number of times the mapping instruction is sent is the same as the number of fire alarms.
7. A method for quickly identifying and determining the address code of a bus-type fire alarm according to claim 6, characterized in that, The method for quickly identifying and determining the address code further includes: When sending the mapping instruction, it is sent continuously n times, where n≥2; the fire alarm will update its own address code according to the mapping address only after receiving the mapping instruction that matches its own ID information code continuously n times.
8. A method for quickly identifying and determining the address code of a bus-type fire alarm according to claim 1, characterized in that, Before sending the inspection instruction, it includes: When installing the fire alarm, send a broadcast inspection instruction; all fire alarms that can receive the broadcast inspection instruction light up their own LED for flashing prompts. After all fire alarms are installed, receive the address code inspection instruction and enter the state of automatically setting the coding address.
9. An address coding rapid identification and determination system for a bus-type fire alarm, characterized in that, It includes a fire controller and fire alarms; Among them, the fire controller includes: A first instruction sending module for sending inspection instructions, where the inspection instructions include inspection address codes and command codes; the command codes in each round of inspection instructions are different; the command codes sent each time in the same round are the same, and the inspection address code this time is the previous inspection address code + 1; A data receiving module for receiving response data; A first judgment module for judging whether the response data is correct; A storage module for, when the response data is correct, storing the ID information codes of the fire alarms into the database in sequence, and the instruction sending module sends a confirmation instruction; The fire alarm includes: A first instruction receiving module for receiving the inspection instruction; A data compression module for compressing its own ID information code according to different command codes to generate a corresponding compressed code as the local address code for the fire controller's inspection in the corresponding round; the ID information codes of the fire alarms are arranged according to the manufacturer's setting rules, and both the inspection address code and the local address code are single bytes; A second judgment module for judging whether the compressed code in each round matches the inspection address code in the corresponding round; A data sending module for sending the response data in the corresponding round when the compressed code matches the inspection address code in the corresponding round; An identification module. After the first instruction receiving module receives the confirmation instruction, the second judgment module judges again whether the compressed code matches the inspection address code in the corresponding round. If so, the identification module performs a confirmation identification.
Citation Information
Patent Citations
Feed type bus method
CN105812214A
Dynamic recognition method of CPS (Cyber-Physical System) slave node based on UM-BUS
CN108845965A