[go: up one dir, main page]

CN104967700A - Software upgrade method and network address assignment method for controller of multi-connected system - Google Patents

Software upgrade method and network address assignment method for controller of multi-connected system Download PDF

Info

Publication number
CN104967700A
CN104967700A CN201510477600.1A CN201510477600A CN104967700A CN 104967700 A CN104967700 A CN 104967700A CN 201510477600 A CN201510477600 A CN 201510477600A CN 104967700 A CN104967700 A CN 104967700A
Authority
CN
China
Prior art keywords
network
controller
machine
computer
external machine
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
CN201510477600.1A
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.)
Trane Air Conditioning Systems China Co Ltd
Original Assignee
Trane Air Conditioning Systems China Co Ltd
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 Trane Air Conditioning Systems China Co Ltd filed Critical Trane Air Conditioning Systems China Co Ltd
Priority to CN201510477600.1A priority Critical patent/CN104967700A/en
Publication of CN104967700A publication Critical patent/CN104967700A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

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

Abstract

本发明提供多联机系统的控制器的软件升级方法及网络地址分配方法,其中的网络地址分配方法包括控制器标示符设定,利用控制器自身设置的能唯一标示其身份的二进制代码设定为从机标示符;标示符注册及控制器网络地址分配,利用RS485网络上的主机控制器扫描RS485网络上所有的从机标示符,并且对扫描到的从机标示符对应的从机分配网络地址。

The present invention provides a software upgrade method and a network address allocation method for a controller of a multi-connected system, wherein the network address allocation method includes the controller identifier setting, and the binary code that can uniquely mark its identity set by the controller itself is set as Slave identifier; identifier registration and controller network address allocation, use the host controller on the RS485 network to scan all slave identifiers on the RS485 network, and assign a network address to the slave corresponding to the scanned slave identifier .

Description

多联机系统的控制器的软件升级方法及网络地址分配方法Software upgrade method and network address assignment method for controller of multi-connected system

技术领域technical field

本发明涉及联网空调控制器的自动网络地址分配及软件升级方法The invention relates to an automatic network address allocation and software upgrading method for a networked air conditioner controller

背景技术Background technique

多联机系统一般有多台内机和外机,集中控制器组成单层或多层RS485总线网络。在每一层网络中存在唯一的主机和多个从机。内机只做从机,主机可做主机或从机,集中控制器一般做主机。某个外机可能做本层网络的主机,但在更高层的网络中就可能变成从机(也可能做主机)。A multi-connected system generally has multiple internal units and external units, and the centralized controller forms a single-layer or multi-layer RS485 bus network. There is a unique master and multiple slaves in each layer of the network. The internal unit is only a slave machine, the master machine can be a master machine or a slave machine, and the centralized controller is generally a master machine. An external machine may be the master of the network at this layer, but it may become a slave (or a master) in a higher-level network.

受RS485的特性(半双工)限制,必须使每个从机:Restricted by the characteristics of RS485 (half-duplex), each slave must:

1.拥有一个网络唯一标识符;1. Possess a network unique identifier;

2.向主机注册其标识符作为网络地址。2. Register its identifier with the host as a network address.

上面2个步骤的缺点如下:The disadvantages of the above 2 steps are as follows:

标识符设定通常是通过拨码/线控/电脑实现的。这种实现方式需要在现场安装时实现,经常会引起以下几个问题:Identifier setting is usually realized by dialing code/wire control/computer. This implementation method needs to be realized during on-site installation, which often causes the following problems:

1、因为控制板位于电控箱里,控制板上的拨码或连接电脑的端口不易操作并有安全隐患;1. Because the control board is located in the electric control box, the dial code on the control board or the port connected to the computer is not easy to operate and has potential safety hazards;

2、操作人员需要专门培训;2. Operators need special training;

3、容易拨错或拨重,一旦拨错较难查找;3. It is easy to make a wrong dial or heavy dial, and it is difficult to find once a wrong dial is made;

注册网络地址-未分配地址的每个从机需要按次序单独上电,效率较低。Register network address - each slave that has not been assigned an address needs to be powered on in sequence, which is less efficient.

空调控制器(外机、内机或集成主控器)上的软件,都是在出厂前固化到芯片里的;一旦控制板需要更新功能,软件就需要升级。目前一般通过芯片的仿真设备来实现软件的升级,但也存在效率低,成本高,人员存在安全隐患等问题。The software on the air conditioner controller (outdoor unit, internal unit or integrated main controller) is solidified into the chip before leaving the factory; once the control board needs to be updated, the software needs to be upgraded. At present, software upgrades are generally implemented through chip simulation devices, but there are also problems such as low efficiency, high cost, and potential safety hazards for personnel.

发明内容Contents of the invention

本发明是基于多联机系统内外机控制器的网络地址分配方法,其中多个控制器通过RS485网络关联,该方法包括:The present invention is based on the network address allocation method of the internal and external machine controllers of the multi-line system, wherein multiple controllers are associated through the RS485 network, and the method includes:

控制器标示符设定,利用控制器自身设置或控制器芯片自带的能唯一标示其身份的多位二进制数字设定为从机标示符;Controller identifier setting, using the controller's own settings or the controller chip's own multi-digit binary number that can uniquely identify its identity is set as the slave identifier;

标示符注册及控制器网络地址分配,利用RS485网络上的主机控制器扫描RS485网络上所有的从机标示符,并且对扫描到的从机标示符对应的从机分配网络地址。Identifier registration and controller network address allocation, use the host controller on the RS485 network to scan all the slave identifiers on the RS485 network, and assign network addresses to the slaves corresponding to the scanned slave identifiers.

在根据本发明的网络地址分配方法的优选实施中,所述扫描方法为菲波那契分配方法。In a preferred implementation of the network address allocation method according to the present invention, the scanning method is a Fibonacci allocation method.

根据本发明实施例的多联机系统的控制器的软件升级方法,其包括:According to the software upgrade method of the controller of the multi-connected system according to the embodiment of the present invention, it includes:

利用前述的方法在外机以及外机对应的内机之间、外机与外机之间建立单层或多层RS485网络,计算机可以在网络的任何位置接入;Use the above method to establish a single-layer or multi-layer RS485 network between the external machine and the internal machine corresponding to the external machine, and between the external machine and the external machine, and the computer can be connected at any position in the network;

定义通讯协议,并指定串口类型;Define the communication protocol and specify the serial port type;

在所述RS485网络上进行广播,指定系统的所有控制器进入程序更新模式;broadcast on the RS485 network, and all controllers of the designated system enter the program update mode;

收到程序更新模式指令的所有控制器进入程序更新模式;All controllers that receive the program update mode command enter the program update mode;

利用计算机搜索并显示所述RS485网络上的所有控制器及对应的地址和信息;Utilize computer to search and display all controllers and corresponding addresses and information on the RS485 network;

指定需要升级的控制器地址列表和选择相应的软件文件,由计算机发送给目标控制器;Specify the controller address list to be upgraded and select the corresponding software file, and send it to the target controller by the computer;

所有控制器升级完成后,由计算机发命令,使系统内控制器退出程序更新模式并恢复到正常运行。After all the controllers are upgraded, the computer will issue a command to make the controllers in the system exit the program update mode and return to normal operation.

本发明的实施例提供了一种联网空调控制器的自动网络地址分配及软件升级方法,避免手工拨码操作和单独上电操作,提高效率,避免错误。The embodiment of the present invention provides an automatic network address assignment and software upgrade method for a networked air conditioner controller, which avoids manual dialing operations and separate power-on operations, improves efficiency, and avoids errors.

附图说明Description of drawings

本发明的上述的以及其他的特征、性质和优势将通过下面结合附图和实施例的描述而变得更加明显,其中:The above and other features, properties and advantages of the present invention will become more apparent from the following description in conjunction with the accompanying drawings and embodiments, in which:

图1为根据本发明的一实施例中多联机系统的控制器的自动网络地址分配方法的示意图。FIG. 1 is a schematic diagram of an automatic network address allocation method for a controller of a multi-connection system according to an embodiment of the present invention.

具体实施方式Detailed ways

下面结合具体实施例和附图对本发明作进一步说明,在以下的描述中阐述了更多的细节以便于充分理解本发明,但是本发明显然能够以多种不同于此描述的其它方式来实施,本领域技术人员可以在不违背本发明内涵的情况下根据实际应用情况作类似推广、演绎,因此不应以此具体实施例的内容限制本发明的保护范围。The present invention will be further described below in conjunction with specific embodiment and accompanying drawing, set forth more details in the following description so as to fully understand the present invention, but the present invention can obviously be implemented in many other ways different from this description, Those skilled in the art can make similar promotions and deductions based on actual application situations without violating the connotation of the present invention, so the content of this specific embodiment should not limit the protection scope of the present invention.

根据多联机系统的控制器的自动网络地址分配方法适合于多联机系统中的多个控制器通过RS485网络关联,该方法包括控制器标示符设定,即利用控制器自身设置的能唯一标示其身份的二进制代码设定为从机标示符。控制器自身设置的能唯一标示其身份的代码可以但不限于芯片序列号,例如对于主芯片为STM32系列芯片,每个芯片有一个96-bit的全球唯一码,用于标识每一片芯片。该96-bit码的定义后,使用其低64-bit来做为从机标示符,将此64-bit分为两组,每组32-bit。如果控制器芯片没有内部序列号,可以与控制板的供应商合作,每块控制板在出厂时写进一个序列号,该序列号的长度为24-bit,再由控制器生成一个随机8-bit序列,合并成为一个32-bit数字序列,其中8-bit随机数列为最高8位,24-bit数列为低8位。The automatic network address allocation method for the controllers of the multi-connected system is suitable for multiple controllers in the multi-connected system to associate through the RS485 network. The binary code of the identity is set as the slave identifier. The code set by the controller itself that can uniquely identify its identity can be but not limited to the chip serial number. For example, if the main chip is an STM32 series chip, each chip has a 96-bit globally unique code for identifying each chip. After the 96-bit code is defined, its lower 64-bit is used as a slave identifier, and the 64-bit is divided into two groups, each group is 32-bit. If the controller chip does not have an internal serial number, you can cooperate with the supplier of the control board. Each control board is written into a serial number when it leaves the factory. The length of the serial number is 24-bit, and then the controller generates a random 8- The bit sequence is combined into a 32-bit number sequence, in which the 8-bit random number sequence is the highest 8 bits, and the 24-bit number sequence is the lower 8 bits.

根据多联机系统的控制器的自动网络地址分配方法还包括标示符注册及控制器网络地址分配,利用RS485网络上的主机控制器扫描RS485网络上所有的从机标示符,并且对扫描到的从机标示符对应的从机分配网络地址。扫描方法在后述实施例中以斐波那契分配法(斐波那契(Fibonacci)查找结合深度优先搜索,数据结构采用二叉树的改进,数据全部存在于叶子节点)为例进行说明,以减少扫描过程中的试探次数。在后述实施例中,以内外机网络为例,外机控制器为主机,外机对应的内机控制器为从机,以从机标示符为32位进行地址寻址,64位地址则进行2次32位地址寻址。在无特别说明的情况下,内机即内机控制器,外机即外机控制器或者对应多个外机的集中控制器。According to the automatic network address distribution method of the controller of the multi-connected system, it also includes identifier registration and controller network address distribution, utilizes the host controller on the RS485 network to scan all the slave identifiers on the RS485 network, and scans the scanned slaves The slave machine corresponding to the machine identifier is assigned a network address. In the following embodiments, the scanning method is described by taking the Fibonacci distribution method (Fibonacci (Fibonacci) search combined with depth-first search, the data structure adopts the improvement of the binary tree, and all data exists in the leaf nodes) as an example to reduce The number of heuristics during the scan. In the following embodiments, taking the internal and external machine network as an example, the external machine controller is the master, and the internal machine controller corresponding to the external machine is the slave machine. The slave machine identifier is 32 bits for address addressing, and the 64-bit address is Perform 2 32-bit address addressing. Unless otherwise specified, the internal machine is the controller of the internal machine, and the external machine is the controller of the external machine or a centralized controller corresponding to multiple external machines.

菲波那契函数表达如下:The Fibonacci function is expressed as follows:

F(0)=0F(0)=0

F(1)=1F(1)=1

F(n)=F(n-1)+F(n-2)n为整数>=2F(n)=F(n-1)+F(n-2)n is an integer>=2

结合图1,主机(外机)侧的寻址步骤的算法如下Combined with Figure 1, the algorithm of the addressing steps on the host (external machine) side is as follows

1.初始化,让系统内控制器运行到寻址状态。1. Initialize, let the controller in the system run to the addressing state.

2.设变量n=47,Min=0,Max=F(n)=F(48);2. Set variable n=47, Min=0, Max=F(n)=F(48);

3.搜索二叉树[Min,Max,n]3. Search the binary tree [Min, Max, n]

步骤3.1 //搜索(n-2)部分Step 3.1 // search for (n-2) part

   {{

           Max=Min+F(n-2)-1;    Max=Min+F(n-2)-1;

           外机向内机发送Min和Max。  The external unit sends Min and Max to the internal unit.

           If(外机根据在规定的时间内收到有效数据)If (the external unit receives valid data within the specified time)

           在Min和Max之间存在唯一内机,有效数据就是此内机的物理地址,外机分配网络地址给这个内机,步骤3.1结束;There is a unique internal machine between Min and Max, and the valid data is the physical address of this internal machine. The external machine assigns a network address to this internal machine, and step 3.1 ends;

            If(没收到任何数据)If (no data received)

            外机判断出,在Min和Max之间,不存在任何内机,所以不分配地址,步骤3.1结束;The external unit judges that there is no internal unit between Min and Max, so no address is allocated, and step 3.1 ends;

             If(收到无效有冲突的数据)If (invalid and conflicting data received)

             {{

                  外机判断出,在Min和Max之间,存在多于一个内机的情况(大多数情况)或唯一内机的回复受干扰(偶尔)。The external unit judges that between Min and Max, there is more than one indoor unit (most of the cases) or the reply of the only indoor unit is disturbed (occasionally).

                  进行搜索如下:Conduct a search as follows:

         //左部分搜索 Max=Min+F(n-2)-1;//Left part search Max=Min+F(n-2)-1;

                   m=n-2;m=n-2;

                   If(m>=3)If(m>=3)

                   Go to步骤3–搜索二叉树[Min,Max,m];Go to Step 3 – Search Binary Tree [Min, Max, m];

                    If(m==2)//退出递归处If(m==2)//exit recursion

                    发送[Min,Max];send[Min, Max];

                    有一个回复则分配1个地址;              If there is a reply, 1 address will be assigned;

                    有冲突则分配分配2个地址;If there is a conflict, assign 2 addresses;

                      退出此循环;exit this loop;

                     If (m==1) //退出递归处If (m==1) //Exit recursion

                        有回复则分配1个地址;                        If there is a reply, 1 address will be assigned;

                       退出此循环;exit this loop;

                  }            }

             }}

步骤3.2//搜索(n-1)部分Step 3.2 // search for (n-1) part

      {{

           Min=Max-F(n-1)+1;Min=Max-F(n-1)+1;

           外机向内机发送Min和Max。  The external unit sends Min and Max to the internal unit.

           If(外机根据在规定的时间内收到有效数据)If (the external unit receives valid data within the specified time)

            在Min和Max之间存在唯一内机,有效数据就是此内机的物理地址,外机分配网络地址给这个内机,步骤3.2结束;There is a unique internal machine between Min and Max, and the valid data is the physical address of this internal machine. The external machine assigns a network address to this internal machine, and step 3.2 ends;

           If(没收到任何数据)If (no data received)

            外机判断出,在Min和Max之间,不存在任何内机,所以不分配地址,步骤3.2结束;The external unit judges that there is no internal unit between Min and Max, so no address is allocated, and step 3.2 ends;

           If(收到无效有冲突的数据)If (invalid and conflicting data received)

               {{

                  外机判断出,在Min和Max之间,存在多于一个内机的情况(大多数情况)或唯一内机的回复受干扰(偶尔)。The external unit judges that between Min and Max, there is more than one indoor unit (most of the cases) or the reply of the only indoor unit is disturbed (occasionally).

                  进行搜索如下:Conduct a search as follows:

                   //右部分搜索 Min=Max-F(n-1)+1;          //Right Part Search Min=Max-F(n-1)+1;

                   p=n-1;                                  p=n-1;

                  If(p>=3)If(p>=3)

                   Go to步骤3-建立二叉树[Min,Max,p];Go to step 3 - build a binary tree [Min, Max, p];

                  If(p==2)//退出递归处If(p==2)//exit recursion

                   发送[Min,Max];send[Min, Max];

                    有一个回复则分配1个地址;              If there is a reply, 1 address will be assigned;

                    有冲突则分配分配2个地址;If there is a conflict, assign 2 addresses;

                退出此循环;exit this loop;

              If (p==1) //退出递归处If (p==1) //Exit recursion

                 有回复则分配1个地址;If there is a reply, an address will be assigned;

                  退出此循环;exit this loop;

                  }            }

       }}

4.结束4. end

对应于主机侧的寻址动作,从机(内机)侧的应答方式为:Corresponding to the addressing action of the master side, the response mode of the slave (internal unit) side is:

1.初始化,系统控制器运行正常状态。1. Initialization, the system controller is running in a normal state.

2.收到外机寻址命令后,进入寻址状态。2. After receiving the external machine addressing command, enter the addressing state.

3.收到两个数Min,Max后,比较自身的序列号是否处于Min和Max之间,是的话即刻发送自身的序列号给外机,否则保持沉默,没有反应。3. After receiving the two numbers Min and Max, compare whether its own serial number is between Min and Max, if yes, immediately send its own serial number to the external unit, otherwise keep silent and do not respond.

4.如果收到外机赋地址命令,则修改自身的网络地址为外机赋的地址,并退出寻址状态。4. If it receives the address assignment command from the external machine, it will modify its own network address to the address assigned by the external machine, and exit the addressing state.

通过前述自动寻址方法可以在RS485网络上实现,对于多联机系统,可以建立两层RS485网络,其包括内外机网络和外机网络,内外机网络包括外机以及与外机对应的多台内机,外机网络包括多台外机。外机网络在包括集中控制器的实施例中,外机控制器指外机对应的集中控制器。对于内外机网络,可以将外机设置成主机,内机设置成从机。对于外机网络,可以将其中的一台外机控制器或者集中控制器设置为主机,其余为从机。不过,在后述内容中将理解到系统进入程序更新(IAP)模式后,网络中的主、从机关系可能会改变。The aforementioned automatic addressing method can be implemented on the RS485 network. For a multi-connected system, a two-layer RS485 network can be established, which includes the internal and external machine network and the external machine network. The internal and external machine network includes the external machine and multiple internal machines corresponding to the external machine. machine, the external machine network includes multiple external machines. In the embodiment that the external machine network includes a centralized controller, the external machine controller refers to the centralized controller corresponding to the external machine. For the internal and external machine network, the external machine can be set as the master, and the internal machine can be set as the slave. For the external machine network, one of the external machine controllers or centralized controllers can be set as the master, and the rest are slaves. However, it will be understood in the following content that after the system enters the program update (IAP) mode, the master-slave relationship in the network may change.

当需要对控制器软件更新时,根据本发明的实施例的更新方法如下所述。When it is necessary to update the controller software, the update method according to the embodiment of the present invention is as follows.

1.利用计算机软件定义对应的通讯协议,并指定串口类型,例如总线口或线控器口。1. Use computer software to define the corresponding communication protocol, and specify the type of serial port, such as bus port or wire controller port.

2.在RS485网络上进行广播,指示系统中所有控制器进入程序更新(IAP)模式。计算机接入RS485网络的位置不同,广播路径会有所不同,不过计算机可在网络的任一位置接入。2. Broadcast on the RS485 network to instruct all controllers in the system to enter the program update (IAP) mode. Depending on where the computer is connected to the RS485 network, the broadcast path will be different, but the computer can be connected anywhere on the network.

在本发明的一实施例中,当计算机接在内机接线控器的接口上,由这个内机向内外机网络广播进入IAP模式;相同网络上的外机向其他外机、集中控制器广播IAP指令。In one embodiment of the present invention, when the computer is connected to the interface of the wiring controller of the internal machine, the internal machine broadcasts to the internal and external machine network to enter the IAP mode; the external machine on the same network broadcasts to other external machines and the centralized controller IAP instruction.

在本发明的一实施例中,当计算机接在内外机总线上,可以将计算机地址自动设置以使计算机获得总线讲话权时,向内外机网络广播IAP,相同总线上的外机广播IAP。In one embodiment of the present invention, when the computer is connected to the bus of the internal and external machines, the address of the computer can be automatically set so that the computer obtains the right to speak on the bus, and broadcasts the IAP to the network of the internal and external machines, and the external machines on the same bus broadcast the IAP.

在本发明的一实施例中,当计算机接在外机接口上,由这个外机向内机网络广播进入入程序更新(IAP)模式,并同时向外机、集中控制器网络广播IAP。In one embodiment of the present invention, when the computer is connected to the interface of the external machine, the external machine broadcasts to the internal machine network to enter the program update (IAP) mode, and simultaneously broadcasts the IAP to the external machine and the centralized controller network.

在本发明的一实施例中,当计算机接在集中控制器上,由集中控制器向外机网络广播进入IAP,每个外机并同时向其对应的内机网络广播IAP。In one embodiment of the present invention, when the computer is connected to the centralized controller, the centralized controller broadcasts the incoming IAP to the external machine network, and each external machine simultaneously broadcasts the IAP to its corresponding internal machine network.

在本发明的一实施例中,当计算机接在集中控制器和外机总线上,由计算机向外机,集中控制器网络广播进入IAP,每个外机并同时向其对应的内机网络广播IAP。In one embodiment of the present invention, when the computer is connected to the centralized controller and the bus of the external machine, the computer broadcasts to the external machine, the centralized controller network broadcasts into the IAP, and each external machine broadcasts to its corresponding internal machine network at the same time. IAP.

由前述内容可知,IAP模式可能会导致网络中主机和从机的改变:As can be seen from the foregoing, the IAP mode may cause changes in the host and slave in the network:

·计算机连接的内机成为内外机网络中的主机,外机变成从机;The internal unit connected to the computer becomes the master in the network of the internal and external units, and the external unit becomes the slave;

·计算机连接在内外机总线上,则计算机成为主机,内外机变成从机;When the computer is connected to the bus of the internal and external units, the computer becomes the master, and the internal and external units become slaves;

·计算机连接到外机上,外机还是主机;·When the computer is connected to the external machine, the external machine is still the host computer;

·其余内外机网络主机和从机不变;The rest of the internal and external machine network hosts and slaves remain unchanged;

·外机和集中控制器网络中的主机由计算机连接到的内外机网络对应的外机担任,如果计算机没有连接到集中控制器。·The host in the external machine and centralized controller network is assumed by the external machine corresponding to the internal and external machine network to which the computer is connected, if the computer is not connected to the centralized controller.

3.收到IAP的所有控制器(内机,外机,集中控制器)进入程序更新(IAP)模式。3. All controllers (indoor unit, outdoor unit, centralized controller) that receive the IAP enter the program update (IAP) mode.

4.计算机搜索并显示网络上的所有设备及对应的地址(地址为16位,对应2层网络,前8位是内外机网络的外机所在的外机、集中控制器网络的8位地址,后8位是在相应的内外机网络中的地址)和信息。4. The computer searches and displays all the devices on the network and the corresponding addresses (the address is 16 bits, corresponding to the 2-layer network, the first 8 bits are the 8-bit address of the external machine where the external machine of the internal and external machine network is located, and the centralized controller network, The last 8 bits are the address) and information in the corresponding internal and external machine network.

当计算机接在内机接线控器的接口上,由这个内机搜索此内外机网络上存在的16位网络地址。然后在这个内外机网络上的外机在网络上搜索并收集16位其他外机及其连接的内机地址,如果集中控制器存在,也收集其16位网络地址。When the computer is connected to the interface of the wiring controller of the internal machine, the internal machine searches for the 16-bit network address existing on the network of the internal and external machine. Then the external machine on this internal and external machine network searches on the network and collects 16 other external machines and their connected internal machine addresses. If the centralized controller exists, its 16 network addresses are also collected.

当计算机接在内机接线控器的接口上,由计算机搜索此内外机网络上存在的16位网络地址。然后在这个内外机网络上的外机在网络上搜索并收集16位其他外机及其连接的内机地址,如果集中控制器存在,也收集其16位网络地址。When the computer is connected to the interface of the wiring controller of the internal machine, the computer searches for the 16-bit network address existing on the network of the internal and external machine. Then the external machine on this internal and external machine network searches on the network and collects 16 other external machines and their connected internal machine addresses. If the centralized controller exists, its 16 network addresses are also collected.

当计算机接在外机接口上,由这个外机搜索此内外机网络上存在的16位网络地址。同时此外机在网络上搜索并收集16位其他外机及其连接的内机地址,如果集中控制器存在,也收集其16位网络地址。When the computer is connected to the interface of the external machine, the external machine searches for the 16-bit network address existing on the network of the external machine. At the same time, the external machine searches and collects 16-bit addresses of other external machines and the connected internal machines on the network. If the centralized controller exists, its 16-bit network address is also collected.

当计算机接在集中控制器上,由集中控制器向外机网络搜索所有外机及其连接的内机的16位网络地址。When the computer is connected to the centralized controller, the centralized controller searches for the 16-bit network addresses of all external machines and the internal machines connected to them from the network of the external machines.

当计算机接在外机总线上,由计算机搜索所有外机及其连接的内地的16位地址,如果集中控制器存在,也收集其16位网络地址。When the computer is connected to the bus of the external machine, the computer searches for the 16-bit addresses of all the external machines and the mainland they are connected to. If the centralized controller exists, its 16-bit network address is also collected.

5.由服务人员指定需要升级的机器地址列表和选择相应的更新文件,由计算机发送给目标控制器。5. The service personnel specify the address list of machines that need to be upgraded and select the corresponding update file, which is sent to the target controller by the computer.

在更新程序的步骤中,在计算机端执行以下步骤:In the step of updating the program, perform the following steps on the computer side:

如果计算机接在内机接线控器的接口上,如果更新此内机,则传输程序给此内机;如果更新其他控制器,则传输程序和目标地址列表给此内机;If the computer is connected to the interface of the wiring controller of the internal machine, if the internal machine is updated, the program will be transmitted to the internal machine; if other controllers are updated, the program and target address list will be transmitted to the internal machine;

如果计算机在内外机总线上则传输程序和目标地址列表到内外机总线上;If the computer is on the internal and external machine bus, then transfer the program and target address list to the internal and external machine bus;

当计算机接在外机接口上,如果更新此外机,则传输程序给此外机,如果更新其他控制器,则传输程序和目标地址列表给此外机;When the computer is connected to the interface of the external machine, if the external machine is updated, the program will be transmitted to the external machine; if other controllers are updated, the program and target address list will be transmitted to the external machine;

当计算机接在外机网络上,传输程序和目标地址列表到内外机总线上;When the computer is connected to the external machine network, transfer the program and target address list to the external machine bus;

当计算机接在集中控制器上,如果更新此集中控制器,则传输程序给此集中控制器;如果更新其他控制器,则传输程序和目标地址列表给此集中控制器。When the computer is connected to the centralized controller, if the centralized controller is updated, the program is transmitted to the centralized controller; if other controllers are updated, the program and the target address list are transmitted to the centralized controller.

在更新程序的步骤中,在内机侧执行以下步骤:In the step of updating the program, perform the following steps on the internal side:

如果内机自身在更新程序的目标地址中,则自身的程序被更新;If the built-in machine itself is in the target address of the update program, its own program is updated;

如果自身不在更新程序的目标地址中,且自身与计算机不是直接相连,则自身的程序不更新;If it is not in the target address of the update program, and it is not directly connected to the computer, its own program will not be updated;

如果自身不在更新程序的目标地址中,且自身与计算机直接相连则自身的程序不更新,但转发程序和更新程序的目标地址到内外机网络中。If it is not in the target address of the update program, and it is directly connected to the computer, its own program will not be updated, but the forwarding program and the target address of the update program will be sent to the internal and external machine network.

在更新程序的步骤中,在外机侧执行以下步骤:In the step of updating the program, perform the following steps on the external unit side:

如果自身在更新程序的目标地址中则自身的程序被更新;如果此外机做为外机网络的主机,且目标地址还有其他外机,则转发程序和更新程序的目标地址到外机网络中;If it is in the target address of the update program, its own program will be updated; if this machine is the host of the external machine network, and there are other external machines at the target address, then forward the program and the target address of the update program to the external machine network ;

如果自身不在更新程序的目标地址中,程序和目标地址来自内外机网络且目标地址仅在自身的内外机网络中,则自身的程序不更新;If it is not in the target address of the update program, the program and the target address come from the internal and external machine network and the target address is only in its own internal and external machine network, then its own program will not be updated;

如果自身不在更新程序的目标地址中,程序和目标地址来自内外机网络(自身是外机网络的主机)且目标地址不在包含自身的内外机网络中的控制器则自身的程序不更新,但转发程序和目标地址到外机网络;If the controller itself is not in the target address of the update program, the program and the target address come from the internal and external machine network (it is the host of the external machine network) and the target address is not in the controller that contains itself in the internal and external machine network, its own program will not be updated, but forwarded program and target address to the external machine network;

如果自身不在更新程序的目标地址中,程序和目标地址来自计算机(自身是外机网络的主机)且目标地址仅在包含自身的内外机网络中的控制器则自身的程序不更新,但转发程序和目标地址到内外机网络;If it is not in the target address of the update program, the program and the target address come from a computer (it is the host of the external machine network) and the target address is only in the controller that contains itself in the internal and external machine network, then its own program will not be updated, but the program will be forwarded and the target address to the internal and external machine network;

如果自身不在更新程序的目标地址中,如果程序和目标地址由外机网络的主机发来,目标地址有包含自身的内外机网络中的控制器,则自身的程序不更新;转发程序和目标地址给本外机连接的内外机网络;If it is not in the target address of the update program, if the program and target address are sent by the host of the external machine network, and the target address has a controller in the internal and external machine network including itself, then its own program will not be updated; forward the program and target address The internal and external machine network connected to this external machine;

如果自身不在更新程序的目标地址中,如果程序和目标地址由外机网络的Master发来,目标地址没有包含自身的内外机网络中的控制器,则自身的程序不更新,转发程序和目标地址给本外机连接的外机网络。If it is not in the target address of the update program, if the program and target address are sent by the Master of the external machine network, and the target address does not include the controller in the internal and external machine network of itself, then its own program will not be updated, and the program and target address will be forwarded The external machine network connected to this external machine.

在更新程序的步骤中,在集中控制器侧执行以下步骤:In the step of updating the program, perform the following steps on the centralized controller side:

如果自身在更新程序的目标地址中,则自身的程序被更新;If the self is in the target address of the update program, the program of the self is updated;

如果自身不在更新程序的目标地址中,且自身不是外机网络的主机,则无动作;If it is not in the target address of the update program, and it is not the host of the external network, no action will be taken;

如果自身不在更新程序的目标地址中,且自身是外机网络的主机,将程序和目标地址发给外机网络中所有的外机。If it is not in the target address of the update program, and it is the host of the external machine network, it will send the program and target address to all the external machines in the external machine network.

6.最后,所有设备升级完成后,计算机发命令,系统控制器退出IAP模式并恢复到正常运行。6. Finally, after all equipment upgrades are completed, the computer sends a command, and the system controller exits the IAP mode and returns to normal operation.

通过前述的说明,可以理解到,本发明的实施例具有如下优点:Through the foregoing description, it can be understood that the embodiments of the present invention have the following advantages:

在确保从机标识符唯一性和RS485总线的前提下,通过软件的方式实现从机地址的自动分配,可以保证网络上的地址唯一;On the premise of ensuring the uniqueness of the slave identifier and the RS485 bus, the automatic allocation of the slave address is realized by software, which can ensure the unique address on the network;

对类似VRF这样的多层网络系统,计算机可在多层网络的任意一点接入,就可更新系统中任何一个设备的程序。For a multi-layer network system like VRF, a computer can be accessed at any point in the multi-layer network, and the program of any device in the system can be updated.

本发明虽然以较佳实施例公开如上,但其并不是用来限定本发明,任何本领域技术人员在不脱离本发明的精神和范围内,都可以做出可能的变动和修改。因此,凡是未脱离本发明技术方案的内容,依据本发明的技术实质对以上实施例所作的任何修改、等同变化及修饰,均落入本发明权利要求所界定的保护范围之内。Although the present invention is disclosed above with preferred embodiments, it is not intended to limit the present invention, and any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent changes and modifications made to the above embodiments according to the technical essence of the present invention, all fall within the scope of protection defined by the claims of the present invention.

Claims (5)

1.多联机系统的控制器的网络地址分配方法,其中多个控制器通过RS485网络关联,其特征在于该方法包括:1. the network address distribution method of the controller of multi-line system, wherein a plurality of controllers are associated by RS485 network, it is characterized in that the method comprises: 控制器标示符设定,利用控制器自身设置的能唯一标示其身份的二进制代码设定为从机标示符;Controller identifier setting, use the binary code set by the controller itself that can uniquely mark its identity to set as the slave identifier; 标示符注册及控制器网络地址分配,利用RS485网络上的主机控制器扫描RS485网络上所有的从机标示符,并且对扫描到的从机标示符对应的从机分配网络地址。Identifier registration and controller network address allocation, use the host controller on the RS485 network to scan all the slave identifiers on the RS485 network, and assign network addresses to the slaves corresponding to the scanned slave identifiers. 2.如权利要求1所述的方法,其特征在于,所述扫描方法为菲波那契分配方法。2. The method according to claim 1, wherein the scanning method is a Fibonacci distribution method. 3.如权利要求1所述的方法,其特征在于,所述代码为内机控制器的芯片序列号。3. The method according to claim 1, wherein the code is a chip serial number of the internal machine controller. 4.如权利要求1所述的方法,其特征在于,所述代码为由控制器随机生成。4. The method according to claim 1, wherein the code is randomly generated by the controller. 5.多联机系统的控制器的软件升级方法,其特征在于,包括:5. The software upgrade method of the controller of multi-line system, it is characterized in that, comprises: 利用权利要求1至4中任一项所述的方法在外机以及外机对应的内机之间、外机与外机之间建立两层RS485网络,以使计算机能在该网络的任一位置接入;Use the method described in any one of claims 1 to 4 to set up two layers of RS485 networks between the external machine and the internal machine corresponding to the external machine, and between the external machine and the external machine, so that the computer can be in any position of the network access; 利用计算机定义对应的通讯协议,并指定串口类型;Use the computer to define the corresponding communication protocol and specify the serial port type; 在所述RS485网络上进行广播,指令系统的所有控制器进入程序更新模式;broadcast on the RS485 network, and all controllers of the command system enter the program update mode; 收到程序更新模式指令的所有控制器进入程序更新模式;All controllers that receive the program update mode command enter the program update mode; 利用计算机搜索并显示所述RS485网络上的所有控制器及对应的地址和信息;Utilize computer to search and display all controllers and corresponding addresses and information on the RS485 network; 指定需要升级的控制器地址列表和选择相应的软件文件,由计算机发送给目标控制器;Specify the controller address list to be upgraded and select the corresponding software file, and send it to the target controller by the computer; 所有控制器升级完成后,由计算机发命令,使系统内控制器退出程序更新模式并恢复到正常运行。After all the controllers are upgraded, the computer will issue a command to make the controllers in the system exit the program update mode and return to normal operation.
CN201510477600.1A 2015-08-06 2015-08-06 Software upgrade method and network address assignment method for controller of multi-connected system Pending CN104967700A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510477600.1A CN104967700A (en) 2015-08-06 2015-08-06 Software upgrade method and network address assignment method for controller of multi-connected system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510477600.1A CN104967700A (en) 2015-08-06 2015-08-06 Software upgrade method and network address assignment method for controller of multi-connected system

Publications (1)

Publication Number Publication Date
CN104967700A true CN104967700A (en) 2015-10-07

Family

ID=54221636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510477600.1A Pending CN104967700A (en) 2015-08-06 2015-08-06 Software upgrade method and network address assignment method for controller of multi-connected system

Country Status (1)

Country Link
CN (1) CN104967700A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106052045A (en) * 2016-07-15 2016-10-26 珠海格力电器股份有限公司 Air conditioner multi-split method based on power line carrier communication network
CN106681777A (en) * 2017-01-18 2017-05-17 青岛海尔空调电子有限公司 Quick program updating method for multi-split unit
CN108304202A (en) * 2017-12-20 2018-07-20 珠海派诺科技股份有限公司 A kind of more instrument firmware upgrade methods and device based on bus
CN109309737A (en) * 2017-07-28 2019-02-05 依必安派特穆尔芬根有限两合公司 Wireless assignment of network addresses
CN110321145A (en) * 2019-07-01 2019-10-11 珠海格力电器股份有限公司 System, method and device for upgrading multi-connected cluster system unit
CN110933663A (en) * 2019-12-17 2020-03-27 珠海格力电器股份有限公司 Multi-connected air conditioning unit and remote upgrading method thereof
CN112188411A (en) * 2020-09-25 2021-01-05 珠海格力电器股份有限公司 Multi-split system based on wireless Mesh network and data transmission method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101446438A (en) * 2008-08-29 2009-06-03 广东志高空调有限公司 Method for assigning address to indoor unit of central air-conditioning system, device and system thereof
CN101852472A (en) * 2009-04-01 2010-10-06 欧威尔空调(中国)有限公司 Automatic addressing method for air conditioning system and air conditioning controller
US20140344800A1 (en) * 2013-05-20 2014-11-20 Trane International Inc. Device and method for device identification and file transfer to bacnet devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101446438A (en) * 2008-08-29 2009-06-03 广东志高空调有限公司 Method for assigning address to indoor unit of central air-conditioning system, device and system thereof
CN101852472A (en) * 2009-04-01 2010-10-06 欧威尔空调(中国)有限公司 Automatic addressing method for air conditioning system and air conditioning controller
US20140344800A1 (en) * 2013-05-20 2014-11-20 Trane International Inc. Device and method for device identification and file transfer to bacnet devices

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
周德苏等: "对Fibnoacic静态查找算法的改进", 《空军雷达学院学报》 *
徐凤生: "《数据结构与算法 C语言版》", 31 December 2014 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106052045A (en) * 2016-07-15 2016-10-26 珠海格力电器股份有限公司 Air conditioner multi-split method based on power line carrier communication network
CN106052045B (en) * 2016-07-15 2021-11-09 珠海格力电器股份有限公司 Air conditioner multi-split method based on power line carrier communication network
CN106681777A (en) * 2017-01-18 2017-05-17 青岛海尔空调电子有限公司 Quick program updating method for multi-split unit
CN109309737A (en) * 2017-07-28 2019-02-05 依必安派特穆尔芬根有限两合公司 Wireless assignment of network addresses
CN108304202A (en) * 2017-12-20 2018-07-20 珠海派诺科技股份有限公司 A kind of more instrument firmware upgrade methods and device based on bus
CN108304202B (en) * 2017-12-20 2022-04-08 珠海派诺科技股份有限公司 Multi-meter firmware upgrading method and device based on bus
CN110321145A (en) * 2019-07-01 2019-10-11 珠海格力电器股份有限公司 System, method and device for upgrading multi-connected cluster system unit
CN110321145B (en) * 2019-07-01 2020-08-14 珠海格力电器股份有限公司 System, method and device for upgrading multi-connected cluster system unit
CN110933663A (en) * 2019-12-17 2020-03-27 珠海格力电器股份有限公司 Multi-connected air conditioning unit and remote upgrading method thereof
CN112188411A (en) * 2020-09-25 2021-01-05 珠海格力电器股份有限公司 Multi-split system based on wireless Mesh network and data transmission method

Similar Documents

Publication Publication Date Title
CN104967700A (en) Software upgrade method and network address assignment method for controller of multi-connected system
CN111147619B (en) Method and system for realizing automatic address allocation of RS485 slave equipment locally
US11428430B2 (en) Air conditioning system having multiple outdoor units and multiple indoor units, method and device for operating air conditioning system
US7949754B2 (en) Method and apparatus for prescribing station identifiers in a profit IO network
US7848327B2 (en) Methods and apparatus for creating addresses
KR101951485B1 (en) Method for assigning network addresses for fans
US20050002408A1 (en) Home appliance network system and method for operating the same
CN107249048B (en) Air conditioning system and address allocation method and device thereof
CN110762604B (en) Indoor unit, pairing method and device of indoor unit and wired controller, storage medium and air conditioner
CN105846858A (en) Multi-connected air conditioning unit and networking method and device thereof
KR101937203B1 (en) Facilities control system and operating method of the same
CN105827745A (en) Addressing communication method based on media access control address and addressing communication device thereof
US11320166B2 (en) Air conditioning system and communication method
CN102685274A (en) Group address distribution method of intelligent equipment in intelligent household network
CN106322637A (en) Method for controlling air conditioner indoor units through wired controller
KR100916665B1 (en) Air conditioner and control method
CN114936180A (en) Automatic generation method and device for serial bus equipment address and storage medium
CN105763663A (en) Private network address management method, control device and network device
CN107770300B (en) Address allocation method and device
CN102694882A (en) Group address distribution method for intelligent equipment in intelligent household network
CN113949628B (en) Automatic equipment adding method and system
KR20050103828A (en) Method for setting automatic address for communication of multi air-conditioner
CN104104594A (en) Methods of transmitting and receiving protocol message of VSU, devices and system
CN114095351B (en) Method, device and system for configuring equipment functions
MXPA01008828A (en) Network addressing based on the port of a network switch.

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20151007