Summary of the invention
The technical problem to be solved in the present invention is; when adopting manual test at the logical design of the above-mentioned reactor protection system of prior art comparatively inconvenience, inefficiency, be difficult to avoid the defective of people because of slipping up, a kind of logic test method and device that is suitable for reactor protection system is provided.
One of the technical solution adopted for the present invention to solve the technical problems is: construct a kind of logic test method that is suitable for reactor protection system, it comprises:
Construction step: make up test procedure and based on the truth table of CSV form, comprise the logical diagram index information, input variable, output variable, the assignment information of input variable, the desired value and the execution time of output variable of reactor protection system in the described truth table;
Invocation step: read described logical diagram index information, call the described test procedure corresponding with it;
Calculation step: read described input variable, and described input variable is carried out assignment, carry out logical operation according to the test procedure and the execution time of calling again, obtain the output valve of output variable according to the assignment information of described input variable;
Determining step: whether the output valve of judging described output variable is consistent with the desired value of described output variable, if will export correct information as a result; If not, will export erroneous results information;
Output step: export described correct information as a result and/or erroneous results information.
The invention described above is described to be suitable for also comprising in the logic test method of reactor protection system:
Initialization step: before carrying out described invocation step, carry out initialization operation.
The invention described above is described to be suitable for also comprising in the logic test method of reactor protection system:
Storing step: store described correct information as a result and/or erroneous results information.
The invention described above is described to be suitable for also comprising in the logic test method of reactor protection system:
Tracking step: the implementation to described calculation step is followed the tracks of.
The invention described above is described to be suitable in the logic test method of reactor protection system, and described input variable is analog quantity and/or digital quantity, and described output variable is a digital quantity.
Two of the technical solution adopted for the present invention to solve the technical problems is: construct a kind of logic testing device that is suitable for reactor protection system, it comprises:
Construction unit: make up test procedure and based on the truth table of CSV form, comprise the logical diagram index information, input variable, output variable, the assignment information of input variable, the desired value and the execution time of output variable of reactor protection system in the described truth table;
Call unit: read described logical diagram index information, call the described test procedure corresponding with it;
Arithmetic element: read described input variable, and described input variable is carried out assignment, carry out logical operation according to the test procedure and the execution time of calling again, obtain the output valve of output variable according to the assignment information of described input variable;
Judging unit: whether the output valve of judging described output variable is consistent with the desired value of described output variable, if will export correct information as a result; If not, will export erroneous results information;
Output unit: export described correct information as a result and/or erroneous results information.
The invention described above is described to be suitable for also comprising in the logic testing device of reactor protection system:
Initialization unit: before carrying out described call unit executable operations, carry out initialization operation.
The invention described above is described to be suitable for also comprising in the logic testing device of reactor protection system:
Storage unit: store described correct information as a result and/or erroneous results information.
The invention described above is described to be suitable for also comprising in the logic testing device of reactor protection system:
Tracking cell: be used for the implementation of described calculation step is followed the tracks of.
The invention described above is described to be suitable in the logic testing device of reactor protection system, and described input variable is analog quantity and/or digital quantity, and described output variable is a digital quantity.
Implement logic test method and the device that is suitable for reactor protection system of the present invention, have the following advantages:
The first, test based on the truth table and the test procedure of CSV form by making up, be convenient to revise and adjust;
The second, full automatic test builds can avoid the people because of error, improves testing efficiency;
The 3rd, generate test result and location defective automatically, be convenient to the investigation of design mistake.
Embodiment
As described in Figure 1, be the process flow diagram of first preferred embodiment of the present invention's logic test method of being suitable for reactor protection system.In this first preferred embodiment, this logic test method that is suitable for reactor protection system comprises:
The beginning step.
Construction step S1: make up test procedure and based on the truth table of CSV (Comma Separated value) form, comprise the logical diagram index information, input variable, output variable, the assignment information of input variable, the desired value and the execution time of output variable of reactor protection system in the described truth table.So-called CSV is the CSV comma separated value file, is a kind of text-only file form that is used for storing data, is generally used for electrical form or database software.So-called logical diagram index information is the name information of certain logical diagram, the logical diagram index information that each logical diagram is corresponding unique.
In this construction step S1, when making up test procedure and truth table, the test procedure that each truth table is corresponding unique comprises unique logical diagram index information in each truth table.
Invocation step S2: read described logical diagram index information, call the described test procedure corresponding with it.Because the test procedure that each truth table is corresponding unique comprises unique logical diagram index information during each truth table has, so, by reading described logical diagram index information, can call the test procedure corresponding with this logical diagram index information.
Calculation step S3: read described input variable, and described input variable is carried out assignment, carry out logical operation according to the test procedure and the execution time of calling again, obtain the output valve of output variable according to the assignment information of described input variable.Among this calculation step S3, described input variable is one or more, and is analog quantity and/or digital quantity, and described input variable is set up when the truth table that makes up based on the CSV form, that is:
When input variable is one, only independent an input variable and corresponding output valve thereof are tested, be applicable to certain input variable is carried out tracking and testing; When input variable when being a plurality of, can test a plurality of input variables and corresponding respectively output valve thereof simultaneously, improved work efficiency, saved the time.
Among this calculation step S3, the described execution time is used to retrain the sequential of execution, carries out logical operation by calling described test procedure, finally obtains the output valve of output variable.In addition, because described output variable is a digital quantity, so the output valve of described output variable is " 0 " or " 1 ".
Determining step S4: whether the output valve of judging described output variable is consistent with the desired value of described output variable, if will export correct information as a result; If not, will export erroneous results information.In construction step S1, when the truth table that makes up based on the CSV form, the desired value of output variable is set to " 0 " or " 1 ", so, in determining step S4, if the output valve of described output variable and the desired value of described output variable are " 0 " or " 1 " simultaneously, will export correct information as a result; If the output valve of described output variable and the desired value of described output variable are not " 0 " or " 1 " simultaneously, will export erroneous results information.
Output step S5: determining step S4 draws at last above the output described correct information as a result and/or erroneous results information.Among this output step S5, above-mentioned described correct information as a result and/or erroneous results information output (respectively shown in step S5 (a) and step S5 (b)) with to rewriting based on the truth table of CSV form, can be deposited in the file of appointment subsequently in addition.Further, can compare the output valve of output variable and the desired value of output variable simultaneously, inconsistent result is identified out, be convenient to the user and check.
End step.
As shown in Figure 2, be the process flow diagram of second preferred embodiment of the present invention's logic test method of being suitable for reactor protection system.The difference of this second preferred embodiment and first preferred embodiment shown in Figure 1 is: first preferred embodiment has only carried out testing process one time, and second preferred embodiment can carry out repeatedly testing process, as long as in described determining step S4, judge the desired value of the output valve of described output variable and described output variable when inconsistent, in the described erroneous results information of output, can return among the construction step S1 automatically, readjust test procedure and/or based on the truth table (respectively shown in step S1 (a) and step S1 (b)) of CSV form, restart test again, the output valve of judging described output variable in described determining step S4 is with till the desired value of described output variable is consistent.
In other embodiments, on the basis of first, second preferred embodiment, this logic test method that is suitable for reactor protection system also comprises:
Initialization step: before carrying out described invocation step S2, carry out initialization operation, such as, the initialization of operation interface, some variable etc. make before the described invocation step S2 of every execution, keep identical operations interface, variable to be provided with etc.
In other embodiments, on the basis of first, second preferred embodiment, this logic test method that is suitable for reactor protection system also comprises:
Storing step: store described correct information as a result and erroneous results information, preferably, can verify that the form of report is preserved, and identify the output valve of output variable and the inconsistent part of desired value of output variable, be convenient to user's comparative analysis.
In other embodiments, on the basis of first, second preferred embodiment, this logic test method that is suitable for reactor protection system also comprises:
Tracking step: be used for the implementation of calculation step S3 is followed the tracks of.
Particularly, in calculation step S3, described tracking step is followed the tracks of the implementation of calculation step S3, need carry out for 4 steps altogether if set calculation step S3 in the test procedure, but just stopped when carrying out for the 3rd step, so, can follow the tracks of out when carrying out for the 3rd step and gone out mistake, so that user's positioning analysis problem.Further, but also setting program resets, and makes testing process turn back to calculation step S3.
As shown in Figure 3, be the block scheme of first preferred embodiment of the present invention's logic testing device of being suitable for reactor protection system.In this first preferred embodiment, this logic testing device that is suitable for reactor protection system comprises:
Construction unit 1: make up test procedure and based on the truth table of CSV form, comprise the logical diagram index information, input variable, output variable, the assignment information of input variable, the desired value and the execution time of output variable of reactor protection system in the described truth table.In this construction unit 1 execution graph 1 and the concrete operations of construction step S1 among Fig. 2, repeat no more herein.
Call unit 2: read described logical diagram index information, call the described test procedure corresponding with it.In this call unit 2 execution graphs 1 and the concrete operations of invocation step S2 among Fig. 2, repeat no more herein.
Arithmetic element 3: read described input variable, and described input variable is carried out assignment, carry out logical operation according to the test procedure and the execution time of calling again, obtain the output valve of output variable according to the assignment information of described input variable.In this arithmetic element 3 execution graphs 1 and the concrete operations of calculation step S3 among Fig. 2, repeat no more herein.
Judging unit 4: whether the output valve of judging described output variable is consistent with the desired value of described output variable, if will export correct information as a result; If not, will export erroneous results information.In this judging unit 4 execution graphs 1 and the concrete operations of determining step S4 among Fig. 2, repeat no more herein.
Output unit 5: export described correct information as a result and erroneous results information.The concrete operations of output step S5 repeat no more herein in this output unit 5 execution graphs 1 and among Fig. 2.
As shown in Figure 4, be the block scheme of second preferred embodiment of the present invention's logic testing device of being suitable for reactor protection system.The difference of this second preferred embodiment and first preferred embodiment shown in Figure 1 is: on the basis of first preferred embodiment; originally the logic testing device that is suitable for reactor protection system also comprises initialization unit A and storage unit B; initialization unit A is provided with between call unit 2 and the arithmetic element 3, and storage unit B links to each other with output unit 5.
Initialization unit A is used for carrying out initialization operation before carrying out call unit 2 executable operations, and it carries out the above concrete operations of initialization step, repeats no more herein.
Storage unit B is used to store described correct information as a result and erroneous results information, and it carries out the above concrete operations of storing step, repeats no more herein.
Further; in other embodiments; originally the logic testing device that is suitable for reactor protection system also comprises tracking cell; described tracking cell links to each other with arithmetic element 3; be used for the implementation of arithmetic element 3 is followed the tracks of; it carries out the above concrete operations of tracking step, repeats no more herein.
In addition; of the present inventionly be suitable for the logic test method of reactor protection system and the operation platform of device is preferably the windows operating system platform; generally speaking, the minimalist configuration of operation computing machine is pentiem2 233MHz, 128MB RAM and 1.5GB available hard disk space.
The present invention is suitable for the logic test method and the device of reactor protection system, has the following advantages:
The first, test based on the truth table and the test procedure of CSV form by making up, be convenient to revise and adjust;
The second, full automatic test builds can avoid the people because of error, improves testing efficiency;
The 3rd, generate test result and location defective automatically, be convenient to the investigation of design mistake.
The above only is embodiments of the invention, not in order to restriction the present invention, all any modifications of being done in the spirit and principles in the present invention, is equal to and replaces or improvement etc., all should be included in protection scope of the present invention.