CN111142042A - Automatic coding system and method - Google Patents
Automatic coding system and method Download PDFInfo
- Publication number
- CN111142042A CN111142042A CN202010126710.4A CN202010126710A CN111142042A CN 111142042 A CN111142042 A CN 111142042A CN 202010126710 A CN202010126710 A CN 202010126710A CN 111142042 A CN111142042 A CN 111142042A
- Authority
- CN
- China
- Prior art keywords
- slave
- coding
- output
- host
- output port
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Power Sources (AREA)
Abstract
The invention discloses an automatic coding system and method. The system comprises a host and a plurality of slave machines, wherein the host is connected with each slave machine through a communication bus; the host comprises a power supply module; the slave comprises a processing chip, an input port and an output port; the processing chip is used for controlling the output voltage of the output port according to the state of the input port; the slave is connected in series between the anode and the cathode of the power module through the coding wire; the output port of the previous slave is connected with the input port of the next slave, the input port of the first slave is connected with the anode of the power supply module, and the output port of the last slave is connected with the cathode of the power supply module. The invention can automatically complete equipment coding, finishes automatic identification, has high speed, strong anti-interference capability and high reliability, and also has the fault diagnosis function.
Description
Technical Field
The invention relates to an automatic coding system of electrical equipment and an automatic coding method.
Background
The new energy automobile comprises a plurality of groups of batteries and needs to use a plurality of groups of detection equipment to implement safety monitoring. After a plurality of groups of detection devices (hereinafter called slaves) are connected in series to form a loop, automatic coding is needed, and the coding is fed back to the coding devices (hereinafter called masters) so as to clarify the positions of the detection devices in the loop.
In the prior art, coding is mainly realized by means of serial voltage division and voltage sequencing. For example, chinese patent publication No. CN110531272A discloses an automatic coding method for battery thermal runaway detection system, each slave device has a built-in resistor, each slave device measures a different voltage by series voltage division and satisfies the relationship of V1> V2> Vn, and the slaves are numbered by a voltage sorting method. Also, for example, chinese patent application No. CN102821017B discloses a method and system for identifying slave addresses in a master-slave field bus sequentially, which determines the slot numbers of the slaves by calculating the voltage differences between the master and the slaves, thereby implementing sequential identification.
The above method has the following defects: (1) the serial voltage division mode is adopted, the voltage distributed by each slave machine is smaller and smaller, the anti-interference capability is poorer and poorer, and coding failure or error is easy to occur and the reliability is poor when the slave machine is used on site; (2) the system does not have the function of fault diagnosis, and if the coding fails, the system cannot automatically judge the type and the position of the fault.
Disclosure of Invention
The invention provides an automatic coding system and a method, aiming at: (1) the anti-interference capability of the system is improved; (2) a fault diagnosis function is provided.
The technical scheme of the invention is as follows:
an automatic coding system comprises a host and a plurality of slave machines, wherein the host is connected with each slave machine through a communication bus;
the host comprises a power supply module;
the slave comprises a processing chip, an input port and an output port; the processing chip is used for controlling the output voltage of the output port according to the state of the input port;
the slave is connected in series between the anode and the cathode of the power module through the coding wire; the output port of the previous slave is connected with the input port of the next slave, the input port of the first slave is connected with the anode of the power supply module, and the output port of the last slave is connected with the cathode of the power supply module.
As a further improvement of the system: the input port of the slave is connected with the input detection end of the processing chip through the input module, and the output port of the slave is connected with the output control end of the processing chip through the output module;
the input module is a voltage division detection circuit;
the output module comprises a control circuit and an output resistor, the power supply end of the slave is connected with the output port sequentially through the control circuit and the output resistor, and the control circuit is connected with the output control end.
As a further improvement of the system: the slave machine also comprises a detection module, the detection module is used for detecting the output voltage of the output port, and the output detection end of the processing chip is connected with the output port through the detection module.
As a further improvement of the system: the detection module is a voltage division detection circuit.
The invention also provides an automatic coding method, which comprises the following steps:
s1, connecting the slave machines in series between the positive and negative poles of the power module of the host machine through the encoding wires; for the adjacent slave machines, the output port of the previous slave machine is connected with the input port of the next slave machine; the input port of the first slave machine is connected with the anode of the power supply module, and the output port of the last slave machine is connected with the cathode of the power supply module; the host and each slave machine are also communicated through a communication bus;
s2, the host sends out an automatic coding start command through the communication bus;
s3, after all the slaves receive the automatic coding start command, detecting the voltage of the input port, automatically coding the slave which does not finish coding and has effective voltage of the input port into the next code in sequence, then controlling the output voltage of the output port of the local machine, and sending a local machine coding completion command;
s4, after the host receives the encoding completion command of the slave, the encoded serial number is updated; the master and other slaves return to step S3 to continue encoding;
meanwhile, the slave that has just completed encoding in step S3 determines according to the state of its output port:
in the condition a, if the output port is normally connected with the next slave, the encoding work of the local machine is finished;
b, if the output port is connected with the host, sending a coding ending command, and after receiving the coding ending command, ending the coding by the host, wherein the coding is successful;
and c, if the output port is suspended, a rear-stage suspension alarm command is sent out, the host stops coding after receiving the rear-stage suspension alarm command, and coding fails.
As a further improvement of the above method: the slave machine detects the voltage of an input port through a voltage division detection circuit; the power supply end in the slave is connected with the output port sequentially through the control circuit and the output resistor, and the on-off between the power supply end and the output resistor is controlled through the control circuit;
the method for determining the state of the output port in step S4 is as follows: if the output voltage is within a preset effective interval, judging as a condition a; if the output voltage is 0V, determining that the situation is b; if the output voltage is the supply terminal voltage, it is determined as the case c.
As a further improvement of the above method: in step S4, if the slave determines that the result is the condition a according to the state of its output port, before the local encoding operation is finished, it monitors whether the encoding completion command of the next slave is sent overtime, if yes, it sends a subsequent unresponsive alarm command, after the host receives the subsequent unresponsive alarm command, it determines that a subsequent unresponsive alarm fault occurs, and records the encoding of the slave sending the alarm command for locating the fault, and the encoding fails.
As a further improvement of the above method: after the host sends an automatic coding start command, if the coding completion command of the first slave machine is not received after a preset time, the connection between the host and the first slave machine is judged to have a fault, and the coding fails.
Compared with the prior art, the invention has the following positive effects: (1) each slave machine independently outputs voltage to the next slave machine to replace the traditional voltage division serial mode, voltage signals received by each slave machine are equal, coding is completed through mutual communication and time sequence, coding does not need to be preset in advance, unique codes can be automatically allocated to slave machine equipment, and the method is high in coding speed, strong in anti-interference capability and high in reliability; (2) the detection module is arranged at the output port of the slave machine, and by detecting the output voltage, whether the coding is finished or not can be automatically judged, and whether a fault exists in the coding line or not can also be judged, so that the fault diagnosis and feedback are realized, and a reliable basis is provided for troubleshooting and positioning of the fault; (3) and an overtime response alarm mechanism is also provided, so that the fault diagnosis and troubleshooting range is expanded.
Drawings
Fig. 1 is a schematic structural diagram of the present coding system.
Fig. 2 is a schematic structural diagram of a slave.
FIG. 3 is a flow chart illustrating the host operating logic.
Fig. 4 is a flow chart illustrating the slave operation logic.
Detailed Description
The technical scheme of the invention is explained in detail in the following with the accompanying drawings:
referring to fig. 1, an automatic coding system comprises a master 1 and a plurality of slaves 2, wherein the master 1 and the slaves 2 are connected through a communication bus 3 and power supply wires. The host 1 includes a power module 1-1.
As in fig. 1 and 2, the slave 2 includes a processing chip 2-1, an input port 2-5 and an output port 2-6; the processing chip 2-1 is used for controlling the output voltage of the output port 2-6 according to the state of the input port 2-5.
As shown in fig. 1, the slave 2 is connected in series between the positive pole and the negative pole of the power module 1-1 through a coding line: the output ports 2-6 of the previous slave 2 and the input ports 2-5 of the next slave 2 of the adjacent slaves 2 are connected, the input port 2-5 of the first slave 2 is connected with the anode of the power supply module 1-1, and the output port 2-6 of the last slave 2 is connected with the cathode of the power supply module 1-1.
Further, as shown in fig. 2, the input port 2-5 of the slave 2 is connected to the input detection terminal 2-1-1 of the processing chip 2-1 through the input module 2-4, and the output port 2-6 of the slave 2 is connected to the output control terminal 2-1-2 of the processing chip 2-1 through the output module 2-2.
The input module 2-4 is a voltage division detection circuit, and comprises resistors R1 and R2 connected in series between the input port 2-5 and a ground terminal, and further comprises resistors R3 and R4 connected in series between a connection point between R1 and R2 and the ground terminal. The input detection terminal 2-1-1 is connected to the connection point between the resistors R3 and R4. Wherein, R1, R2 accomplish the voltage distribution of the input end (2/3 voltage division of the power supply voltage), and R3, R4 and the input voltage detection of the processing chip accomplish the measurement. If the voltage of the code line is 24V, after the voltage of the code line is connected in series through the R7 of the previous slave and the R1 and R2 of the slave, the voltage of the intermediate connection point between the R1 and the R2 is 8V and exceeds the bearing voltage of a processing chip, so that a voltage sampling circuit of R3 and R4 is added, and the functions of the voltage sampling circuit are as follows: 1. the voltage value is reduced by 1/11 times, so that the processing chip can bear the partial voltage of R1 and R2; 2. the added R3 and R4 resistors are far larger than R1 and R2 resistors, and the influence on the partial voltage of R1 and R2 is negligible. The ultimate goal is to allow the processing chip to collect the voltage normally. The processing chip 2-1 determines whether the input is valid by detecting the input voltage. Moreover, the system can measure continuously-changed input voltage values and adapt to different voltage levels.
The output module 2-2 comprises a control circuit and an output resistor, the power supply end of the slave 2 is connected with the output port 2-6 sequentially through the control circuit and the output resistor, and the control circuit is connected with the output control end 2-1-2. The processing chip 2-1 controls and outputs high level 24V/0V through the control circuit. Specifically, the processing chip 2-1 controls the switching of the transistor Q1 by controlling the switching of the transistor Q2, thereby controlling the output voltage. When the output control end 2-1-2 of the processing chip 2-1 is at low level, Q2 is cut off, Q1 is cut off, and 0V is output from the output port 2-6; when the output control end 2-1-2 of the processing chip 2-1 is at high level, Q2 is conducted, Q1 is conducted, and the output port 2-6 outputs 24V.
The slave machine 2 further comprises a detection module 2-3, the detection module 2-3 is used for detecting the output voltage of the output port 2-6, and the output detection end 2-1-3 of the processing chip 2-1 is connected with the output port 2-6 through the detection module 2-3.
The detection module 2-3 is a voltage division detection circuit, and comprises resistors R9 and R10 which are connected in series between the output port 2-6 and the ground terminal, the output detection terminal 2-1-3 is connected with a connection point between the resistors R9 and R10, and the output voltage value is measured. If the measured voltage is in the effective interval (calculated according to the resistance value and the voltage division condition of the output resistor R7 and the next-stage input module 2-4), the next slave machine 2 is normally connected; if the measured voltage is 0V, the negative electrode of the power module 1-1 of the host 1 is connected, and whether the numbering is finished or not can be judged according to the characteristic; if the measured voltage is 24V, the output is suspended, and the short line is connected, so that the fault judgment can be carried out according to the characteristic.
Referring to fig. 3 and 4, the automatic coding method based on the above system includes the steps of:
s1, connecting the plurality of slaves 2 in series between the positive and negative poles of the power module 1-1 of the master 1 through the coding lines; for the adjacent slave 2, the output port 2-6 of the previous slave 2 is connected with the input port 2-5 of the next slave 2; an input port 2-5 of a first slave machine 2 is connected with the anode of the power supply module 1-1, and an output port 2-6 of a last slave machine 2 is connected with the cathode of the power supply module 1-1; the master 1 and the slaves 2 also communicate via a communication bus 3.
S2, the host 1 issues an automatic coding start command via the communication bus 3.
And S3, after all the slaves 2 receive the automatic coding start command, detecting the voltage of the input ports 2-5, automatically coding the slave 2 which does not finish coding and has the input ports 2-5 with effective voltage into the next code in sequence, storing the codes, then controlling the output voltage of the output port 2-6 of the local machine, and sending the local machine coding completion command.
For the code of the first slave machine 2, if the host 1 still does not receive the code completion command of the first slave machine 2 after the preset time length, it is determined that the connection between the host 1 and the first slave machine 2 has a fault and the code fails. In this case, the possible faults are: (1) the coding line from the host to the slave at the position 1 is broken; (2) the power supply line of the position 1 slave machine is failed; (3) the communication line of the position 1 slave machine is in failure; (4) the equipment operation of the position 1 slave machine is failed.
S4, after receiving the encoding completion command of the slave 2, the host 1 updates the encoded serial number; the master 1 and other slaves 2 return to step S3 to continue encoding;
meanwhile, the slave 2 that has just completed encoding in step S3 makes a determination according to the state of its output port 2-6:
in the case a, if the output voltage is within the preset effective interval, the output port 2-6 is normally connected with the next slave machine 2, whether the coding completion command of the next slave machine 2 is sent out overtime is continuously monitored, and if the coding completion command is not sent out overtime, the coding work of the local machine is finished; if the time is out, a rear-stage no-response alarm command is sent, the host 1 judges that a rear-stage no-response alarm fault occurs after receiving the rear-stage no-response alarm command, and records the code of the slave 2 sending the alarm command for positioning the fault, and the code fails. The reasons for the non-response are: (1) the power supply line of the latter stage fails; (2) the communication line of the latter stage is failed; (3) the equipment of the latter stage malfunctions in operation.
And b, if the output voltage is 0V, the output port 2-6 is connected with the negative electrode of the power module 1-1 of the host 1, a coding end command is sent, the host 1 receives the coding end command, the coding is ended, and the coding is successful.
And c, if the output voltage is 24V, indicating that the output ports 2-6 are suspended, sending a rear-stage suspended alarm command, and stopping coding after the host 1 receives the rear-stage suspended alarm command, wherein the coding fails. In this case, the possible faults are: and the coding line connected with the later stage has a disconnection fault.
Claims (8)
1. An automatic coding system comprising a master (1) and a plurality of slaves (2), characterized in that: the host (1) is connected with each slave (2) through a communication bus (3);
the host (1) comprises a power supply module (1-1);
the slave (2) comprises a processing chip (2-1), an input port (2-5) and an output port (2-6); the processing chip (2-1) is used for controlling the output voltage of the output port (2-6) according to the state of the input port (2-5);
the slave machine (2) is connected in series between the anode and the cathode of the power module (1-1) through a coding line; the output ports (2-6) of the previous slave (2) are connected with the input ports (2-5) of the next slave (2), the input port (2-5) of the first slave (2) is connected with the anode of the power supply module (1-1), and the output port (2-6) of the last slave (2) is connected with the cathode of the power supply module (1-1).
2. The automatic coding system of claim 1, wherein: the input port (2-5) of the slave (2) is connected with the input detection end (2-1-1) of the processing chip (2-1) through the input module (2-4), and the output port (2-6) of the slave (2) is connected with the output control end (2-1-2) of the processing chip (2-1) through the output module (2-2);
the input module (2-4) is a voltage division detection circuit;
the output module (2-2) comprises a control circuit and an output resistor, the power supply end of the slave (2) is connected with the output port (2-6) sequentially through the control circuit and the output resistor, and the control circuit is connected with the output control end (2-1-2).
3. The automatic encoding system of claim 2, wherein: the slave (2) further comprises a detection module (2-3), the detection module (2-3) is used for detecting the output voltage of the output port (2-6), and the output detection end (2-1-3) of the processing chip (2-1) is connected with the output port (2-6) through the detection module (2-3).
4. The automatic encoding system of claim 3, wherein: the detection module (2-3) is a voltage division detection circuit.
5. An automatic encoding method is characterized by comprising the following steps:
s1, connecting the plurality of slaves (2) in series between the positive and negative poles of the power module (1-1) of the master (1) through the encoding lines; for the adjacent slave (2), the output port (2-6) of the previous slave (2) is connected with the input port (2-5) of the next slave (2); an input port (2-5) of a first slave (2) is connected with the anode of the power supply module (1-1), and an output port (2-6) of the last slave (2) is connected with the cathode of the power supply module (1-1); the host (1) and each slave (2) are communicated through a communication bus (3);
s2, the host (1) sends an automatic coding start command through the communication bus (3);
s3, after all the slaves (2) receive the automatic coding start command, detecting the voltage of the input port (2-5), automatically coding the slaves (2) which do not finish coding and have the voltage of the input port (2-5) valid into the next code in sequence, then controlling the output voltage of the output port (2-6) of the local machine, and sending the local machine coding completion command;
s4, after receiving the coding completion command of the slave (2), the host (1) updates the coded serial number; the host (1) and other slaves (2) return to the step S3 to continue coding;
meanwhile, the slave (2) which just completes the coding in the step S3 judges according to the state of the output port (2-6):
a, if the output port (2-6) is normally connected with the next slave (2), the local encoding work is finished;
b, if the output port (2-6) is connected with the host (1), sending a coding end command, and after receiving the coding end command, the host (1) ends coding and the coding is successful;
and c, if the output ports (2-6) are suspended, a rear-stage suspended alarm command is sent out, the host (1) stops coding after receiving the rear-stage suspended alarm command, and coding fails.
6. The automatic encoding method of claim 5, wherein: the slave (2) detects the voltage of an input port (2-5) through a voltage division detection circuit; the power supply end in the slave (2) is connected with the output port (2-6) sequentially through the control circuit and the output resistor, and the on-off between the power supply end and the output resistor is controlled through the control circuit;
the method for judging the state of the output port (2-6) in step S4 is as follows: if the output voltage is within a preset effective interval, judging as a condition a; if the output voltage is 0V, determining that the situation is b; if the output voltage is the supply terminal voltage, it is determined as the case c.
7. The automatic encoding method of claim 5 or 6, wherein: in step S4, if the slave (2) determines that the result is the condition a according to the state of its output port (2-6), before the encoding operation of the slave is finished, it is monitored whether the encoding completion command of the next slave (2) is sent out overtime, if yes, a subsequent no-response alarm command is sent out, after the host (1) receives the subsequent no-response alarm command, it is determined that a subsequent no-response alarm fault occurs, and the encoding of the slave (2) sending out the alarm command is recorded for locating the fault, and the encoding fails.
8. The automatic encoding method of claim 5 or 6, wherein: after the host (1) sends an automatic coding start command, if a coding completion command of the first slave machine (2) is not received after a preset time, it is judged that the connection between the host (1) and the first slave machine (2) has a fault and the coding fails.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010126710.4A CN111142042A (en) | 2020-02-28 | 2020-02-28 | Automatic coding system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010126710.4A CN111142042A (en) | 2020-02-28 | 2020-02-28 | Automatic coding system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111142042A true CN111142042A (en) | 2020-05-12 |
Family
ID=70528301
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010126710.4A Pending CN111142042A (en) | 2020-02-28 | 2020-02-28 | Automatic coding system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111142042A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111897746A (en) * | 2020-07-31 | 2020-11-06 | 广东昆仑信息科技有限公司 | Machine room equipment encoding method and system |
CN114035122A (en) * | 2021-11-08 | 2022-02-11 | 浙江中群智能设备制造有限公司 | Method for numbering connection of circuit breakers in distribution box |
CN114126140A (en) * | 2021-12-06 | 2022-03-01 | 张志宝 | LED automatic coding method and system |
CN115834538A (en) * | 2022-11-03 | 2023-03-21 | 宁德时代新能源科技股份有限公司 | Encoding processing method, apparatus, device, storage medium, and program product |
CN115834538B (en) * | 2022-11-03 | 2024-07-16 | 宁德时代新能源科技股份有限公司 | Encoding processing method, apparatus, device, storage medium, and program product |
-
2020
- 2020-02-28 CN CN202010126710.4A patent/CN111142042A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111897746A (en) * | 2020-07-31 | 2020-11-06 | 广东昆仑信息科技有限公司 | Machine room equipment encoding method and system |
CN111897746B (en) * | 2020-07-31 | 2023-06-23 | 广东昆仑信息科技有限公司 | Machine room equipment coding method and system |
CN114035122A (en) * | 2021-11-08 | 2022-02-11 | 浙江中群智能设备制造有限公司 | Method for numbering connection of circuit breakers in distribution box |
CN114126140A (en) * | 2021-12-06 | 2022-03-01 | 张志宝 | LED automatic coding method and system |
CN115834538A (en) * | 2022-11-03 | 2023-03-21 | 宁德时代新能源科技股份有限公司 | Encoding processing method, apparatus, device, storage medium, and program product |
CN115834538B (en) * | 2022-11-03 | 2024-07-16 | 宁德时代新能源科技股份有限公司 | Encoding processing method, apparatus, device, storage medium, and program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111142042A (en) | Automatic coding system and method | |
CN101546483B (en) | System and method for fault diagnosis of traffic signal controller | |
CN102147969B (en) | Remote wiring inspection system and connector thereof | |
CN112217702B (en) | Automatic addressing method for cascade master-slave module, master control module and slave control module | |
CN111707924B (en) | Flexible direct current converter valve on-site test fault diagnosis system and method | |
CN111787128A (en) | Automatic addressing method, system and main control module thereof | |
CN211826420U (en) | Automatic coding system | |
CN109720204A (en) | A kind of fault detection system and method for DC/DC converter | |
CN112606869A (en) | Point switch control device | |
CN110673054B (en) | DC/DC power supply test system and aging test method of DC/DC power supply | |
CN108644096B (en) | Vacuum pump control system and vehicle for vehicle | |
CN112947215B (en) | Data acquisition feedback system | |
CN104898009B (en) | Detection equipment and detection method for online sensing equipment | |
CN112838848B (en) | Insulated gate bipolar transistor series valve structure | |
US4752959A (en) | Wiring state detecting device for vehicle | |
CN114844742B (en) | Battery management system and control method thereof | |
CN111505516A (en) | Server cabinet power supply system and detection method | |
KR20150003545A (en) | Battery system including auto power relay assembly and operating method thereof | |
CN114465843A (en) | System and method for automatically configuring field device ID based on CAN bus | |
CN210606064U (en) | Automatic coding system of fire alarm detector | |
CN115542133B (en) | Fault self-diagnosis system and method for high-voltage interlocking loop and energy storage system | |
CN112198376A (en) | Phase checking instrument and phase checking method before distribution network lapping | |
CN110618320A (en) | Multichannel gating grounding resistance online test device with remote communication | |
CN218003543U (en) | Alarm circuit of analyzer | |
CN110912463A (en) | Motor control method and device, storage medium and motor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 264006 Shandong city of Yantai Province Economic and Technological Development Zone Jinsha River Road No. 163 Applicant after: Yantai Chuangwei New Energy Technology Co.,Ltd. Address before: 264006 Shandong city of Yantai Province Economic and Technological Development Zone Jinsha River Road No. 163 Applicant before: YANTAI CHUNGWAY NEW ENERGY TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information |