CN105979024B - A kind of water pump controller test system address distribution method - Google Patents
A kind of water pump controller test system address distribution method Download PDFInfo
- Publication number
- CN105979024B CN105979024B CN201610392275.3A CN201610392275A CN105979024B CN 105979024 B CN105979024 B CN 105979024B CN 201610392275 A CN201610392275 A CN 201610392275A CN 105979024 B CN105979024 B CN 105979024B
- Authority
- CN
- China
- Prior art keywords
- water pump
- pump controller
- tested
- controller
- test
- 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.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 184
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 title claims abstract description 178
- 238000000034 method Methods 0.000 title claims abstract description 61
- 238000012790 confirmation Methods 0.000 claims abstract description 18
- 230000009471 action Effects 0.000 claims abstract description 6
- 230000006870 function Effects 0.000 description 12
- 230000008569 process Effects 0.000 description 11
- 230000003068 static effect Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 3
- 238000011056 performance test Methods 0.000 description 3
- 230000002950 deficient Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 208000033748 Device issues Diseases 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5046—Resolving address allocation conflicts; Testing of addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Control Of Positive-Displacement Pumps (AREA)
Abstract
Description
技术领域technical field
本发明涉一种水泵控制器测试系统及地址分配方法,用于设定测试系统中水泵控制器的地址分配,该方法可扩展至各类设备测试系统的地址分配。The invention relates to a water pump controller test system and an address distribution method, which are used for setting the address distribution of the water pump controller in the test system, and the method can be extended to the address distribution of various equipment test systems.
背景技术Background technique
水泵控制器测试系统是对水泵控制器各种功能和性能参数进行综合测试的平台,其稳定性和性能直接关系到水泵控制器产品缺陷的检测,是水泵控制器出厂前的最后一道质量关,其重要性不言而喻。The water pump controller test system is a platform for comprehensive testing of various functions and performance parameters of the water pump controller. Its stability and performance are directly related to the detection of product defects of the water pump controller. It is the last quality check before the water pump controller leaves the factory. Its importance is self-evident.
水泵控制器测试系统主要包括上位机(PC机),测试柜控制器、相关性能测试设备和被测水泵控制器等组成。一方面,上位机通过通信总线将测试流程(比如,过压功能测试、欠压功能测试、过载功能测试、干转功能测试、缺相功能测试、缺水功能测试、溢水功能测试等)所对应的设定参数(比如,输入电压参数、工作电流参数、流量参数、水位参数等)下发给测试柜控制器,测试柜控制器将接收到的设定参数解析之后,控制和调节相关性能测试设备参数,实现水泵控制器执行对应的测试流程及接入对应的设定参数;另一方面,测试柜控制器将测试柜中所有水泵控制器测试结果参数和工作状态通过通信总线上报给上位机。上位机将接收到的具有唯一IP地址的水泵控制器的参数与设定参数和功能进行数据分析,并得出每台水泵控制器对应的测试报告,从而便于技术人员进行数据分析和技术改进,确定故障水泵控制器的IP号和声光电报警该IP号位置,实现了测试系统的自动化和智能化,提高了测试效率和测试可靠性。上述测试功能的实现,涉及到水泵控制器测试系统IP地址的分配方法。The water pump controller test system mainly includes the upper computer (PC), test cabinet controller, related performance test equipment and the water pump controller to be tested. On the one hand, the host computer communicates the test process (for example, overvoltage function test, undervoltage function test, overload function test, dry running function test, phase loss function test, water shortage function test, water overflow function test, etc.) The setting parameters (such as input voltage parameters, operating current parameters, flow parameters, water level parameters, etc.) are sent to the test cabinet controller, and the test cabinet controller analyzes the received setting parameters to control and adjust related performance tests. The equipment parameters enable the water pump controller to execute the corresponding test process and access the corresponding setting parameters; on the other hand, the test cabinet controller reports the test result parameters and working status of all the water pump controllers in the test cabinet to the host computer through the communication bus . The upper computer will analyze the received parameters and set parameters and functions of the water pump controller with a unique IP address, and obtain the test report corresponding to each water pump controller, so that it is convenient for technicians to carry out data analysis and technical improvement. Determine the IP number of the faulty water pump controller and the location of the IP number for the sound and light alarm, realize the automation and intelligence of the test system, and improve the test efficiency and test reliability. The realization of the above test function involves the allocation method of the IP address of the water pump controller test system.
现有技术中对测试系统地址分配方法,主要有静态地址分配方法和动态地址分配方法。静态地址分配方法,主要是有以下几种方式:①拨码设定方式;即通过用拨码的方式设定控制器的IP号;②无线遥控器设定:即通过一个专用的无线遥控装置设定设备的IP号;③程序烧录方式:即在源代码中设定系统IP号,并固化到芯片中;上述几种主要静态地址设定其主要共同点为据需要人为设定,并且一旦设定,只要不是重新设置,该IP就保持不变。动态地址分配方法主要依据芯片中唯一SN序列号设置,其主要是通过获取在线设备主控制器芯片的序列号,进行排序或者其他IP地址产生算法得到唯一的IP号。一旦有其他设备插入测试系统,则该设备会发出请求分配地址要求。测试柜测试柜控制器受到该要求之后,按照前面的IP生成方法重新分配设备的IP。上述两种地址分配方法在控制器测试系统中存在以下问题:如何保证放在测试柜上特定编号处的控制器的IP号与编号保持一致。这主要是基于如果IP号与测试柜上的编号不一致,则上位机基于IP号测试得到的数据如何快速定位到该控制器。因为测试结果信息是上位机依据控制器的IP地址进行识别的,只有将控制器位置编号信息与IP地址信息保持一致,则操作人员就可以依据IP值快速准确定位编号,避免故障缺陷产品流出。为实现上述目标,现有上述静态地址分配方法和动态地址分配方法均存在局限性。就静态地址分配方法而言,其需要找出与放置位置编号相同的控制器,并放置在该位置。这样一方面增加了工作强度;另一方面,其可靠性太低,一旦控制器IP与放置位置编号不一致,则有可能出现将没有问题的产品误认为有故障,而有缺陷的产品反而流入市场。就上述动态地址分配方法而言,要保证IP与放置位置编号一致,则几乎很难实现。In the prior art, there are mainly static address allocation methods and dynamic address allocation methods for test system address allocation methods. Static address allocation methods mainly include the following methods: ①Dial code setting method; that is, set the IP number of the controller by dialing code; ②Wireless remote control setting: that is, through a dedicated wireless remote control device Set the IP number of the device; ③Program burning method: set the system IP number in the source code and solidify it into the chip; Once set, the IP remains unchanged as long as it is not reset. The dynamic address allocation method is mainly based on the unique SN serial number setting in the chip, which mainly obtains the unique IP number by obtaining the serial number of the main controller chip of the online device, sorting or other IP address generation algorithms. As soon as another device is plugged into the test system, that device issues a request to assign an address request. After receiving the request, the test cabinet test cabinet controller redistributes the IP of the device according to the previous IP generation method. The above two address assignment methods have the following problems in the controller test system: how to ensure that the IP number of the controller placed at a specific number on the test cabinet is consistent with the number. This is mainly based on how the host computer can quickly locate the controller based on the data obtained by the IP number test if the IP number is inconsistent with the number on the test cabinet. Because the test result information is identified by the host computer based on the IP address of the controller, as long as the location number information of the controller is consistent with the IP address information, the operator can quickly and accurately locate the number according to the IP value to avoid the outflow of faulty and defective products. In order to achieve the above goals, the existing static address allocation method and the dynamic address allocation method both have limitations. As far as the static address allocation method is concerned, it needs to find out the controller with the same number as the placement location and place it at the location. On the one hand, this increases the work intensity; on the other hand, its reliability is too low. Once the controller IP is inconsistent with the location number, it is possible to mistake the product with no problem as a fault, and the defective product will flow into the market instead. . As far as the above-mentioned dynamic address allocation method is concerned, it is almost difficult to realize that the IP is consistent with the location number.
发明内容Contents of the invention
本发明的目的在于克服上述不足之处,提供一种水泵控制器测试系统地址分配方法。The object of the present invention is to overcome the above disadvantages and provide a method for allocating addresses of a water pump controller testing system.
本发明的技术方案是:一种水泵控制器测试系统地址分配方法,其包括以下步骤:The technical solution of the present invention is: a water pump controller test system address assignment method, which includes the following steps:
(a)将所有待测水泵控制器放入测试柜之后;(a) After putting all the water pump controllers to be tested into the test cabinet;
(b)上位机发出获取设备地址的第一步指令;(b) The host computer issues the first step command to obtain the device address;
(c)测试柜的测试柜控制器m(10≥m≥1)接收到上位机的获取设备地址命令后,依次对各测试柜所属的待测水泵控制器对应的电源开关k(50≥k≥1)进行闭合动作;(c) After the test cabinet controller m (10≥m≥1) of the test cabinet receives the device address acquisition command from the host computer, it sequentially controls the power switch k (50≥k ≥1) Perform closing action;
(d)电源开关k闭合之后,待测水泵控制器i(50≥i≥1)通电;(d) After the power switch k is closed, the water pump controller i (50≥i≥1) to be tested is powered on;
(e)待测水泵控制器i发出请求地址分配指令;(e) the water pump controller i to be tested sends a request address allocation instruction;
(f)测试柜控制器m接收到所属待测水泵控制器i的地址指令之后,将IP=m+i发送给待测水泵控制器i;(f) After the test cabinet controller m receives the address command of the water pump controller i to be tested, IP=m+i is sent to the water pump controller i to be tested;
(g)待测水泵控制器i收到测试柜控制器m下发的IP之后,将其与自身设定的IP进行比较,一致则回复确认信息;(g) After the water pump controller i to be tested receives the IP issued by the test cabinet controller m, it compares it with the IP set by itself, and if it is consistent, it will reply a confirmation message;
(h)测试柜控制器m收到待测水泵控制器i的确认信息之后,则设定当前的待测水泵控制器i的IP为IP=m+i,测试柜控制器m没收到待测水泵控制器i的确认信息之后,则设定当前的待测水泵控制器i的IP为null;(h) After the test cabinet controller m receives the confirmation information of the water pump controller i to be tested, the IP of the current water pump controller i to be tested is set as IP=m+i, and the test cabinet controller m does not receive the confirmation information of the water pump controller i to be tested. After the confirmation information of the water pump controller i, set the IP of the current water pump controller i to be tested as null;
(i)继续闭合电源开关k+1,待测水泵控制器i+1通电,待测水泵控制器i+1发出请求地址分配指令,测试柜控制器m接收到所属待测水泵控制器i+1的地址指令之后,将IP=m+(i+1)发送给待测水泵控制器i和待测水泵控制器i+1,待测水泵控制器i判断自身设定的IP与收到的不一致,则不设定也不回复确认信息,待测水泵控制器i+1设定IP=m+(i+1),重复步骤(c)-(i),直至所有的待测水泵控制器的IP设定;(i) Continue to close the power switch k+1, the water pump controller to be tested i+1 is powered on, the water pump controller to be tested i+1 sends a request address allocation instruction, and the test cabinet controller m receives the water pump controller to be tested i+1 After the address command of 1, send IP=m+(i+1) to the water pump controller to be tested i and the water pump controller to be tested i+1, and the water pump controller to be tested i judges that the IP set by itself is inconsistent with the received one , then do not set or reply to the confirmation message, set IP=m+(i+1) for the water pump controller to be tested i+1, repeat steps (c)-(i), until the IP of all the water pump controllers to be tested set up;
(j)测试柜控制器m将所属的待测水泵控制器的IP回传给上位机;(j) The test cabinet controller m returns the IP of the water pump controller to be tested to the upper computer;
(k)上位机获取回传IP后,建立待测水泵控制器的测试数据库,完成地址分配。(k) After the upper computer obtains the returned IP, it establishes the test database of the water pump controller to be tested, and completes the address assignment.
所述步骤(b)中,所述上位机将地址分配命令以广播命令方式发送给所有测试柜的测试柜控制器,并确定所有测试柜控制器回复已接收到地址分配命令。In the step (b), the host computer sends the address assignment command to the test cabinet controllers of all test cabinets in the form of a broadcast command, and confirms that all test cabinet controllers reply that they have received the address assignment command.
所述步骤(k)中,上位机接收测试柜控制器上传的待测水泵控制器的IP;确定所有测试柜控制器已上传了所属待测水泵控制器的IP;并以所收到的IP为检索,建立与待测水泵控制器对应的的测试数据库。In the described step (k), the host computer receives the IP of the water pump controller to be tested uploaded by the test cabinet controller; it is determined that all test cabinet controllers have uploaded the IP of the water pump controller to be tested; and the received IP For retrieval, a test database corresponding to the pump controller to be tested is established.
所述步骤(c)-(i)的详细步骤如下:The detailed steps of described steps (c)-(i) are as follows:
一、确定接收上位机的获取设备地址命令;1. Make sure to receive the device address command from the host computer;
二、接通设备号为i的待测水泵控制器对应的电源开关k,给待测水泵控制器i供电;2. Turn on the power switch k corresponding to the water pump controller under test whose device number is i, and supply power to the water pump controller under test i;
三、确定是否接收到待测水泵控制器i的地址分配请求,结果为是,则发送设备号为i的待测水泵控制器的IP;IP=柜号m+设备号i;结果是否,则设置设备号为i的待测水泵控制器的IP为null;3. Determine whether to receive the address allocation request of the water pump controller i to be tested, if the result is yes, then send the IP of the water pump controller to be tested with the device number i; IP=cabinet number m+device number i; if the result is not, then set The IP of the pump controller to be tested with device number i is null;
四、测试柜控制器接收到设定待测水泵控制器i的IP已设定信息,则设定当前待测水泵控制器i的IP=柜号m+设备号i;4. The test cabinet controller receives the information that the IP of the water pump controller i to be tested has been set, and then sets the current IP of the water pump controller i to be tested=cabinet number m+equipment number i;
五、测试柜控制器将所有IP不为null的待测水泵控制器的IP上传至上位机。5. The test cabinet controller uploads the IPs of all the water pump controllers to be tested whose IP is not null to the host computer.
待测水泵控制器的IP分配方法如下:The IP allocation method of the water pump controller to be tested is as follows:
一、确定当前待测水泵控制器的IP是null;1. Make sure that the IP of the water pump controller to be tested is null;
二、向当前待测水泵控制器所在的测试柜控制器发送请求地址分配命令;2. Send a request address allocation command to the test cabinet controller where the water pump controller to be tested is currently located;
三、确定测试柜控制器回复设备IP地址;3. Determine the IP address of the test cabinet controller to reply to the device;
四、将接收到的IP作为当前待测水泵控制器i的IP=柜号m+设备号i。4. Use the received IP as the current IP of the water pump controller i to be tested = cabinet number m + equipment number i.
本发明所述的水泵控制器测试系统地址分配方法与现有静态地址分配方案相比,具有以下优势:Compared with the existing static address allocation scheme, the water pump controller test system address allocation method of the present invention has the following advantages:
①控制器的地址分配不需要操作人员设定,完全有测试系统自动设定;①The address allocation of the controller does not need to be set by the operator, it is completely set automatically by the test system;
②能保证所设IP与控制器放置位置编号保持一致;② It can ensure that the set IP is consistent with the number of the controller's placement location;
③测试结束之后,该地址自动清除,不占用内存和影响其他功能;③ After the test is over, the address is automatically cleared, without occupying memory and affecting other functions;
④该地址分配方法准确、快速、简单易于实现;④ The address allocation method is accurate, fast, simple and easy to implement;
⑤该地址分配具有很强的通用性,因而该发明具有很高的性价比和适用互换性。⑤ The address allocation has strong versatility, so the invention has high cost performance and applicability and interchangeability.
本发明所述的水泵控制器测试系统地址分配方法与现有动态地址分配方案相比,具有以下优势:Compared with the existing dynamic address allocation scheme, the address allocation method of the water pump controller test system according to the present invention has the following advantages:
①无需获取控制器主控芯片的任何信息,从而能实现基于不同主控芯片平台的控制器同时进行测试;① There is no need to obtain any information about the main control chip of the controller, so that the controllers based on different main control chip platforms can be tested at the same time;
②能准确实现IP地址与控制器放置位置编号保持一致;② It can accurately realize the consistency between the IP address and the number of the controller's placement location;
③该地址分配方法准确、快速、简单易于实现;③The address allocation method is accurate, fast, simple and easy to implement;
同时,采用本发明所述方法对水泵控制器测试系统的设备进行地址分配方法具有结构简单、可靠性高,实用性强等特点;可有快速、有效解决IP地址与位置编号不一致的问题,为设备组网地址分配领域提供了一种新的方案,特别是应用于水泵控制器测试系统地址分配。Simultaneously, adopting the method of the present invention to carry out address assignment method to the equipment of water pump controller test system has the characteristics of simple structure, high reliability, strong practicability, etc.; can solve the problem that IP address and position numbering are inconsistent quickly and effectively, for A new solution is provided in the field of equipment network address allocation, especially for address allocation of water pump controller test system.
附图说明Description of drawings
图1为水泵控制器测试系统结构图。Figure 1 is a structural diagram of the water pump controller test system.
图2为上位机地址分配算法流程图。Figure 2 is a flowchart of the upper computer address allocation algorithm.
图3为测试柜控制器地址分配算法流程图。Figure 3 is a flow chart of the test cabinet controller address allocation algorithm.
图4为设备地址分配算法流程图。Figure 4 is a flow chart of the device address allocation algorithm.
具体实施方式Detailed ways
下面针对附图对本发明的实施例作进一步说明:Embodiments of the present invention will be further described below with reference to the accompanying drawings:
本发明提出的一种基于水泵控制器测试系统地址分配方法的测试系统,结构如图1所示。主要包括上位机(PC机)、测试柜控制器、相关性能测试设备和待测水泵控制器及电源开关组成。上位机、测试柜控制器和待测水泵控制器通过通信总线连接组成局域网,进行数据的交换。上位机主要实现测试流程和参数数据发送给待测水泵控制器及生成待测水泵控制器的测试报告和相应数据库。测试柜控制器主要实现待测水泵控制器地址设定、待测水泵控制器流程对应执行机构及相关参数的控制和上传待测水泵控制器测试数据给上位机。待测水泵控制器主要实现发出地址分配请求命令、接收测试柜控制器设定的IP和上传测试流程对应的状态数据。电源开关主要实现对待测水泵控制器的通断电控制。The present invention proposes a test system based on the address allocation method of the water pump controller test system, the structure of which is shown in FIG. 1 . It mainly consists of a host computer (PC), a test cabinet controller, related performance test equipment, a water pump controller to be tested and a power switch. The upper computer, the test cabinet controller and the water pump controller to be tested are connected through a communication bus to form a local area network for data exchange. The upper computer mainly implements the test process and parameter data sent to the water pump controller to be tested and generates the test report and corresponding database of the water pump controller to be tested. The test cabinet controller mainly realizes the address setting of the water pump controller to be tested, the control of the corresponding actuator and related parameters of the water pump controller to be tested, and uploads the test data of the water pump controller to be tested to the host computer. The pump controller to be tested mainly implements sending address allocation request commands, receiving the IP set by the test cabinet controller and uploading the status data corresponding to the test process. The power switch mainly realizes the on-off control of the water pump controller to be tested.
测试柜控制器通过电源控制总线与电源开关连接,且所述测试柜控制器可以通过发送指令控制电源开关依次闭合,所述测试柜控制器通过通信总线与待测水泵控制器连接,所述测试柜控制器与相关性能测试设备连接,所述相关性能测试设备分别与待测水泵控制器连接,所述测试柜控制器分别与上位机连接,构成局域网。其中测试柜数量为多个,其柜号为m,故对应设置的测试柜控制器的也定义为m,10≥m≥1,每个测试柜中装的待测水泵控制器的设备号i,即50≥i≥1,依次按顺序排列。The test cabinet controller is connected with the power switch through the power control bus, and the test cabinet controller can control the power switch to be closed sequentially by sending instructions, the test cabinet controller is connected with the water pump controller to be tested through the communication bus, and the test The cabinet controller is connected to relevant performance testing equipment, and the relevant performance testing equipment is respectively connected to the water pump controller to be tested, and the test cabinet controller is respectively connected to the upper computer to form a local area network. The number of test cabinets is multiple, and the cabinet number is m, so the corresponding test cabinet controller is also defined as m, 10≥m≥1, and the equipment number i of the water pump controller to be tested installed in each test cabinet , that is, 50≥i≥1, arranged in sequence.
一种水泵控制器测试系统地址分配方法,其包括以下步骤:A water pump controller test system address assignment method, it comprises the following steps:
(a)将所有待测水泵控制器放入测试柜之后;(a) After putting all the water pump controllers to be tested into the test cabinet;
(b)上位机发出获取设备地址的第一步指令;(b) The host computer issues the first step command to obtain the device address;
(c)测试柜的测试柜控制器m(10≥m≥1)接收到上位机的获取设备地址命令后,依次对各测试柜所属的待测水泵控制器对应的电源开关k(50≥k≥1)进行闭合动作;(c) After the test cabinet controller m (10≥m≥1) of the test cabinet receives the device address acquisition command from the host computer, it sequentially controls the power switch k (50≥k ≥1) Perform closing action;
(d)电源开关k闭合之后,待测水泵控制器i通电;(d) After the power switch k is closed, the water pump controller i to be tested is powered on;
(e)待测水泵控制器i发出请求地址分配请求。(e) The water pump controller i to be tested sends out a request for address assignment.
(f)测试柜控制器m接收到所属待测水泵控制器i的地址请求之后,将IP=m+i发送给待测水泵控制器i;(f) After the test cabinet controller m receives the address request of the water pump controller to be tested i, it sends IP=m+i to the water pump controller to be tested i;
(g)待测水泵控制器i收到测试柜控制器m下发的IP之后,回复确认信息;(g) After the water pump controller i to be tested receives the IP issued by the test cabinet controller m, it replies with a confirmation message;
(h)测试柜控制器m收到待测水泵控制器i的确认信息之后,则设定当前的待测水泵控制器i的IP为IP=m+i,测试柜控制器m没收到待测水泵控制器i的确认信息之后,则设定当前的待测水泵控制器i的IP为null;(h) After the test cabinet controller m receives the confirmation information of the water pump controller i to be tested, the IP of the current water pump controller i to be tested is set as IP=m+i, and the test cabinet controller m does not receive the confirmation information of the water pump controller i to be tested. After the confirmation information of the water pump controller i, set the IP of the current water pump controller i to be tested as null;
(i)继续闭合电源开关k+1,待测水泵控制器i+1通电,待测水泵控制器i+1发出请求地址分配指令,测试柜控制器m接收到所属待测水泵控制器i+1的地址指令之后,将IP=m+(i+1)发送给待测水泵控制器i和待测水泵控制器i+1,待测水泵控制器i判断自身设定的IP与收到的不一致,则不设定也不回复确认信息,待测水泵控制器i+1设定IP=m+(i+1),重复步骤(c)-(i),直至所有的待测水泵控制器的IP设定;(i) Continue to close the power switch k+1, the water pump controller to be tested i+1 is powered on, the water pump controller to be tested i+1 sends a request address allocation instruction, and the test cabinet controller m receives the water pump controller to be tested i+1 After the address command of 1, send IP=m+(i+1) to the water pump controller to be tested i and the water pump controller to be tested i+1, and the water pump controller to be tested i judges that the IP set by itself is inconsistent with the received one , then do not set or reply to the confirmation message, set IP=m+(i+1) for the water pump controller to be tested i+1, repeat steps (c)-(i), until the IP of all the water pump controllers to be tested set up;
(j)测试柜控制器m将所属的待测水泵控制器的IP回传给上位机;(j) The test cabinet controller m returns the IP of the water pump controller to be tested to the upper computer;
(k)上位机获取回传IP后,建立待测水泵控制器的测试数据库,完成地址分配。(k) After the upper computer obtains the returned IP, it establishes the test database of the water pump controller to be tested, and completes the address assignment.
其中,当任意一个待测水泵控制器i被热拔后,可以直接再进行检测,直接在测试数据库中得出信号变化,重而获知某个待测水泵控制器i被拔除。Wherein, when any water pump controller i to be tested is hot-plugged, it can be directly detected again, and the signal change can be obtained directly in the test database, and then it is known that a certain water pump controller i to be tested has been unplugged.
所述步骤(b)中,所述上位机将地址分配命令以广播命令方式发送给所有测试柜的测试柜控制器,并确定所有测试柜控制器回复已接收到地址分配命令。In the step (b), the host computer sends the address assignment command to the test cabinet controllers of all test cabinets in the form of a broadcast command, and confirms that all test cabinet controllers reply that they have received the address assignment command.
所述步骤(k)中,上位机接收测试柜控制器上传的待测水泵控制器的IP地址;确定所有测试柜控制器已上传了所属待测水泵控制器的IP地址;并以所收到的IP地址为检索,建立与待测水泵控制器对应的的测试数据库。In the described step (k), the host computer receives the IP address of the water pump controller to be tested uploaded by the test cabinet controller; it is determined that all test cabinet controllers have uploaded the IP address of the water pump controller to be tested; The IP address is used for retrieval, and a test database corresponding to the water pump controller to be tested is established.
即上位机地址分配方法流程如图2所示,主要实现地址分配命令的下发和接收待测水泵控制器的IP及建立对应的数据库,其地址分配流程说明如下:That is, the process flow of the host computer address allocation method is shown in Figure 2. It mainly realizes the issuing of address allocation commands, receiving the IP of the water pump controller to be tested and establishing a corresponding database. The address allocation process is described as follows:
⑴将所有待测设备放入测试柜之后,运行上位机测试软件;⑴After putting all the equipment to be tested into the test cabinet, run the test software of the host computer;
⑵上位机将地址分配命令以广播命令方式发送给所有测试柜控制器;⑵The upper computer sends the address allocation command to all test cabinet controllers in the form of broadcast command;
⑶判断所有测试柜控制器是否回复已接收到地址分配命令?如果是,则进入步骤⑷;反之,在⑶处等待;(3) Judging whether all the test cabinet controllers reply that the address allocation command has been received? If yes, then enter step (4); otherwise, wait at (3);
⑷接收测试柜控制器上传的设备IP;⑷ Receive the device IP uploaded by the test cabinet controller;
⑸判断是否所有测试柜控制器均上传了设备IP?如果是,则进入步骤⑹;否则,进入步骤⑷;⑸ Determine whether all test cabinet controllers have uploaded the device IP? If yes, go to step 6; otherwise, go to step 4;
⑹以所收到的IP为检索,建立对应的测试结果数据库;进入步骤⑺;⑹ Use the received IP as a search to establish a corresponding test result database; enter step ⑺;
⑺地址分配程序结束。⑺The address assignment procedure ends.
而测试柜控制器地址分配方法流程如图3所示,主要实现接收上位机地址分配命令、接收被测水泵控制器地址分配请求命令、下发IP地址给被测水泵控制器和上传水泵控制器IP地址给上位机,大致包括步骤(c)-(i)。The process flow of the test cabinet controller address allocation method is shown in Figure 3, which mainly realizes receiving the address allocation command of the upper computer, receiving the address allocation request command of the water pump controller under test, sending the IP address to the water pump controller under test and uploading the water pump controller Giving the IP address to the host computer roughly includes steps (c)-(i).
所述步骤(c)-(i)的详细步骤如下:The detailed steps of described steps (c)-(i) are as follows:
一、确定接收上位机的获取设备地址命令;1. Make sure to receive the device address command from the host computer;
二、接通设备号为i的待测水泵控制器对应的电源开关k,给待测水泵控制器i供电;2. Turn on the power switch k corresponding to the water pump controller under test whose device number is i, and supply power to the water pump controller under test i;
三、确定是否接收到待测水泵控制器i的地址分配请求,结果为是,则发送设备号为i的待测水泵控制器的IP地址;IP=柜号m+设备号i;结果是否,则设置设备号为i的待测水泵控制器的IP地址为null;Three, determine whether to receive the address allocation request of the water pump controller i to be tested, if the result is yes, then send the IP address of the water pump controller to be tested with the device number i; IP=cabinet number m+device number i; if the result is not, then Set the IP address of the water pump controller under test whose device number is i to null;
四、测试柜控制器接收到设定待测水泵控制器i的IP已设定信息,则设定当前待测水泵控制器i的IP=柜号m+设备号i;4. The test cabinet controller receives the information that the IP of the water pump controller i to be tested has been set, and then sets the current IP of the water pump controller i to be tested=cabinet number m+equipment number i;
五、测试柜控制器将所有IP地址不为null的待测水泵控制器的ip上传至上位机。5. The test cabinet controller uploads the IP addresses of all pump controllers to be tested with non-null IP addresses to the host computer.
其地址分配流程说明如下:The address allocation process is described as follows:
(1)将所有待测设备放入测试柜之后,运行测试柜控制器软件;(1) After putting all the equipment under test into the test cabinet, run the test cabinet controller software;
(2)判断上位机是否发送地址分配命令?如果是,则进入步骤(3);否则,进入步骤(16);(2) Determine whether the upper computer sends an address allocation command? If yes, then go to step (3); otherwise, go to step (16);
(3)初始化设备号地址i=1;(3) Initialize device number address i=1;
(4)接通设备号为i对应的电源开关i,给设备i供电;(4) Turn on the power switch i corresponding to the device number i, and supply power to the device i;
(5)判断是否接收到设备i的地址分配请求?如果是,则进入步骤⑹;否则,进入步骤(8);(5) Judging whether the address allocation request of device i is received? If yes, then go to step (6); otherwise, go to step (8);
(6)发送设备号为i的IP地址;IP=柜号m(高字节)+设备号i(低字节),进入步骤⑺;(6) sending equipment number is the IP address of i; IP=cabinet number m (high byte)+equipment number i (low byte), enter step ⑺;
(7)判断设备i是否回复设定IP信息?如果不是,则进入步骤(8);否则,进入步骤(11);(7) Determine whether the device i replies to set IP information? If not, then go to step (8); otherwise, go to step (11);
(8)计数器counter++,进入步骤(9);(8) counter counter++, enter step (9);
(9)判断counter>Nmax?如果是,则进入步骤(10);否则,进入步骤(5);(9) Judge counter>Nmax? If yes, then go to step (10); otherwise, go to step (5);
(10)设置设备i的地址为null,进入步骤(12);(10) the address of setting device i is null, enter step (12);
(11)测试柜控制器设定设备i的IP=柜号m(高字节)+设备号i(低字节),进入步骤(12);(11) IP=cabinet number m (high byte)+device number i (low byte) of IP=cabinet number m (low byte) of test cabinet controller setting equipment i, enter step (12);
(12)计数器counter清零,进入步骤(13);(12) The counter counter is cleared and enters step (13);
(13)设备号i++,进入步骤(14);(13) equipment number i++, enter step (14);
(14)判断设备号i>K(K为测试柜上最大设备号)?如果不是,则进入步骤(4);否则,进入步骤(15);(14) Judging that the equipment number i>K (K is the maximum equipment number on the test cabinet)? If not, then go to step (4); otherwise, go to step (15);
(15)将所有IP不为null的设备IP发送为上位机;(15) Send all device IPs whose IP is not null as the host computer;
(16)程序结束,退出;(16) The program ends and exits;
被测水泵控制器地址分配方法流程如图4所示,主要实现请求IP地址分配、接收设定IP地址和上传测试数据,The process flow of the method for assigning the address of the pump controller under test is shown in Figure 4, which mainly implements the request for IP address assignment, receiving and setting the IP address and uploading test data.
待测水泵控制器的IP分配方法如下:The IP allocation method of the water pump controller to be tested is as follows:
一、确定当前待测水泵控制器的IP是null;1. Make sure that the IP of the water pump controller to be tested is null;
二、向当前待测水泵控制器所在的测试柜控制器发送请求地址分配命令;2. Send a request address allocation command to the test cabinet controller where the water pump controller to be tested is currently located;
三、确定测试柜控制器回复设备IP地址;3. Determine the IP address of the test cabinet controller to reply to the device;
四、将接收到的IP作为当前待测水泵控制器i的IP=柜号m+设备号i。4. Use the received IP as the current IP of the water pump controller i to be tested = cabinet number m + equipment number i.
其地址分配流程说明如下:The address allocation process is described as follows:
⑴运行被测设备软件,定时器时间清零;(1) Run the software of the device under test, and clear the timer time;
⑵判断设备IP是否不为null?如果是,则进入步骤(7);否则,进入步骤(3);(2) Determine whether the device IP is not null? If yes, then go to step (7); otherwise, go to step (3);
⑶向设备所在测试柜控制器发送请求地址分配命令,进入步骤(4);(3) Send a request address allocation command to the test cabinet controller where the equipment is located, and enter step (4);
⑷判断测试柜控制器是否回复设备IP地址?如果是,进入步骤(5);否则,进入步骤(6);(4) Judging whether the test cabinet controller responds to the IP address of the device? If yes, go to step (5); otherwise, go to step (6);
⑸将接收到的IP作为设备i的IP=柜号m(高字节)+设备号i(低字节),进入步骤(7);(5) Use the received IP as the IP of device i = cabinet number m (high byte) + device number i (low byte), and enter step (7);
⑹判断地址分配定时器时间是否到?如果是,则进入步骤(7);否则,进入步骤(3);⑹Judge whether the address allocation timer time is up? If yes, then go to step (7); otherwise, go to step (3);
⑺程序结束,退出。⑺The program ends and exits.
本例以10个测试柜,每个测试柜上对多放50个待测水泵控制器为例进行阐述,测试实例基本流程为:In this example, 10 test cabinets are used as an example, and 50 more pump controllers to be tested are placed on each test cabinet. The basic flow of the test example is as follows:
(a)操作员将所有待测水泵控制器放入测试柜之后,运行上位机测试程序;(a) After the operator puts all the pump controllers to be tested into the test cabinet, run the test program of the upper computer;
(b)上位机发出测试流程的第一步指令,即获取设备地址;(b) The host computer issues the first step instruction of the test process, that is, to obtain the device address;
(c)测试柜控制器m(10≥m≥1)接收到上位机的获取设备地址命令后,依次对各自所属的待测水泵控制器对应的电源开关i(50≥i≥1)进行闭合动作;(c) After the test cabinet controller m (10≥m≥1) receives the device address acquisition command from the host computer, it sequentially closes the power switch i (50≥i≥1) corresponding to the water pump controller to be tested. action;
(d)(以第m柜的第j待测水泵控制器进行说明,其中j属于i中的任意一个号)电源开关j闭合之后,待测水泵控制器j通电运行程序;(d) (Illustrate with the jth water pump controller to be tested in the mth cabinet, where j belongs to any number in i) After the power switch j is closed, the water pump controller to be tested j is powered on to run the program;
(e)待测水泵控制器j发出请求地址分配请求。(e) The water pump controller j to be tested sends out a request for address assignment.
(f)测试柜控制器m接收到待测水泵控制器j的地址请求之后,将IP=m(高字节)+j(低字节)发送给待测水泵控制器j;(f) After the test cabinet controller m receives the address request of the water pump controller j to be tested, IP=m (high byte)+j (low byte) is sent to the water pump controller j to be tested;
(g)待测水泵控制器j收到测试柜控制器m下发的IP之后,回复一个确认信息;(g) After the water pump controller j to be tested receives the IP sent by the test cabinet controller m, it returns a confirmation message;
(h)测试柜控制器m收到待测水泵控制器j的确认信息之后,重复(c)~(g)的动作,直至所有的待测水泵控制器的IP地址设定(如果某个待测水泵控制器号地址上没有放置待测水泵控制器,则对应IP为null);(h) After the test cabinet controller m receives the confirmation information from the water pump controller j to be tested, repeat the actions (c) to (g) until the IP addresses of all the water pump controllers to be tested are set (if a certain water pump controller to be tested If the water pump controller to be tested is not placed on the address of the water pump controller to be tested, the corresponding IP is null);
(i)测试柜控制器将所属的IP地址回传给上位机;(i) The controller of the test cabinet sends back its IP address to the upper computer;
(j)上位机获取所以的回传IP建立被测待测水泵控制器的测试数据库,地址分配结束。(j) The host computer obtains all the returned IPs to establish the test database of the tested water pump controller, and the address assignment is completed.
本发明所述的水泵控制器测试系统地址分配方法与现有静态地址分配方案相比,具有以下优势:Compared with the existing static address allocation scheme, the water pump controller test system address allocation method of the present invention has the following advantages:
①控制器的地址分配不需要操作人员设定,完全有测试系统自动设定;①The address allocation of the controller does not need to be set by the operator, it is completely set automatically by the test system;
②能保证所设IP与控制器放置位置编号保持一致;② It can ensure that the set IP is consistent with the number of the controller's placement position;
③测试结束之后,该地址自动清除,不占用内存和影响其他功能;③ After the test is over, the address is automatically cleared, without occupying memory and affecting other functions;
④该地址分配方法准确、快速、简单易于实现;④ The address allocation method is accurate, fast, simple and easy to implement;
⑤该地址分配具有很强的通用性,因而该发明具有很高的性价比和适用互换性。⑤ The address allocation has strong versatility, so the invention has high cost performance and applicability and interchangeability.
本发明所述的水泵控制器测试系统地址分配方法与现有动态地址分配方案相比,具有以下优势:Compared with the existing dynamic address allocation scheme, the address allocation method of the water pump controller test system according to the present invention has the following advantages:
①无需获取控制器主控芯片的任何信息,从而能实现基于不同主控芯片平台的控制器同时进行测试;① There is no need to obtain any information about the main control chip of the controller, so that the controllers based on different main control chip platforms can be tested at the same time;
②能准确实现IP地址与控制器放置位置编号保持一致;② It can accurately realize the consistency between the IP address and the number of the controller's placement location;
③该地址分配方法准确、快速、简单易于实现;③The address allocation method is accurate, fast, simple and easy to implement;
同时,采用本发明所述方法对水泵控制器测试系统的设备进行地址分配方法具有结构简单、可靠性高,实用性强等特点;可有快速、有效解决IP地址与位置编号不一致的问题,为设备组网地址分配领域提供了一种新的方案,特别是应用于水泵控制器测试系统地址分配。Simultaneously, adopting the method of the present invention to carry out address assignment method to the equipment of water pump controller test system has the characteristics of simple structure, high reliability, strong practicability, etc.; can solve the problem that IP address and position numbering are inconsistent quickly and effectively, for A new solution is provided in the field of equipment network address allocation, especially for address allocation of water pump controller test system.
实施例不应视为对发明的限制,但任何基于本发明的精神所作的改进,都应在本发明的保护范围之内。The embodiment should not be regarded as limiting the invention, but any improvement based on the spirit of the present invention should be within the protection scope of the present invention.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610392275.3A CN105979024B (en) | 2016-06-03 | 2016-06-03 | A kind of water pump controller test system address distribution method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610392275.3A CN105979024B (en) | 2016-06-03 | 2016-06-03 | A kind of water pump controller test system address distribution method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105979024A CN105979024A (en) | 2016-09-28 |
CN105979024B true CN105979024B (en) | 2018-11-27 |
Family
ID=57010163
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610392275.3A Active CN105979024B (en) | 2016-06-03 | 2016-06-03 | A kind of water pump controller test system address distribution method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105979024B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103428051A (en) * | 2013-08-29 | 2013-12-04 | 普联技术有限公司 | System and method for testing communication devices |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201171877Y (en) * | 2008-02-04 | 2008-12-31 | 李吉玉 | Automatic polling testing water monitoring device of fire pump |
US9122253B2 (en) * | 2012-11-06 | 2015-09-01 | General Electric Company | Systems and methods for dynamic risk derivation |
CN203084549U (en) * | 2013-01-08 | 2013-07-24 | 台州神能电器有限公司 | Programmable logic controller (PLC) and touch screen type water pump controller testing system |
-
2016
- 2016-06-03 CN CN201610392275.3A patent/CN105979024B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103428051A (en) * | 2013-08-29 | 2013-12-04 | 普联技术有限公司 | System and method for testing communication devices |
Also Published As
Publication number | Publication date |
---|---|
CN105979024A (en) | 2016-09-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110492906B (en) | A fast automatic detection method of HPLC carrier module performance | |
CN102118282A (en) | Communication protocol consistency detection method and system | |
CN109379152B (en) | A simulation device for collecting electricity consumption information and diagnosing and evaluating equipment and its implementation method | |
CN106056896B (en) | Intelligent power consumption system and its test method based on low-voltage power line carrier | |
CN106332170A (en) | A Broadband Carrier Communication Performance Testing System | |
CN103746882A (en) | Test method for intelligent substation station-control layer | |
CN104052631A (en) | Equipment information collecting method, device and system | |
CN110401692A (en) | A substation monitoring information integrated automatic acceptance system and method | |
CN106093631A (en) | A kind of Testing System for Electronic Equipment possessing location recognition and IP establishing method | |
CN106093633B (en) | A kind of electronic equipment tests system and IP address setting method | |
CN107094091B (en) | A kind of intelligent substation station level network configuration method of calibration and system | |
CN115001136A (en) | Checking and checking system and method for accessing stock transformer substation monitoring information to centralized control station | |
CN114019284B (en) | Monitoring information checking system and method for access transformer substation of new generation master station | |
CN116154765A (en) | Recognition method, device, computer equipment and storage medium for power topology relationship | |
CN104133429A (en) | Intelligent control gateway and control method | |
CN106093632A (en) | Based on the IP addressing method and the system that scan tested electronic equipment position | |
CN112732552A (en) | Automatic detection system and method for platform area intelligent terminal application APP | |
CN110174565B (en) | A multi-protocol management system in which power quality monitoring devices are connected to the main station | |
CN107271810B (en) | Device and method for comparing and detecting power consumption information acquisition terminal software | |
CN105979024B (en) | A kind of water pump controller test system address distribution method | |
CN104793083A (en) | Communication unit interchangeability testing system and interchanging method thereof | |
CN113590471A (en) | Communication terminal equipment simulation system and use method thereof | |
CN103868202A (en) | Remote variable strategy transformer substation temperature and humidity control system | |
CN105099734B (en) | A kind of fault cues method and device | |
CN203673657U (en) | Low voltage table area meter reading collection terminal fault diagnosis tester |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210811 Address after: Shaan village, Daxi Town, Wenling City, Taizhou City, Zhejiang Province Patentee after: Qianfeng Pump Co.,Ltd. Address before: 325000 Wenzhou City National University Science Park incubator, No. 38 Dongfang South Road, Ouhai District, Wenzhou, Zhejiang Patentee before: Wenzhou University |
|
TR01 | Transfer of patent right |