Disclosure of Invention
Aiming at the problems, the invention provides a debugging method of a low-voltage intelligent power distribution cabinet.
In order to achieve the aim, the invention provides a debugging method of a low-voltage intelligent power distribution cabinet, which comprises the following steps:
analyzing data stored in a register of an electric element, and generating an editable data table and a non-editable data table from the analyzed data;
secondly, automatically inspecting the address of the electrical element under the intelligent power distribution cabinet, and sequentially generating an equipment information report for the scanned information of the online electrical element;
thirdly, when the on-line electric element is scanned, detection function selection is provided;
fourthly, after the detection function is selected, the online equipment address and the equipment type of the current electrical element can be automatically displayed, and a corresponding data table is accessed according to the equipment address and the equipment type;
and fifthly, realizing remote measurement, remote regulation or remote control according to the corresponding data table.
The equipment information report comprises an equipment address, an equipment type, a communication parameter, a counter number and a loop number.
In the first step, data are processed through a VBA self-defined function, and the read data in the register are analyzed.
Compiling an operation state analysis function by using a VBA self-defined function, acquiring data of an operation state register, and analyzing the data into a variable value of the operation state analysis function;
assigning the variable value to a corresponding table in the data table;
and reading the value corresponding to the table in the data table to acquire the running state of the corresponding equipment.
In the second step, 1) polling scanning and reading are carried out on the equipment type register according to the set cycle time;
2) and when the read equipment type is matched with the equipment type in the data table, judging that the equipment which is inquired currently is online, storing the address and the equipment type of the online equipment, and adding 1 to the address value of the communication equipment.
And a timeout communication receiving mode is also set, and if the maximum number of communication scanning is exceeded and no response is obtained, the communication address is defined as no equipment connection.
The function selection comprises a remote measuring interface, a configuration interface and a remote control interface.
Any interface is in a working state, and the rest interfaces are in an unselected mode.
The invention has the beneficial effects that: the method is applied to the low-voltage intelligent power distribution cabinet for production verification, whether the network data link is normally connected or not and whether the equipment function is normal or not are detected, the initial configuration of the equipment is carried out, a detection report is generated, and the data management in the later period is facilitated. The method for carrying out system test and configuration can reduce manual inspection and improve efficiency and accuracy.
Detailed Description
Embodiments of the invention are further described below with reference to the accompanying drawings:
the low-voltage intelligent power distribution cabinet system generally comprises intelligent elements, an intelligent gateway and a human-computer interface HMI, wherein the intelligent elements comprise a universal circuit breaker, an intelligent molded case circuit breaker, an intelligent capacitance compensator, an intelligent measuring meter with various functions and the like. All the intelligent elements are connected to an MODBUS-RTU bus based on an RS485 physical layer, or data of the MODBUS-RTU based on the RS485 physical layer is converted into a MODBUS-TCP mode through intelligent gateway equipment, and then the data of the intelligent elements are transmitted to an HMI (human machine interface) through the bus to be displayed.
The invention provides a debugging method of a low-voltage intelligent power distribution cabinet, which comprises the following steps:
analyzing data stored in a register of an electric element, and generating an editable data table and a non-editable data table from the analyzed data;
secondly, automatically inspecting the address of the electrical element under the intelligent power distribution cabinet, and sequentially generating an equipment information report for the scanned information of the online electrical element;
thirdly, when the on-line electric element is scanned, detection function selection is provided;
fourthly, after the detection function is selected, the online equipment address and the equipment type of the current electrical element can be automatically displayed, and a corresponding data table is accessed according to the equipment address and the equipment type;
and fifthly, realizing remote measurement, remote regulation or remote control according to the corresponding data table.
The debugging configuration software realizes automatic scanning of various online devices and generates a device information report, and further performs operations such as measurement and configuration of key parameters and opening and closing actions of intelligent elements on the online devices. When the test is started, network selection is carried out according to a communication protocol selected by a networking system, then address scanning is carried out on equipment on a bus, and subsequent test work can be carried out on the equipment only by confirming that the equipment is on line. After the online device is scanned, the corresponding interface can be accessed by clicking an interface button: a telemetry interface, a configuration interface, and a remote control interface. When any interface is clicked, other interfaces can be hidden, the currently selected interface is an effective interface, and related communication operation can be directly carried out on the selected interface.
The data of some communication registers of the intelligent components are operated according to bits, so that the actual functions contained in a data frame are very various, and taking the value of the operation state register of a universal circuit breaker as an example, the content of the lower 8 bits contains various states: the circuit breaker state, the alarm sign, the fault trip sign and the DI/DO state are adopted, and the VBA self-defined function in the EXCEL is adopted to process communication data and compile the self-defined function, so that the programming of software can be greatly simplified and the operating efficiency of the program can be improved. An example of custom function parsing register data written using VBA,
the equipment information report comprises an equipment address, an equipment type, a communication parameter, a counter number and a loop number. The processing method of the multi-type device communication point table greatly influences the programming efficiency and software maintenance of debugging configuration software, the debugging configuration software puts all multi-type devices and corresponding register data in an EXCEL file, the first sheet table is element type communication point table data of each device, each following sheet table is a communication point table of each corresponding element, the updating design of the system intelligent element type is easy to realize by adopting the communication point table data processing scheme, and if a new device type exists, only the device type data corresponding to the communication point table needs to be added in the device type sheet and all other corresponding communication point table data are added in the following sheet.
In the first step, data are processed through a VBA self-defined function, and the read data in the register are analyzed.
Compiling an operation state analysis function by using a VBA self-defined function, acquiring data of an operation state register, and analyzing the data into a variable value of the operation state analysis function;
assigning the variable value to a corresponding table in the data table;
and reading the value corresponding to the table in the data table to acquire the running state of the corresponding equipment.
The method comprises the following specific steps: 1) the run state analysis function runstate (B47) is written by a VBA software function in excel, B47 is a data grid in an excel table, namely, the data of B47 is a variable of the run state analysis function.
2) And assigning the value of the running state analysis function runstate (B47) to C47 in the excel table.
3) Thus, the VB software program only needs to read the operating state register data of the smart component and write the data into B47 in the Excel table, and the read data bit is 0x1234, which is the variable value of the operating state analysis function.
4) C47 in the excel table shows that the calling variable is 0x1234, namely the specific operation state of the universal circuit breaker.
5) Then the operation of software display only needs VB writer to read the content display of C47.
6) Therefore, the communication processing work of the running state is simplified into the reading and writing work of the VB compiling program on the EXCEL table, and the state analysis work is completed in the background through the function of the VBA, so that the simplification of the programming workload and the improvement of the program running efficiency are realized.
In summary, the VBA is adopted to process the data report of the communication register, which has the following advantages:
1) the Excel is provided with a built-in function, a plurality of received data are required to be operated and converted into data formats in a communication system, and the workload on a plurality of programs can be reduced by utilizing the existing functions in the Excel to operate;
2) the method is convenient to decouple, when registers of various equipment types are read and written, built-in functions or custom functions in Excel tables can be directly called to process register data, and only data are read and written into VB, and the read data do not need to be judged and operated;
3) and the corresponding data in the communication process can be conveniently stored and subsequently processed.
In the second step, 1) polling scanning and reading are carried out on the equipment type register according to the set cycle time; the 200ms time interval is adopted, packet loss is easy to occur if the set interval time is too short, and the communication efficiency is greatly reduced if the interval time is too long, so that the response speed of data frames of various devices needs to be detected by an oscilloscope before the cycle time is determined, the polling time cycle can be determined more effectively, and the automatic scanning performance of debugging configuration software is improved;
2) and when the read equipment type is matched with the equipment type in the data table, judging that the equipment which is inquired currently is online, storing the address and the equipment type of the online equipment, and adding 1 to the address value of the communication equipment.
The method is also provided with a timeout communication receiving mode, wherein the communication address is defined as no equipment connection if the maximum number of communication scanning is exceeded and no response is obtained, the maximum number of communication scanning is set to be 3, and if no response is made in 3 times of scanning the bus, the communication address is indicated as no equipment connection.
The method is mainly applied to test debugging of the low-voltage intelligent power distribution cabinet, whether a network data link of the low-voltage intelligent power distribution cabinet is normally connected and whether the function of equipment is normal are detected, initial configuration of the equipment is carried out, a detection report is generated, and data management in the later period is facilitated. The method for carrying out system test and configuration can reduce manual inspection, improve efficiency and accuracy, and improve efficiency for assembly and production of the intelligent power distribution monitoring and management system.