CN111949456A - Serial port protocol automatic test system and method based on configuration updating - Google Patents

Serial port protocol automatic test system and method based on configuration updating Download PDF

Info

Publication number
CN111949456A
CN111949456A CN202010676173.0A CN202010676173A CN111949456A CN 111949456 A CN111949456 A CN 111949456A CN 202010676173 A CN202010676173 A CN 202010676173A CN 111949456 A CN111949456 A CN 111949456A
Authority
CN
China
Prior art keywords
protocol
serial port
master station
serial
configuration
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
CN202010676173.0A
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.)
State Grid Corp of China SGCC
Xuji Group Co Ltd
State Grid Henan Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Xuji Group Co Ltd
State Grid Henan Electric Power 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 State Grid Corp of China SGCC, Xuji Group Co Ltd, State Grid Henan Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202010676173.0A priority Critical patent/CN111949456A/en
Publication of CN111949456A publication Critical patent/CN111949456A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2294Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by remote test
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/273Tester hardware, i.e. output processing circuits
    • G06F11/2733Test interface between tester and unit under test

Abstract

The invention discloses a serial port protocol automatic test system and a method based on configuration updating, which are characterized in that configuration updating service agent programs in a cloud server, a third-party PC or other servers are used for carrying out configuration updating on a protocol conversion device and a serial port protocol master station, different COM interfaces of the protocol conversion device are enabled through configuration files, and automatic communication between a serial port and a simulation master station is enabled through pre-wiring.

Description

Serial port protocol automatic test system and method based on configuration updating
Technical Field
The invention relates to the field of power automation, in particular to a serial port protocol automatic test system and method based on configuration updating.
Background
With the change of the requirements of the transformer substation, the protocol conversion device continuously upgrades software programs or hardware configuration, and when the new software and hardware compatibility of the protocol conversion device is verified, a coverage function test needs to be performed on the full bit rate of all serial ports of the protocol conversion device so as to monitor whether the protocol conversion function of the protocol conversion device is correctly executed under various limit configurations. The same serial port protocol needs to change configuration files firstly when performing remote control, remote signaling, remote measurement and other functional tests on different COM interfaces or different baud rates of the same COM interface, and needs to perform serial port wiring again for different COM interfaces, so that the workload is large, the repeatability is high, and an automatically operated test system is urgently needed to complete the functional verification work under different serial ports and different baud rate configurations.
Disclosure of Invention
Objects of the invention
The invention aims to provide a serial port protocol automatic test system and method based on configuration updating, which can realize the function verification work under different serial ports and different baud rate configurations without adding hardware test equipment and manually frequent wiring and configuration updating.
(II) technical scheme
In order to solve the problems, the invention provides an automatic serial protocol testing system based on configuration updating in a first aspect, which comprises a protocol conversion device, a serial protocol master station and a spacer layer device, wherein the protocol conversion device is in communication connection with a configuration updating agent service agent program on a server, the serial protocol master station is in communication connection with the configuration updating agent service program on the server, the protocol conversion device is in communication with the serial protocol master station through a serial port converter, and the protocol conversion device is accessed to the spacer layer device through a network port.
According to the first aspect of the present invention, the protocol conversion apparatus realizes pre-wiring of all COM interfaces through a serial port converter and the serial protocol master station, enables the COM interfaces according to a current configuration file, and communicates with the serial protocol master station through the currently enabled COM interfaces.
According to the first aspect of the present invention, the server is a cloud server, the protocol conversion device establishes communication connection with the configuration update agent service on the server through IP access, and the serial protocol master station establishes communication connection with the configuration update agent service on the server through IP access.
The second aspect of the present invention provides a serial protocol automatic test method based on configuration update, which includes the following steps:
initializing an access address of an update service agent program to an initial value, and synchronizing initial configuration files of a protocol conversion device and a serial port protocol master station;
the serial port protocol master station starts a protocol function test of current configuration, and sends a configuration updating request to a configuration updating service agent program after the test is stopped;
and after receiving the configuration updating request, the configuration updating service agent program increases the access address of the serial port information relation mapping table to the next address in sequence, updates the serial port information corresponding to the current address to a configuration file, and then transmits the configuration file to the protocol conversion device and the serial port protocol master station. When the configuration updating service agent program polls to the last bit of the serial port information relation mapping table, a blank configuration file is returned to the serial port protocol master station;
after receiving the updated configuration file, the serial port protocol master station restarts the protocol function test of the serial port protocol master station if the configuration file is judged not to be empty, and sends a configuration update request to a configuration update service agent program after the test is stopped;
if the configuration file is empty, the protocol function test is finished, the serial port protocol master station generates a report file, and the state of each operation in the test process is recorded.
According to the second aspect of the present invention, the initial configuration file of the protocol conversion device includes the point table information and the forwarding serial port information of the spacer layer device, and the initial configuration file of the serial protocol master station includes the forwarding point table information and the receiving serial port information of the protocol conversion device.
According to the second aspect of the present invention, the serial port information mapping table includes correspondence between COM interfaces and baud rates, all COM interfaces of the protocol conversion device and baud rate information thereof are stored in order of address order, and information corresponding to the last address is null.
According to the second aspect of the present invention, the configuration file includes a configuration file of the protocol conversion device and a configuration file of the serial protocol master station, the configuration file of the protocol conversion device simultaneously reads the COM interface and the baud value in the serial information relationship mapping table each time, and the configuration file of the serial protocol master station reads the baud value each time.
(III) advantageous effects
The technical scheme of the invention has the following beneficial technical effects:
the protocol conversion device and the serial port protocol master station are configured and updated through the configuration update service agent program, different COM interfaces of the protocol conversion device are enabled through the configuration file, automatic communication between the enabled serial port and the simulation master station is achieved through pre-wiring, hardware testing equipment is not required to be added, and polling protocol function testing of all COM interfaces and the baud rates corresponding to the COM interfaces can be achieved without manual frequent wiring and configuration updating.
Drawings
Fig. 1 is a schematic structural diagram of an automatic serial port protocol testing system updated based on cloud configuration according to an embodiment of the present invention.
Fig. 2 is a flowchart of an automatic serial protocol testing method based on cloud configuration update according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of an example of an automatic serial port protocol testing system based on cloud configuration update according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings in conjunction with the following detailed description. It should be understood that the description is intended to be exemplary only, and is not intended to limit the scope of the present invention. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
Fig. 1 shows a schematic diagram of an automatic serial port protocol testing system based on cloud configuration update. As can be seen from fig. 1, the system comprises three parts, namely a protocol conversion device 11, a serial protocol master station 12, a configuration update service agent 13 and a spacer layer device 14. The protocol conversion device 11 establishes communication connection with a configuration update proxy service program 13 in the cloud server through IP access, and the serial protocol master station 12 establishes communication connection with the configuration update proxy service program 13 in the cloud server through IP access. The protocol conversion device 11 realizes pre-wiring of all COM interfaces through the serial port converter 15 and the serial port protocol master station 12, enables the COM interfaces according to the current configuration file, and communicates with the serial port protocol master station 12 through the currently enabled COM interfaces. The protocol conversion device 11 is connected to the spacer layer device 14 through the network port.
Further, the configuration update agent 13 may be provided on a third-party PC or other server in addition to the cloud server.
Fig. 2 shows a flowchart of an automatic serial port protocol testing method based on cloud configuration update, and as can be seen from fig. 2, the method includes the following steps:
s11: initializing an access address of a configuration updating service agent program to an initial value, and synchronizing initial configuration files of a protocol conversion device and a serial port protocol master station;
the initial configuration file of the protocol conversion device comprises point table information and forwarding serial port information of the spacer layer device, and the initial configuration file of the serial port protocol master station comprises forwarding point table information and receiving serial port information of the protocol conversion device.
S12: the serial port protocol master station starts a protocol function test of current configuration, and sends a configuration updating request to a configuration updating service agent program after the test is stopped;
s13: after receiving the request, the configuration updating service agent program increases the access address of the serial port information relation mapping table to the next address in sequence, updates the serial port information corresponding to the current address to a configuration file, and then issues the configuration file to the protocol conversion device and the serial port protocol master station respectively.
The serial port information relation mapping table comprises corresponding relations of COM interfaces and baud rates, all COM interfaces and baud rate information of the protocol conversion device are stored according to the address sequence, and information corresponding to the last address is null.
The configuration file comprises a configuration file of the protocol conversion device and a configuration file of the serial protocol master station, the configuration file of the protocol conversion device simultaneously reads the COM interface and the baud rate value in the relational mapping table each time, and the configuration file of the serial protocol master station reads the baud rate value each time.
And when the configuration updating service agent program polls to the last bit of the relational mapping table, returning a blank configuration file.
S14: after receiving the new configuration file, the serial port protocol master station restarts the protocol function test of the serial port protocol master station if the configuration file is judged not to be empty, and sends a configuration update request to a configuration update service agent program after the test is stopped;
s15: if the configuration file is empty, the protocol function test is finished, the serial port protocol master station generates a report file, and the state of each operation in the test process is recorded.
A cyclic telecontrol protocol (CDT for short) specifies functions, a frame structure, an information word structure, transmission rules and the like of the cyclic telecontrol protocol in the power grid data acquisition and monitoring system. The serial port protocol automatic test system updated based on cloud configuration is specifically described below by taking a cycle telecontrol protocol simulation master station (CDT protocol simulation master station for short) and a 4-network 16-string communication manager as examples.
Fig. 3 is a schematic structural diagram illustrating an example of an automatic serial port protocol testing system updated based on cloud configuration. It can be seen that the system comprises four parts, namely a communication manager 21, a CDT protocol simulation master station 22, a configuration update service agent program 23 and a WXH-822 microcomputer line protection measurement and control device 24. The 16 COM interfaces of the communication manager 21 are connected with the CDT protocol simulation master station 22 through a serial port converter 25 by adopting 232 connection wires, thereby realizing the pre-connection of the 16 COM interfaces, and simultaneously connected with the WXH-822 microcomputer line protection measurement and control device 24 through a network port. The communication manager 21 and the CDT protocol simulation master station 22 both establish communication with the cloud server through the IP address 47.105.50.153.
The automatic serial port protocol testing method comprises the following steps:
s21: and (3) configuring an update service agent program to initialize an access address to 1, and synchronizing initial configuration files of the communication manager and the CDT protocol simulation master station.
The initial configuration files contain point table information of a WXH-822 microcomputer line protection measurement and control device, the initial enabling COM interface of the communication manager is COM1, the baud rate is 300bps, and the baud rate of the CDT protocol simulation main station is consistent with that of the communication manager.
S22: the CDT protocol simulation master station starts to test the remote control function for 100 times continuously, the communication manager transfers the remote control message to the WXH-822 microcomputer line protection measurement and control device, and the WXH-822 microcomputer line protection measurement and control device transmits the response message to the CDT protocol simulation master station through the COM interface currently enabled by the communication manager. Sending a configuration updating request to a configuration updating service agent program after the continuous remote control is finished;
s23: after receiving the update request, the configuration update service agent program accesses the address +1, reads a COM interface value and a baud rate value corresponding to the serial port information relation mapping table to a configuration file, and then issues the configuration file to the communication manager and the CDT protocol simulation master station respectively;
s24: reading COM and baud rate values in the new configuration file by the communication manager, and enabling a new COM interface;
s25: and the CDT protocol simulation master station reads the baud rate value in the configuration file, if the baud rate value in the configuration file is not null, the S22 is switched to, and if not, the protocol function test is ended.
S26: the CDT protocol simulation master station generates a test report file and can inquire the success rate and the failure record of continuous remote control.
In summary, the invention discloses a serial protocol automatic testing system and method based on cloud configuration update, which configure and update a protocol conversion device and a serial protocol master station through a configuration update service agent program in a server, enable different COM interfaces of the protocol conversion device through a configuration file, realize automatic communication between the enabled serial port and a simulation master station through pre-wiring, and realize polling protocol function tests of all COM interfaces and corresponding baud rates thereof without adding hardware testing equipment and manually frequent wiring and configuration update.
It is to be understood that the above-described embodiments of the present invention are merely illustrative of or explaining the principles of the invention and are not to be construed as limiting the invention. Therefore, any modification, equivalent replacement, improvement and the like made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. Further, it is intended that the appended claims cover all such variations and modifications as fall within the scope and boundaries of the appended claims or the equivalents of such scope and boundaries.

Claims (7)

1. The utility model provides an automatic test system of serial ports stipulations based on configuration update, its characterized in that, includes stipulations conversion equipment, serial ports stipulations master station and spacer layer device, and the communications connection is established with configuration update agent service agent program on the server to stipulations conversion equipment, and the communications connection is established with configuration update agent service program on the server to the serial ports stipulations master station, and stipulations conversion equipment passes through serial port converter and the communication of serial ports stipulations master station, and stipulations conversion equipment passes through net gape access spacer layer device.
2. The automatic serial protocol testing system of claim 1, wherein the protocol conversion device realizes pre-wiring of all COM interfaces through a serial converter and the serial protocol master station, enables the COM interfaces according to a current configuration file, and communicates with the serial protocol master station through the currently enabled COM interfaces.
3. The automatic serial protocol testing system of claim 1, wherein the server is a cloud server, the protocol conversion device establishes communication connection with a configuration update agent service agent program on the server through IP access, and the serial protocol master station establishes communication connection with the configuration update agent service program on the server through IP access.
4. A serial port protocol automatic test method based on configuration updating is characterized by comprising the following steps:
initializing an access address of an update service agent program to an initial value, and synchronizing initial configuration files of a protocol conversion device and a serial port protocol master station;
the serial port protocol master station starts a protocol function test of current configuration, and sends a configuration updating request to a configuration updating service agent program after the test is stopped;
after receiving the configuration updating request, the configuration updating service agent program increases the access address of the serial port information relation mapping table to the next address in sequence, updates the serial port information corresponding to the current address to a configuration file, then issues the configuration file to the protocol conversion device and the serial port protocol master station, and returns a blank configuration file to the serial port protocol master station when the configuration updating service agent program polls to the last bit of the serial port information relation mapping table; after receiving the updated configuration file, the serial port protocol master station restarts the protocol function test of the serial port protocol master station if the configuration file is judged not to be empty, and sends a configuration update request to a configuration update service agent program after the test is stopped; if the configuration file is empty, the protocol function test is finished, the serial port protocol master station generates a report file, and the state of each operation in the test process is recorded.
5. The automatic serial protocol testing method of claim 4, wherein,
the initial configuration file of the protocol conversion device comprises point table information and forwarding serial port information of the spacer layer device, and the initial configuration file of the serial port protocol master station comprises forwarding point table information and receiving serial port information of the protocol conversion device.
6. The automatic serial protocol testing method of claim 4, wherein,
the serial port information relation mapping table comprises corresponding relations of COM interfaces and baud rates, all COM interfaces and baud rate information of the protocol conversion device are stored according to the address sequence, and information corresponding to the last address is null.
7. The automatic serial protocol testing method according to claim 4, wherein the configuration file comprises a configuration file of the protocol conversion device and a configuration file of the serial protocol master station, the configuration file of the protocol conversion device reads the COM interface and the baud value in the serial port information relation mapping table at the same time each time, and the configuration file of the serial protocol master station reads the baud value each time.
CN202010676173.0A 2020-07-14 2020-07-14 Serial port protocol automatic test system and method based on configuration updating Pending CN111949456A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010676173.0A CN111949456A (en) 2020-07-14 2020-07-14 Serial port protocol automatic test system and method based on configuration updating

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010676173.0A CN111949456A (en) 2020-07-14 2020-07-14 Serial port protocol automatic test system and method based on configuration updating

Publications (1)

Publication Number Publication Date
CN111949456A true CN111949456A (en) 2020-11-17

Family

ID=73340581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010676173.0A Pending CN111949456A (en) 2020-07-14 2020-07-14 Serial port protocol automatic test system and method based on configuration updating

Country Status (1)

Country Link
CN (1) CN111949456A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114020674A (en) * 2021-10-27 2022-02-08 成都交大许继电气有限责任公司 Cascading device and communication method of telecontrol terminal
CN114124949A (en) * 2021-09-28 2022-03-01 许继集团有限公司 Serial port agent device and distribution automation power system applying same

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102970175A (en) * 2012-02-08 2013-03-13 深圳市金宏威技术股份有限公司 Power distribution network protocol test analytical method and system
CN103311830A (en) * 2013-05-30 2013-09-18 国家电网公司 Substation automation system debugging device
CN104502748A (en) * 2014-12-03 2015-04-08 国家电网公司 Transformer station integrated automatic test system
CN105227402A (en) * 2015-09-29 2016-01-06 国网福建省电力有限公司 The integrated method of testing of a kind of intelligent substation many stipulations communication
CN109376042A (en) * 2018-10-12 2019-02-22 华自科技股份有限公司 Serial ports test method, device, communication manager and storage medium
CN111224835A (en) * 2019-11-20 2020-06-02 深圳市康必达中创科技有限公司 Automatic switching method, device and system for serial port communication modes

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102970175A (en) * 2012-02-08 2013-03-13 深圳市金宏威技术股份有限公司 Power distribution network protocol test analytical method and system
CN103311830A (en) * 2013-05-30 2013-09-18 国家电网公司 Substation automation system debugging device
CN104502748A (en) * 2014-12-03 2015-04-08 国家电网公司 Transformer station integrated automatic test system
CN105227402A (en) * 2015-09-29 2016-01-06 国网福建省电力有限公司 The integrated method of testing of a kind of intelligent substation many stipulations communication
CN109376042A (en) * 2018-10-12 2019-02-22 华自科技股份有限公司 Serial ports test method, device, communication manager and storage medium
CN111224835A (en) * 2019-11-20 2020-06-02 深圳市康必达中创科技有限公司 Automatic switching method, device and system for serial port communication modes

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
周强强;徐宁;: "电力远动CDT规约向IEC61850转换的研究和实现", 广东输电与变电技术, no. 01, pages 53 - 35 *
王雨峰;李瑞明;陈先勇;朱重阳;: "变电站通信管理机Modbus规约通用接口实现", 电工技术, no. 01, pages 77 - 80 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124949A (en) * 2021-09-28 2022-03-01 许继集团有限公司 Serial port agent device and distribution automation power system applying same
CN114020674A (en) * 2021-10-27 2022-02-08 成都交大许继电气有限责任公司 Cascading device and communication method of telecontrol terminal

Similar Documents

Publication Publication Date Title
CN108847979B (en) Self-adaptive configuration system and method based on SCADA
CN109450704B (en) Plug-and-play intelligent distribution transformer terminal and distribution data communication system
CN104242465B (en) A kind of transformer substation remote monitoring system based on B/S and method
CN110429708B (en) Method and system for realizing plug and play of power distribution equipment
CN105305418A (en) Power distribution terminal self-description method based on IEC61850 standard
CN101123655A (en) Distribution load monitoring system
CN111949456A (en) Serial port protocol automatic test system and method based on configuration updating
KR101813066B1 (en) Scada gateway and method of conversion protocol for dnp 3.0 and iec 61850
CN113659713A (en) Plug and play method for power distribution internet of things end-side equipment based on HPLC communication
CN107819657A (en) A kind of method based on central controlled dynamic analysis Modbus agreements, things-internet gateway equipment and system
CN103138978A (en) Network management method and network management system
CN103683506B (en) Comprehensively-integrated linkage safety system of power system transformer substations
CN112542888A (en) Method for realizing plug and play of power distribution and utilization intelligent equipment
CN107566513B (en) Test equipment DOS environmental data acquisition method and system
CN103888289B (en) Gateway control method, gateway, management and control device and system
CN103545933B (en) I0 interface communication method in intelligent substation on-line monitoring system station
CN111224828A (en) Network management method of intelligent CPE (customer premise equipment)
CN103746836A (en) Embedded network management agent system based on ARM
CN113115346A (en) Gateway multi-protocol conversion device based on 5G and method thereof
CN210804735U (en) Intelligent electric meter
CN110989418A (en) Data acquisition system based on RS485 communication and working method thereof
CN203027289U (en) System for realizing serial communication among computer, host computer and slave computer
CN105704121A (en) Electric power data safe transmission system and method based on proprietary 4G network
CN112072795B (en) Plug and play implementation method of power distribution Internet of things medium-voltage equipment in SCADA master station
CN107515565A (en) A kind of MES terminal systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination