CN104618199A - Node access automatic identifying method and device based on CAN (controller area network) communication and air conditioner - Google Patents

Node access automatic identifying method and device based on CAN (controller area network) communication and air conditioner Download PDF

Info

Publication number
CN104618199A
CN104618199A CN201410831547.6A CN201410831547A CN104618199A CN 104618199 A CN104618199 A CN 104618199A CN 201410831547 A CN201410831547 A CN 201410831547A CN 104618199 A CN104618199 A CN 104618199A
Authority
CN
China
Prior art keywords
node
frame
network
new
host node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410831547.6A
Other languages
Chinese (zh)
Inventor
李涛
李伟进
曾云洪
钟金扬
刘展宏
李美秀
彭嘉欣
董玉红
黎开晖
陈志方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201410831547.6A priority Critical patent/CN104618199A/en
Publication of CN104618199A publication Critical patent/CN104618199A/en
Pending legal-status Critical Current

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a node access automatic identifying method and a node access automatic identifying device based on CAN (controller area network) communication and an air conditioner. The node access automatic identifying method comprises the following steps: a step S1: accessing a new node into a CAN network; a step S2: sending an ID request frame to a CAN bus; a step S3: comparing times for sending the ID request frame with preset ID request frame sending times, judging whether a master node is damaged or not; a step S4: according to the judged results, selecting a slaver node or a master node to access into the CAN network. According to the node access automatic identifying method disclosed by the invention, automatic identifying for all replaced new nodes in the CAN network can be realized, the network communication reliability and the node universality are improved.

Description

Based on node access automatic identifying method and device, the air conditioner of CAN communication
Technical field
The present invention relates to communication technical field, in particular to a kind of access automatic identifying method of the node based on CAN communication and device, air conditioner.
Background technology
As shown in Figure 1, the automatic identification technology that existing CAN accesses new node adopts host-guest architecture mostly, that is: can assign one in a CAN network for host node, remaining is from node.When need from node failure more to renew from node time, the needing to send ID by CAN to host node from node and apply for frame of new access, can distribute No. ID to from node after host node receives application frame, what realize new node melts net.But what this mode then cannot realize new node when host node lost efficacy melts net, there is communication hidden danger in the host node troublesome poeration more renewed and easily makeing mistakes.
Summary of the invention
There is provided a kind of node based on CAN communication to access automatic identifying method and device, air conditioner in the embodiment of the present invention, the automatic identification of CAN network all replacings new node can be realized, improve the versatility of network communication reliability and node.
For solving the problems of the technologies described above, the embodiment of the present invention provides a kind of node based on CAN communication to access automatic identifying method, comprising: step S1: new node is linked into CAN network; Step S2: send ID claim frame to CAN; Step S3: the number of times sending ID claim frame is compared with the ID claim frame times N preset, judges whether host node damages; Step S4: select as being linked into CAN network from node or as host node according to judged result.
As preferably, described step S2 comprises: automatically broadcast a Frame by CAN after new node powers on, and this data frame packet is containing application function code and MAC Address.
As preferably, described step S3 comprises: send ID claim frame to CAN, if receive acknowledgement frame, and sends no more than N time of the number of times M of ID claim frame, then accesses CAN network as from node; If transmission ID claim frame number of times M is greater than N time and receives acknowledgement frame not yet, be then automatically updated into host node and be linked into CAN network.
As preferably, when judging that host node damages, own MAC address is converted to self ID by new node, and is connected to CAN network as host node.
As preferably, described node access automatic identifying method also comprises: step S5: when new node accesses in CAN network as host node, new node opens host node pattern, and broadcast frame data to other nodes, inform that this node is as new host node, other nodes are replied, and set up communication.
As preferably, N is 3.
According to a further aspect in the invention, provide a kind of node based on CAN communication access automatic identifying method, comprising: step S1: new node is linked into CAN network; Step S2: preset ID claim frame times N and send ID claim frame to CAN; Step S3: the number of times sending ID claim frame is compared with the ID claim frame times N preset, judges whether host node damages; Step S4: select as being linked into CAN network from node or as host node according to judged result.
In accordance with a further aspect of the present invention, provide a kind of node based on CAN communication access automatic identification equipment, comprising: access unit, for new node is accessed CAN network; Transmitting element, for being sent to CAN by the ID claim frame of new node; Comparing unit, compares with the ID claim frame times N preset for number of times new node being sent ID claim frame; According to the comparative result of comparing unit, judging unit, for judging whether host node damages; Processing unit, is linked in CAN network as from node or as host node for controlling new node according to the judged result of judging unit.
As preferably, node access automatic identification equipment also comprises host node converting unit, for new node being converted to host node when host node damages, broadcasting frame data to other nodes, informing that this node is as new host node, and sets up and communicate.
In accordance with a further aspect of the present invention, provide a kind of air conditioner, comprise node access automatic identification equipment, this node access automatic identification equipment is the above-mentioned access of the node based on CAN communication automatic identification equipment.
Apply technical scheme of the present invention, the node access automatic identifying method based on CAN communication comprises: step S1: new node is linked into CAN network; Step S2: send ID claim frame to CAN; Step S3: the number of times sending ID claim frame is compared with the ID claim frame times N preset, judges whether host node damages; Step S4: select as being linked into CAN network from node or as host node according to judged result.Pass through said method, new node can be made to be automatically updated to as host node when host node lost efficacy, what can realize new node more easily melts net, can realize the automatic identification of CAN network all replacings new node, improves the versatility of network communication reliability and node.
Accompanying drawing explanation
Fig. 1 is node of the prior art access automatic identifying method flow chart;
Fig. 2 is the access of the node based on the CAN communication automatic identifying method flow chart of the embodiment of the present invention;
Fig. 3 is the fundamental diagram of the access of the node based on the CAN communication automatic identification equipment of the embodiment of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described in further detail, but not as a limitation of the invention.
Shown in Figure 2, according to embodiments of the invention, the node access automatic identifying method based on CAN communication comprises: step S1: new node is linked into CAN network; Step S2: send ID claim frame to CAN; Step S3: the number of times sending ID claim frame is compared with the ID claim frame times N preset, judges whether host node damages; Step S4: select as being linked into CAN network from node or as host node according to judged result.
When new node judges whether host node damages, if host node does not damage, then can receive the claim frame of new node and return an acknowledgement frame, be i.e. the frame of No. ID, this peer distribution, after new node receives acknowledgement frame, then prove that new node is linked in CAN communication network as from node.If host node damages, new node does not receive acknowledgement frame, then judge that new node is as in host node access CAN network.
N is herein preferably 3.Generally, ID claim frame times N can be preset according to the occupancy Rational choice of bus, the concrete value of N needs to determine according to network baud rate and data volume, baud rate is larger in theory, and the data transmission period of equivalent is also shorter, and bus idleness is also larger, the value of N is also less, vice versa, under current bandwidth condition, can meet application for 3 times and require.
N is herein pre-set in a program according to different occasion, is not revisable.
In another node based on CAN communication access automatic identifying method, carried out the automatic identification of node access by following steps, specifically comprise: step S1: new node is linked into CAN network; Step S2: preset ID claim frame times N and send ID claim frame to CAN; Step S3: the number of times sending ID claim frame is compared with the ID claim frame times N preset, judges whether host node damages; Step S4: select as being linked into CAN network from node or as host node according to judged result.
In this node access automatic identifying method, be first preset ID claim frame times N, send ID claim frame to CAN more afterwards, the benefit of this kind of method is the accuracy that can ensure ID claim frame transmission times.ID claim frame times N herein manually can be inputted as required by control panel, and applicability is better, and the scope of application is wider, has larger flexibility.
By above-mentioned node access automatic identifying method, can judge whether host node damages, and make new node be automatically updated to as host node when host node lost efficacy, make other nodes can continue proper communication by the host node after renewal, what can realize new node more easily melts net, solve the problem causing other new access node None-identifieds after original host node lost efficacy, effectively can improve ductility and the reliability of network, the automatic identification of CAN network all replacings new node can be realized, improve the versatility of network communication reliability and node.
New node is when sending ID claim frame to CAN, concrete step is: automatically broadcast a Frame by CAN after new node powers on, this data frame packet is containing application function code and MAC Address, intercepting part in the MAC Address that MAC Address is provided by MAC chip, host node can be that new node distributes No. ID according to the claim frame of new node.
When judging whether host node damages according to the ID claim frame times N preset, N ID claim frame can be sent to CAN, if receive acknowledgement frame, then accessing CAN network as from node; Still do not receive acknowledgement frame N time if sent, be then automatically updated into host node and be linked into CAN network.New node is when sending request frame herein, and circulation sends N time, if can receive acknowledgement frame in N time, then illustrate that host node does not damage, and can carry out proper communication, if still can not receive acknowledgement frame after N time, then illustrate that host node damages, new node opens host node pattern.
When judging whether host node damages according to the ID claim frame times N preset, can also carry out in the following way: send ID claim frame to CAN, if receive acknowledgement frame, and send no more than N time of the number of times M of ID claim frame, then access CAN network as from node; If transmission ID claim frame number of times M is greater than N time and receives acknowledgement frame not yet, be then automatically updated into host node and be linked into CAN network.In such cases, compare with the number of times and default ID claim frame times N that receive acknowledgement frame, if M is greater than N, then illustrates that host node damages, need new node to open host node pattern.
When judging that host node damages, own MAC address is converted to self ID by new node, and is connected to CAN network as host node.
When new node accesses in CAN network as host node, new node opens host node pattern, and broadcast frame data to other nodes, inform that this node is as new host node, other nodes are replied, set up communication, make CAN network to recover proper communication, other nodes can as interconnected from realizing between node and this new node.
The above-mentioned access automatic identifying method of the node based on CAN communication and device, air conditioner, what can facilitate new node melts net, and can after host node damages, new node is made automatically to be updated to host node rapidly, operating procedure is simpler, and be not easy to make mistakes, the versatility of network communication reliability and node can be improved.
Node based on CAN communication access automatic identifying method of the present invention is applicable to air conditioner, is particularly useful for business air conditioner and controller thereof.
In conjunction with shown in Figure 3, according to embodiments of the invention, the node access automatic identification equipment based on CAN communication comprises: access unit, for new node is accessed CAN network; Transmitting element, for being sent to CAN by the ID claim frame of described new node; Comparing unit, compares with the ID claim frame times N preset for the number of times described new node being sent ID claim frame; According to the comparative result of described comparing unit, judging unit, for judging whether host node damages; Processing unit, is linked in CAN network as from node or as host node for controlling described new node according to the judged result of described judging unit.
By above-mentioned automatic identification equipment, the automatic identification of CAN network all replacings new node can be realized, improve the versatility of network communication reliability and node.
Described node access automatic identification equipment also comprises host node converting unit, for described new node being converted to host node when host node damages, broadcasting frame data to other nodes, informing that this node is as new host node, and setting up communication.
According to embodiments of the invention, air conditioner comprises node access automatic identification equipment, and this node access automatic identification equipment is the above-mentioned access of the node based on CAN communication automatic identification equipment.
Certainly, be more than the preferred embodiment of the present invention.It should be pointed out that for those skilled in the art, under the prerequisite not departing from its general principles, can also make some improvements and modifications, these improvements and modifications are also considered as protection scope of the present invention.

Claims (10)

1., based on a node access automatic identifying method for CAN communication, it is characterized in that, comprising:
Step S1: new node is linked into CAN network;
Step S2: send ID claim frame to CAN;
Step S3: the number of times sending ID claim frame is compared with the ID claim frame times N preset, judges whether host node damages;
Step S4: select as being linked into CAN network from node or as host node according to judged result.
2. node access automatic identifying method according to claim 1, it is characterized in that, described step S2 comprises: automatically broadcast a Frame by CAN after new node powers on, and this data frame packet is containing application function code and MAC Address.
3. node access automatic identifying method according to claim 2, it is characterized in that, described step S3 comprises:
Send ID claim frame to CAN, if receive acknowledgement frame, and send no more than N time of the number of times M of ID claim frame, then access CAN network as from node; If transmission ID claim frame number of times M is greater than N time and receives acknowledgement frame not yet, be then automatically updated into host node and be linked into CAN network.
4. node access automatic identifying method according to claim 3, it is characterized in that, when judging that host node damages, own MAC address is converted to self ID by new node, and is connected to CAN network as host node.
5. node access automatic identifying method according to claim 1, is characterized in that, described node access automatic identifying method also comprises:
Step S5: when new node accesses in CAN network as host node, new node opens host node pattern, and broadcast frame data to other nodes, inform that this node is as new host node, other nodes are replied, and set up communication.
6. node access automatic identifying method according to claim 1, it is characterized in that, N is 3.
7., based on a node access automatic identifying method for CAN communication, it is characterized in that, comprising:
Step S1: new node is linked into CAN network;
Step S2: preset ID claim frame times N and send ID claim frame to CAN;
Step S3: the number of times sending ID claim frame is compared with the ID claim frame times N preset, judges whether host node damages;
Step S4: select as being linked into CAN network from node or as host node according to judged result.
8., based on a node access automatic identification equipment for CAN communication, it is characterized in that, comprising:
Access unit, for accessing CAN network by new node;
Transmitting element, for being sent to CAN by the ID claim frame of described new node;
Comparing unit, compares with the ID claim frame times N preset for the number of times described new node being sent ID claim frame;
According to the comparative result of described comparing unit, judging unit, for judging whether host node damages;
Processing unit, is linked in CAN network as from node or as host node for controlling described new node according to the judged result of described judging unit.
9. node access automatic identification equipment according to claim 8, it is characterized in that, described node access automatic identification equipment also comprises host node converting unit, for described new node being converted to host node when host node damages, broadcast frame data to other nodes, inform that this node is as new host node, and set up communication.
10. an air conditioner, comprises node access automatic identification equipment, it is characterized in that, described node access automatic identification equipment is the access of the node based on the CAN communication automatic identification equipment described in claim 8 or 9.
CN201410831547.6A 2014-12-26 2014-12-26 Node access automatic identifying method and device based on CAN (controller area network) communication and air conditioner Pending CN104618199A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410831547.6A CN104618199A (en) 2014-12-26 2014-12-26 Node access automatic identifying method and device based on CAN (controller area network) communication and air conditioner

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410831547.6A CN104618199A (en) 2014-12-26 2014-12-26 Node access automatic identifying method and device based on CAN (controller area network) communication and air conditioner

Publications (1)

Publication Number Publication Date
CN104618199A true CN104618199A (en) 2015-05-13

Family

ID=53152489

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410831547.6A Pending CN104618199A (en) 2014-12-26 2014-12-26 Node access automatic identifying method and device based on CAN (controller area network) communication and air conditioner

Country Status (1)

Country Link
CN (1) CN104618199A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965473A (en) * 2015-07-22 2015-10-07 广东美的暖通设备有限公司 VRV air-conditioning system and automatic addressing method therefor based on CAN bus
CN112737639A (en) * 2020-12-24 2021-04-30 阳光电源股份有限公司 Phase sequence identification method for power line carrier communication and photovoltaic system
CN115277293A (en) * 2022-07-26 2022-11-01 江苏恒立液压科技有限公司 ID configuration system and method of equipment in CAN bus network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725702A (en) * 2004-07-20 2006-01-25 联想网御科技(北京)有限公司 Network safety equipment and assemblied system and method for implementing high availability
CN101494565A (en) * 2008-01-24 2009-07-29 ***通信集团公司 Method for processing node defect of distributed wireless access system
CN102195769A (en) * 2011-06-02 2011-09-21 合肥工业大学 Clock synchronization method for automobile CAN (Control Area Network)
CN102202425A (en) * 2011-06-24 2011-09-28 中国人民解放军国防科学技术大学 Satellite cluster self-organization networking method based on master-slave heterogeneous data transmission module
CN102724065A (en) * 2012-05-22 2012-10-10 长沙中联消防机械有限公司 Network communication system and engineering mechanical equipment comprising same
CN103813325A (en) * 2012-11-07 2014-05-21 株式会社理光 Network management method of limited region self-organizing network, communication device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725702A (en) * 2004-07-20 2006-01-25 联想网御科技(北京)有限公司 Network safety equipment and assemblied system and method for implementing high availability
CN101494565A (en) * 2008-01-24 2009-07-29 ***通信集团公司 Method for processing node defect of distributed wireless access system
CN102195769A (en) * 2011-06-02 2011-09-21 合肥工业大学 Clock synchronization method for automobile CAN (Control Area Network)
CN102202425A (en) * 2011-06-24 2011-09-28 中国人民解放军国防科学技术大学 Satellite cluster self-organization networking method based on master-slave heterogeneous data transmission module
CN102724065A (en) * 2012-05-22 2012-10-10 长沙中联消防机械有限公司 Network communication system and engineering mechanical equipment comprising same
CN103813325A (en) * 2012-11-07 2014-05-21 株式会社理光 Network management method of limited region self-organizing network, communication device and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965473A (en) * 2015-07-22 2015-10-07 广东美的暖通设备有限公司 VRV air-conditioning system and automatic addressing method therefor based on CAN bus
CN112737639A (en) * 2020-12-24 2021-04-30 阳光电源股份有限公司 Phase sequence identification method for power line carrier communication and photovoltaic system
CN112737639B (en) * 2020-12-24 2022-07-12 阳光电源股份有限公司 Phase sequence identification method for power line carrier communication and photovoltaic system
CN115277293A (en) * 2022-07-26 2022-11-01 江苏恒立液压科技有限公司 ID configuration system and method of equipment in CAN bus network

Similar Documents

Publication Publication Date Title
CN104703182A (en) Zigbee-based networking method and network system
US20150120006A1 (en) Communication Apparatus, Communication Relay Apparatus and Communication System
CN104283642B (en) The method and device of issuing service set identifier SSID in WLAN
WO2006020125A3 (en) System and method for adaptively controlling a network of distributed devices
US20170223809A1 (en) Systems and methods for acknowledging broadcast messages in a wireless lighting control network
CN104125124A (en) Smart home remote control method, device and system
RU2013133804A (en) COMPONENT, SYSTEM AND METHOD OF DATA TRANSMISSION MANAGEMENT AT LEAST ONE ONE COMMUNICATION NETWORK
CN104618199A (en) Node access automatic identifying method and device based on CAN (controller area network) communication and air conditioner
CN106357542A (en) Method for providing multicast service and software defined network controller
CN106656995B (en) Equipment control method and device
US10045428B2 (en) Controlling system for controlling a power/data-communication system
CN111913397A (en) Device control method, device, storage medium, and electronic apparatus
CN104753926B (en) A kind of gateway admittance control method
CN105592502A (en) Load balancing method and device
CN105281957A (en) Method for connecting device to Internet of things and server
CN105338707A (en) Streetlamp control method, streetlamp control device and streetlamp control system
CN102710452A (en) Method and device for managing visit of multiple clients
CN105812413A (en) Communication method and device
CN102752752A (en) Method and device for base station maintenance
KR102450034B1 (en) Self-Organizing Network System And Method Of Thereof
CN105591903B (en) Message forwarding method and device
CN106547600A (en) A kind of remote auto installs the method and system of whole machine cabinet host operating system
CN107995125B (en) Traffic scheduling method and device
CN105659217A (en) Communication system, communication device, communication adapter, communication method, and program
CN103973502A (en) Wireless program updating method for devices of intelligent housing system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150513

RJ01 Rejection of invention patent application after publication