CN103268274A - Test method and test device based on field bus experimental platform - Google Patents
Test method and test device based on field bus experimental platform Download PDFInfo
- Publication number
- CN103268274A CN103268274A CN2013102346743A CN201310234674A CN103268274A CN 103268274 A CN103268274 A CN 103268274A CN 2013102346743 A CN2013102346743 A CN 2013102346743A CN 201310234674 A CN201310234674 A CN 201310234674A CN 103268274 A CN103268274 A CN 103268274A
- Authority
- CN
- China
- Prior art keywords
- module
- functional module
- terminal
- fieldbus
- mode
- 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.)
- Granted
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention provides a test method and a test device based on a field bus experimental platform. The field bus experimental platform comprises an experimental computer, a standard terminal and an experimental terminal. The method comprises the following steps: determining the work mode of each second function module used by a current test task; respectively obtaining a code corresponding to each second function module from a programmable software code library according to the work mode of each second function module; compiling and linking the code corresponding to each second function module according to the linking relationship of each second function module to generate a second executable file; and burning the second executable file to the experimental terminal; receiving second feedback information when the experimental terminal operates the second executable file and first feedback information when a standard terminal operates the first executable file, and using the first and second feedback information as a field bus function test result. Therefore, according to the test method and the test device, the purpose of mastering the inner structure, the operating mode and the working mechanism of the field bus is realized.
Description
Technical field
The application relates to the field bus technique field, particularly a kind of method of testing and device based on the fieldbus experiment porch.
Background technology
Fieldbus is the real-time control communication network with the field controller of the industrial automation bottom and field intelligent instrument apparatus interconnection, described fieldbus is followed ISO(International Standards Organization, ISO (International Standard Organization)) OSI(Open System Interconnection, open system is interconnected) all or part of communications protocol of reference model.
At present, Engineering colleges and universities can use the field bus control system with midget plant, the fieldbus operational process are demonstrated and the globality introduction, so that fieldbus is carried out theoretical analysis and system survey.
Yet the developer can not understand inner structure, the method for operation of fieldbus, the working mechanism of fieldbus from theoretical analysis that fieldbus is carried out and system survey.
Summary of the invention
For solving the problems of the technologies described above, the embodiment of the present application provides a kind of method of testing based on the fieldbus experiment porch and device, with the purpose of the working mechanism of the method for operation of the inner structure that reaches each function of understanding fieldbus, fieldbus, fieldbus and fieldbus, technical scheme is as follows:
A kind of method of testing based on the fieldbus experiment porch, described fieldbus experiment porch comprises the experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores the programmable software code storehouse, described standard terminal comprises a plurality of first functional modules, the code of each described first functional module correspondence is standard code, and first executable file in the described standard terminal can not be revised, described experimental terminal comprises a plurality of second functional modules, and the function that each described second functional module has is corresponding one by one with each function of fieldbus, described first functional module is the identical module of function with described second functional module, wherein, described first executable file carries out the file that compiling link obtains for the code to each described first functional module correspondence, and described method comprises:
Determine the mode of operation of each described second functional module that current test assignment is used;
According to the mode of operation of each described second functional module, from described programmable software code storehouse, obtain the code of each described second functional module correspondence respectively;
According to the linking relationship of each described second functional module, the code of each described second functional module correspondence is carried out compiling link, generate second executable file;
Described second executable file of burning is to described experimental terminal, to carry out the fieldbus functional test;
First feedback information when described first executable file is moved in second feedback information when receiving described experimental terminal and moving described second executable file and described standard terminal, and with described second feedback information and described first feedback information as the fieldbus functional test results.
Preferably, described mode of operation comprises: mode standard, disable mode and from development mode;
Wherein, under mode standard, the code of the described second functional module correspondence is standard code;
Under disable mode, the code of the described second functional module correspondence is empty;
Under development mode, the code that the code of the described second functional module correspondence is write again for the initialization function that provides by described programmable software code storehouse and interface function.
Preferably, in the described experimental terminal in each second functional module and the described standard terminal each first functional module draw by the division to field bus device implementation structure level;
Wherein, each second functional module is respectively in the described experimental terminal: transmitting-receiving driver module, clock synchronization module, communication scheduling module, process binding module, system service module, information management module, file system module;
Wherein, described transmitting-receiving driver module is used for driving the physics R-T unit;
Described clock synchronization module is used for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keep system clock synchronous;
Described communication dispatch module is used for planning fieldbus medium and utilizes mode, so that fieldbus reaches industry determinacy requirement in real time;
Described process binding module is used for the described experimental terminal of binding and described experimental terminal client layer program, to finish communication function;
Described system service module is used for providing the application layer entity access services to described experimental terminal;
Described information management module is used for the attribute of the described experimental terminal of management and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data that produce during for the configuration file of managing described experimental terminal and described experimental terminal operation executable file.
Preferably, described mode of operation according to each described second functional module, the code that obtains each described second functional module respectively from described programmable software code storehouse comprises: according to described each described second functional module mode of operation separately, by manually obtain the code of each described second functional module from described programmable software code storehouse;
Perhaps according to described each described second functional module mode of operation separately, from described programmable software code storehouse, obtain the code of each described second functional module automatically by the compiler toggle program.
A kind of proving installation based on the fieldbus experiment porch, described fieldbus experiment porch comprises the experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores the programmable software code storehouse, described standard terminal comprises a plurality of first functional modules, the code of each described first functional module correspondence is standard code, and first executable file in the described standard terminal can not be revised, described experimental terminal comprises a plurality of second functional modules, and the function that each described second functional module has is corresponding one by one with each function of fieldbus, described first functional module is the identical module of function with described second functional module, wherein, described first executable file carries out the file that compiling link obtains for the code to each described first functional module correspondence, and described device comprises:
First acquiring unit is for the mode of operation of determining each described second functional module that current test assignment is used;
Second acquisition unit is used for the mode of operation according to each definite described second functional module of described first acquiring unit, obtains the code of each described second functional module correspondence respectively from described programmable software code storehouse;
Compilation unit is used for the linking relationship according to each described second functional module, and the code of each described second functional module correspondence that described second acquisition unit is got access to carries out compiling link, generates second executable file;
The burning unit is used for second executable file of the described compilation unit generation of burning to described experimental terminal, to carry out the fieldbus functional test;
Receiving element, first feedback information when described first executable file is moved in second feedback information when be used for receiving described experimental terminal and moving described second executable file and described standard terminal, and with described second feedback information and described first feedback information as the fieldbus functional test results.
Preferably, described mode of operation comprises: mode standard, disable mode and from development mode;
Wherein, under mode standard, the code of the described second functional module correspondence is standard code;
Under disable mode, the code of the described second functional module correspondence is empty;
Under development mode, the code that the code of the described second functional module correspondence is write again for the initialization function that provides by described programmable software code storehouse and interface function.
Preferably, in the described experimental terminal in each second functional module and the described standard terminal each first functional module draw by the division to field bus device implementation structure level;
Wherein, each second functional module is respectively in the described experimental terminal: transmitting-receiving driver module, clock synchronization module, communication scheduling module, process binding module, system service module, information management module, file system module;
Wherein, described transmitting-receiving driver module is used for driving the physics R-T unit;
Described clock synchronization module is used for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keep system clock synchronous;
Described communication dispatch module is used for planning fieldbus medium and utilizes mode, so that fieldbus reaches industry determinacy requirement in real time;
Described process binding module is used for the described experimental terminal of binding and described experimental terminal client layer program, to finish communication function;
Described system service module is used for providing the application layer entity access services to described experimental terminal;
Described information management module is used for the attribute of the described experimental terminal of management and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data that produce during for the configuration file of managing described experimental terminal and described experimental terminal operation executable file.
Preferably, described second acquisition unit specifically is used for according to described each described second functional module mode of operation separately, by manually obtain the code of each described second functional module from described programmable software code storehouse;
Perhaps described second acquisition unit specifically is used for according to described each described second functional module mode of operation separately, obtains the code of each described second functional module automatically from described programmable software code storehouse by the compiler toggle program.
Compared with prior art, the application's beneficial effect is:
In this application, experimental terminal comprises a plurality of second functional modules, and the function that each second functional module has is corresponding one by one with each function of fieldbus, therefore understand each function that to understand fieldbus by each second functional module to experimental terminal, and then draw the inner structure of fieldbus by each function distribution of fieldbus.
In this application, the mode of operation of each second functional module is corresponding with test assignment in the experimental terminal, therefore in different test assignments, each second functional module can conversion mode of operation separately, and second executable file is to generate according to the mode of operation of each second functional module, therefore second executable file of different test assignment correspondences has nothing in common with each other because of the change of the mode of operation of second functional module, feedback information when having nothing in common with each other operation second executable file of different test assignment correspondences as can be known by second executable file of different test assignment correspondences has nothing in common with each other, feedback information during by operation first executable file of the identical different test assignment correspondences as can be known of first executable file of different test assignment correspondences is identical, and then the feedback information during by operation second executable file of different test assignment correspondences has nothing in common with each other, and the identical fieldbus functional test results of different test assignment correspondences as can be known of feedback information during operation first executable file of different test assignment correspondences has nothing in common with each other.Can understand the method for operation of fieldbus and the working mechanism of fieldbus by the fieldbus functional test results that contrasts different test assignment correspondences.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, the accompanying drawing of required use is done to introduce simply in will describing embodiment below, apparently, accompanying drawing in describing below only is some embodiment of the application, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is a kind of process flow diagram of a kind of method of testing based on the fieldbus experiment porch of providing of the application;
Fig. 2 is a kind of structural representation of a kind of proving installation based on the fieldbus experiment porch of providing of the application.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment only is the application's part embodiment, rather than whole embodiment.Based on the embodiment among the application, those of ordinary skills are not making the every other embodiment that obtains under the creative work prerequisite, all belong to the scope of the application's protection.
The application provides a kind of fieldbus experiment porch, wherein the fieldbus experiment porch comprises: the experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores the programmable software code storehouse, described standard terminal comprises a plurality of first functional modules, the mode of operation of each described first functional module is always mode standard, the code that is each described first functional module correspondence is standard code, and first executable file in the described standard terminal can not be revised, described experimental terminal comprises a plurality of second functional modules, and the function that each described second functional module has is corresponding one by one with each function of fieldbus, described first functional module is the identical module of function with described second functional module, wherein, described first executable file carries out the file that compiling link obtains for the code to each described first functional module correspondence.
The fieldbus experiment porch is a field bus system, and wherein, the experimental calculation machine has embedded program editor, compiling, debugging and embedded device burning function simultaneously as field bus management person's active station.The standard terminal is for revising the field bus device of its first executable file, and experimental terminal is for revising the field bus device of its second executable file.
To introduce the method for the fieldbus functional test of carrying out based on the fieldbus experiment porch below in detail.
See also Fig. 1, a kind of process flow diagram of a kind of method of testing based on the fieldbus experiment porch that it shows that the application provides can may further comprise the steps:
Step S11: the mode of operation of determining each described second functional module that current test assignment is used.
In current test assignment, the mode of operation of each second functional module can be set arbitrarily.The mode of operation that sets each second functional module is namely determined the mode of operation of each second functional module that current test assignment is used.
In the present embodiment, the mode of operation of second functional module has three kinds, is respectively mode standard, disable mode and from development mode.Under mode standard, the code of each described second functional module correspondence is standard code, and the fieldbus function of each described second functional module correspondence is standard fieldbus function.Under disable mode, the code of each described second functional module correspondence is empty.Under development mode, the code that the code of each described second functional module correspondence is write again for the initialization function that provides by described programmable software code storehouse and interface function.
Step S12: according to the mode of operation of each described second functional module, from described programmable software code storehouse, obtain the code of each described second functional module correspondence respectively.
In the present embodiment, can be according to the mode of operation of each second functional module, by manually from the programmable software code storehouse, obtaining the code of each second functional module correspondence.After the mode of operation of determining each second functional module, from the programmable software code storehouse, obtained the code of each second functional module correspondence by experimenter's manual operation.
Mode of operation with certain second functional module is mode standard, if be the code that the second functional module correspondence is manually obtained in the example explanation by the code that manually from the programmable code storehouse, obtains this second functional module correspondence, from the programmable software code storehouse, copy the code of this second functional module correspondence or be used for calling the file destination of the code of this second functional module correspondence by the experimenter, and the file destination that the code of this second functional module correspondence that will copy or be used for calls the code of this second functional module correspondence affixes to the engineering compiling window.
When the mode of operation of this second functional module changes to disable mode by mode standard, in the engineering compiling window, get final product with the code of this second functional module correspondence or for the manual deletion of the file destination of the code that calls this second functional module correspondence.
When the mode of operation of this second functional module changes to from development mode by mode standard, in the engineering compiling window, manually delete with the code of this second functional module correspondence or for the file destination of the code that calls this second functional module correspondence, then with this second functional module at code corresponding under development mode or be used for calling this second functional module and be copied to the engineering compiling window at the file destination of code corresponding under development mode, the code write again for the initialization function that provides by the programmable software code storehouse and interface function at code corresponding under development mode of this second functional module wherein.
In the present embodiment, can also from the programmable software code storehouse, obtain the code of each second functional module correspondence by compiler toggle according to the mode of operation of each second functional module.After the mode of operation of determining each second functional module, from the programmable software code storehouse, obtained the code of each second functional module correspondence automatically by compiler toggle by the experimental calculation machine.
In the present embodiment, compiler toggle is a variable, when the mode of operation of certain second functional module is mode standard, compiler toggle can be set to 0, after compiler toggle is set to 0, the experimental calculation chance is obtained the code of this second functional module correspondence under mode standard automatically from the programmable software code storehouse, insert the engineering compiling window.
When the mode of operation of certain second functional module is disable mode, compiler toggle can be set to 1, after compiler toggle is set to 1, the experimental calculation machine obtains the code of this second functional module correspondence under disable mode from the programmable software code storehouse, insert the engineering compiling window, wherein this second functional module corresponding code under disable mode is empty.
When the mode of operation of certain second functional module is during from development mode, compiler toggle can be set to 2, after compiler toggle is set to 2, the experimental calculation machine obtains this second functional module at code corresponding under development mode from the programmable software code storehouse, insert the engineering compiling window, wherein the code write again for the initialization function that provides by the programmable software code storehouse and interface function at code corresponding under development mode of this second functional module.
Step S13: according to the linking relationship of each described second functional module, the code of each described second functional module correspondence is carried out compiling link, generate second executable file.
In the present embodiment, chained file in the programmable software code storehouse records the linking relationship of each second functional module, and chained file is the code in the programmable software code storehouse, according to chained file the code of each second functional module correspondence is carried out compiling link then, generate second executable file at last.
Step S14: described second executable file of burning is to described experimental terminal, to carry out the fieldbus functional test.
In the present embodiment, the experimental calculation machine is burned onto experimental terminal with second executable file, experimental terminal is downloaded described second executable file, and move described second executable file, when experimental terminal brings into operation second executable file, standard terminal first executable file that brings into operation is to carry out the fieldbus functional test.First feedback information that the standard terminal will produce in the time of will moving first executable file is sent to the experimental calculation machine, and second feedback information that experimental terminal will produce in the time of will moving second executable file is sent to the experimental calculation machine.
Step S15: first feedback information when described first executable file is moved in second feedback information when receiving described experimental terminal and moving described second executable file and described standard terminal, and with described second feedback information and described first feedback information as the fieldbus functional test results.
In the present embodiment, first feedback information when described first executable file is moved in second feedback information when being received described experimental terminal and moved described second executable file by the experimental calculation machine and described standard terminal, and with described second feedback information and described first feedback information as the fieldbus functional test results.
In the present embodiment, the mode of operation of each second functional module of experimental terminal is under the mode standard situation in current test assignment, can understand the standard fieldbus function of this second functional module correspondence according to the fieldbus functional test results of current test assignment.
The mode of operation of any one second functional module of experimental terminal is under the situation of disable mode in current test assignment, in the time of can understanding the fieldbus afunction of this second functional module correspondence according to the fieldbus functional test results of current test assignment to the influence of experimental terminal operation.
The mode of operation of any one second functional module of experimental terminal is under the situation of development mode in current test assignment, can judge according to the fieldbus functional test results of current test assignment whether this second functional module is identical with the fieldbus function of this second functional module correspondence under mode standard in fieldbus function corresponding under development mode, if this second functional module is identical with the fieldbus function of this second functional module correspondence under mode standard in fieldbus function corresponding under development mode, the code of writing again that this second functional module correspondence then is described is correct, otherwise, illustrate that the code of writing again of this second functional module correspondence is incorrect.
Be this second functional module in fieldbus function corresponding under development mode and this second functional module under the identical situation of the fieldbus function of correspondence under the mode standard in judged result, can also be according to this second functional module in the fieldbus functional test results under development mode and the fieldbus functional test results of this second functional module under mode standard, relatively whether this second functional module is better than the fieldbus performance of this second functional module correspondence under mode standard in fieldbus performance corresponding under development mode.Pass through comparative result, determining has the excellent poor reason that has in the fieldbus performance of this second functional module correspondence under development mode and under mode standard, by the fieldbus performance of analyzing in this second functional module correspondence under development mode and under mode standard the excellent poor reason that has is arranged, further understand the method for operation of fieldbus and the working mechanism of fieldbus.
Wherein, according to the fieldbus functional test results of current test assignment judge this second functional module fieldbus function corresponding under development mode and this second functional module under mode standard corresponding fieldbus function whether identical detailed process is: whether consistent to information that should second functional module in the information of the first identical functional module of this second functional module function that neutralizes owing to first feedback information in the fieldbus functional test results of this second functional module more current test assignment under mode standard and second feedback information, if unanimity as a result, illustrate that then this second functional module is identical with the fieldbus function of this second functional module correspondence under mode standard in fieldbus function corresponding under development mode, if the result is inconsistent, illustrate that then the fieldbus function of this second functional module correspondence under mode standard in fieldbus function corresponding under development mode and this second functional module is inequality.
In the process of the code of writing this second functional module correspondence again, the experimenter can be familiar with the exploitation of embedded system, the device level programming of communication protocol stack.
In current test assignment, the mode of operation of second functional module of any one in the experimental terminal can not be set to simultaneously mode standard, disable mode and from development mode, but the mode of operation of any one second functional module can have nothing in common with each other in different test assignments.When the mode of operation of any one second functional module has nothing in common with each other in different test assignments, the fieldbus functional test results of each test assignment correspondence has nothing in common with each other, and the test result that has nothing in common with each other according to each test assignment can be understood the method for operation and the working mechanism of the fieldbus function of this second functional module correspondence.Because the mode of operation of any one second functional module can have nothing in common with each other in the experimental terminal, therefore can recognize the method for operation and the working mechanism of the fieldbus function of each second functional module correspondence in different test assignments.
In this application, each first functional module in second functional module of each in the experimental terminal and the standard terminal is by obtaining the division of field bus device implementation structure level.Certainly, each first functional module in second functional module of each in the experimental terminal and the standard terminal also can be obtained by other dividing mode.
Wherein, each second functional module can be respectively in the experimental terminal: transmitting-receiving driver module, clock synchronization module, communication scheduling module, process binding module, system service module, information management module, file system module.
Wherein, described transmitting-receiving driver module is used for driving the physics R-T unit;
Described clock synchronization module is used for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keep system clock synchronous;
Described communication dispatch module is used for planning fieldbus medium and utilizes mode, so that fieldbus reaches industry determinacy requirement in real time; Wherein, planning fieldbus medium utilizes mode to refer to plan when the field bus device node sends data, when take the fieldbus data medium and how long take the fieldbus data medium.It is to clash when avoiding each field bus device node to send data that planning fieldbus medium utilizes the purpose of mode.
Described process binding module is used for the described experimental terminal of binding and described experimental terminal client layer program, to finish communication function;
Described system service module is used for providing the application layer entity access services to described experimental terminal;
Described information management module is used for the attribute of the described experimental terminal of management and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data that produce during for the configuration file of managing described experimental terminal and described experimental terminal operation executable file.
Each of standard terminal first functional module can be the first transmitting-receiving driver module identical with transmitting-receiving driver module function, first clock synchronization module identical with the clock synchronization module function, the first communication scheduling module identical with the communication scheduling functions of modules, the first process binding module identical with process binding module function, the first system service module identical with the system service functions of modules, the first information administration module identical with the information management module function, first file system module identical with the file system module function.
Be that example is elaborated to the method for operation and the working mechanism that can understand the fieldbus function according to the fieldbus functional test results with clock synchronization module in the experimental terminal in the present embodiment now.Wherein, the module identical with clock synchronization module function in the experimental terminal is first clock synchronization module in the standard terminal.
When the clock synchronization module when the mode of operation in the first time test assignment is mode standard, the primary scene bus functionality test result of test assignment can be understood the standard fieldbus function of clock synchronization module correspondence according to the first time.
When the clock synchronization module when the mode of operation in the second time test assignment is disable mode, according to the second time test assignment secondary scene bus test result can understand the fieldbus afunction of clock synchronization module correspondence the time to the influence of experimental terminal operation, thereby understand the necessity that the fieldbus function of clock synchronization module correspondence exists.
When the clock synchronization module is during from development mode in the mode of operation in the test assignment for the third time, the code that the code of clock synchronization module correspondence is write again for the initialization function that provides by the programmable software code storehouse and interface function, can judge according to the fieldbus functional test results of current test assignment whether clock synchronization module is identical with the fieldbus function of clock synchronization module correspondence under mode standard in fieldbus function corresponding under development mode, if clock synchronization module is identical with the fieldbus function of clock synchronization module correspondence under mode standard in fieldbus function corresponding under development mode, the code of writing again that the clock synchronization module correspondence then is described is correct, otherwise, illustrate that the code of writing again of clock synchronization module correspondence is incorrect.
Be this clock synchronization module at fieldbus function corresponding under development mode and this clock synchronization module under the identical situation of the fieldbus function of correspondence under the mode standard in judged result, can also be according to this clock synchronization module in the fieldbus functional test results under development mode and the fieldbus functional test results of this clock synchronization module under mode standard, relatively whether this clock synchronization module is better than the fieldbus performance of this clock synchronization module correspondence under mode standard in fieldbus performance corresponding under development mode.Pass through comparative result, determining has the excellent poor reason that has in the fieldbus performance of this clock synchronization module correspondence under development mode and under mode standard, by the fieldbus performance of analyzing in this clock synchronization module correspondence under development mode and under mode standard the excellent poor reason that has is arranged, further understand the method for operation of fieldbus and the working mechanism of fieldbus.
Wherein, because the fieldbus function of the fieldbus function of the first clock synchronization module correspondence of standard terminal and the clock synchronization module of experimental terminal correspondence under mode standard is identical, therefore in current test assignment, judge clock synchronization module when whether identical whether with clock synchronization module corresponding fieldbus function under mode standard fieldbus function corresponding under development mode, only need judge that clock synchronization module is the fieldbus function of the first clock synchronization module correspondence of the fieldbus function of correspondence under development mode and standard terminal identical getting final product whether according to the fieldbus functional test results of current test assignment.
By the comparison clock synchronization module in first time test assignment corresponding standard fieldbus function and clock synchronization module in the second time test assignment during corresponding fieldbus afunction to the influence of fieldbus experiment porch operation, understand the effect of the fieldbus function of clock synchronization module correspondence.
By the comparison clock synchronization module in first test assignment corresponding fieldbus function, in second test assignment during corresponding fieldbus afunction to the influence of fieldbus experiment porch operation and the corresponding code that passes through to write is again realized in the 3rd test assignment fieldbus function, can understand the method for operation and the working mechanism of the fieldbus function of clock synchronization module correspondence.
The fieldbus functional test results is the test result of current test assignment, and after test assignment changed, the fieldbus functional test results can change with the change of test assignment.
In this application, experimental terminal comprises a plurality of second functional modules, and the function that each second functional module has is corresponding one by one with each function of fieldbus, therefore understand each function that to understand fieldbus by each second functional module to experimental terminal, and then draw the inner structure of fieldbus by each function distribution of fieldbus.
In this application, the mode of operation of each second functional module is corresponding with test assignment in the experimental terminal, therefore in different test assignments, each second functional module can conversion mode of operation separately, and second executable file is to generate according to the mode of operation of each second functional module, therefore second executable file of different test assignment correspondences has nothing in common with each other because of the change of the mode of operation of second functional module, feedback information when having nothing in common with each other operation second executable file of different test assignment correspondences as can be known by second executable file of different test assignment correspondences has nothing in common with each other, feedback information during by operation first executable file of the identical different test assignment correspondences as can be known of first executable file of different test assignment correspondences is identical, and then the feedback information during by operation second executable file of different test assignment correspondences has nothing in common with each other, and the identical fieldbus functional test results of different test assignment correspondences as can be known of feedback information during operation first executable file of different test assignment correspondences has nothing in common with each other.Can understand the method for operation of fieldbus and the working mechanism of fieldbus by the fieldbus functional test results that contrasts different test assignment correspondences.
When carrying out the fieldbus functional test, do not limit the number of experimental terminal in the experiment porch, when having only an experimental terminal in the experiment porch, need to understand the method for operation of fieldbus and the working mechanism of fieldbus by the fieldbus functional test results of the different test assignment correspondences of contrast.
In experiment porch, comprise a plurality of experimental terminal, and when the functional module that each experimental terminal comprises is identical, can be in test assignment, the mode of operation of each experimental terminal identical functions module is had nothing in common with each other, under the situation that the mode of operation of each experimental terminal identical functions module has nothing in common with each other, second executable file that each experimental terminal obtains has nothing in common with each other, because each self-corresponding second executable file of each experimental terminal has nothing in common with each other, feedback information when each experimental terminal is moved each self-corresponding second executable file has nothing in common with each other, feedback information when first executable file is moved in the feedback information when moving each self-corresponding second executable file according to each experimental terminal and standard terminal can be understood the method for operation of fieldbus and the working mechanism of fieldbus.
When comprising an experimental terminal in the experiment porch, need to understand the method for operation of fieldbus and the working mechanism of fieldbus by the fieldbus functional test results of the different test assignment correspondences of contrast, owing to repeatedly test, so inefficiency, but owing to only need an experimental terminal, therefore the cost of test is low; When comprising a plurality of experimental terminal in the experiment porch, owing to can understand the method for operation of fieldbus and the working mechanism of fieldbus by once testing, so high efficiency, but owing to need a plurality of experimental terminal, testing cost height.Certainly in actual applications, can select corresponding experiment porch to carry out the fieldbus functional test according to actual conditions.But no matter the number of the experimental terminal in the experiment porch is several, and the method for carrying out on-the-spot functional test is constant, a kind of method of testing based on the fieldbus experiment porch as shown in Figure 1.
When carrying out the fieldbus functional test, do not limit the number of standard terminal in the experiment porch yet, but more accurate for the fieldbus functional test results that guarantees to be obtained by the fieldbus experiment porch, at least two standard terminals can be set.Arrange at least two standard terminals can make the fieldbus functional test results more accurately former because: if the standard terminal of fieldbus experiment porch has two, be respectively standard terminal A and standard terminal B, when standard terminal A or standard terminal B break down, the feedback information of standard terminal A is different with the feedback information of standard terminal B, one of them fault occurred among standard terminal A and the standard terminal B as can be known by different feedback informations, after one of them breaks down in discovery, fault is got rid of, after fault is got rid of, proceeded experiment again.If the standard terminal has only one in the fieldbus experiment porch, when break down in the standard terminal, the feedback information that obtains is wrong and can not find that the feedback information that obtains is that standard terminal by fault obtains, and causes experimental result inaccurate.
As shown in the above, the fieldbus experiment porch has two standard terminals than the fieldbus experiment porch standard terminal to be arranged, and the fieldbus functional test results that obtains is more accurate.When the standard terminal of fieldbus experiment porch during more than two, the fieldbus functional test results that the fieldbus functional test results that obtains obtains when the standard terminal of fieldbus experiment porch is two is more accurate.
Corresponding with above-described embodiment, the application provides a kind of a kind of structural representation of the proving installation based on the fieldbus experiment porch, see also Fig. 2, wherein, the fieldbus experiment porch comprises the experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores the programmable software code storehouse, described standard terminal comprises a plurality of first functional modules, the code of each described first functional module correspondence is standard code, and first executable file in the described standard terminal can not be revised, described experimental terminal comprises a plurality of second functional modules, and the function that each described second functional module has is corresponding one by one with each function of fieldbus, described first functional module is the identical module of function with described second functional module, wherein, described first executable file is for carrying out the file that compiling link obtains to the code of each described first functional module correspondence, comprises based on the proving installation of fieldbus experiment porch: first acquiring unit 201, second acquisition unit 202, compilation unit 203, burning unit 204 and receiving element 205.Wherein:
First acquiring unit 201 is for the mode of operation of determining each described second functional module that current test assignment is used.
In the present embodiment, described mode of operation comprises: mode standard, disable mode and from development mode;
Wherein, under mode standard, the code of the described second functional module correspondence is standard code;
Under disable mode, the code of the described second functional module correspondence is empty;
Under development mode, the code that the code of the described second functional module correspondence is write again for the initialization function that provides by described programmable software code storehouse and interface function.
In the present embodiment, second acquisition unit 202 concrete described each described second functional module of the foundation mode of operations separately that are used for are by manually obtaining the code of each described second functional module from described programmable software code storehouse.
Perhaps described second acquisition unit 202 specifically is used for according to described each described second functional module mode of operations separately, obtains the code of each described second functional module automatically from described programmable software code storehouse by the compiler toggle program.
Burning unit 204 is used for second executable file of described compilation unit 203 generations of burning to described experimental terminal, to carry out the fieldbus functional test.
Receiving element 205, first feedback information when described first executable file is moved in second feedback information when be used for receiving described experimental terminal and moving described second executable file and described standard terminal, and with described second feedback information and described first feedback information as the fieldbus functional test results.
In the present embodiment, in the experimental terminal in each second functional module and the described standard terminal each first functional module draw by the division to field bus device implementation structure level;
Wherein, each second functional module is respectively in the described experimental terminal: transmitting-receiving driver module, clock synchronization module, communication scheduling module, process binding module, system service module, information management module, file system module;
Wherein, described transmitting-receiving driver module is used for driving the physics R-T unit;
Described clock synchronization module is used for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keep system clock synchronous;
Described communication dispatch module is used for planning fieldbus medium and utilizes mode, so that fieldbus reaches industry determinacy requirement in real time;
Described process binding module is used for the described experimental terminal of binding and described experimental terminal client layer program, to finish communication function;
Described system service module is used for providing the application layer entity access services to described experimental terminal;
Described information management module is used for the attribute of the described experimental terminal of management and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data that produce during for the configuration file of managing described experimental terminal and described experimental terminal operation executable file.
In the present embodiment, do not limit the number of standard terminal in the experiment porch, but more accurate for the fieldbus functional test results that guarantees to be obtained by the fieldbus experiment porch, at least two standard terminals can be set.Arrange at least two standard terminals can make the fieldbus functional test results more accurately reason can make fieldbus functional test results reason more accurately based at least two standard terminals are set in the method for testing of fieldbus experiment porch with reference to a kind of shown in Fig. 1, do not repeat them here.
Need to prove that each embodiment in this instructions all adopts the mode of going forward one by one to describe, what each embodiment stressed is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.For device class embodiment, because it is similar substantially to method embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
At last, also need to prove, in this article, relational terms such as first and second grades only is used for an entity or operation are made a distinction with another entity or operation, and not necessarily requires or hint and have the relation of any this reality or in proper order between these entities or the operation.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby make and comprise that process, method, article or the equipment of a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or also be included as the intrinsic key element of this process, method, article or equipment.Do not having under the situation of more restrictions, the key element that is limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
More than a kind of method of testing and device based on the fieldbus experiment porch that the application is provided be described in detail, used specific case herein the application's principle and embodiment are set forth, the explanation of above embodiment just is used for helping to understand the application's method and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to the application's thought, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application.
Claims (8)
1. method of testing based on the fieldbus experiment porch, it is characterized in that, described fieldbus experiment porch comprises the experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores the programmable software code storehouse, described standard terminal comprises a plurality of first functional modules, the code of each described first functional module correspondence is standard code, and first executable file in the described standard terminal can not be revised, described experimental terminal comprises a plurality of second functional modules, and the function that each described second functional module has is corresponding one by one with each function of fieldbus, described first functional module is the identical module of function with described second functional module, wherein, described first executable file carries out the file that compiling link obtains for the code to each described first functional module correspondence, and described method comprises:
Determine the mode of operation of each described second functional module that current test assignment is used;
According to the mode of operation of each described second functional module, from described programmable software code storehouse, obtain the code of each described second functional module correspondence respectively;
According to the linking relationship of each described second functional module, the code of each described second functional module correspondence is carried out compiling link, generate second executable file;
Described second executable file of burning is to described experimental terminal, to carry out the fieldbus functional test;
First feedback information when described first executable file is moved in second feedback information when receiving described experimental terminal and moving described second executable file and described standard terminal, and with described second feedback information and described first feedback information as the fieldbus functional test results.
2. method according to claim 1 is characterized in that, described mode of operation comprises: mode standard, disable mode and from development mode;
Wherein, under mode standard, the code of the described second functional module correspondence is standard code;
Under disable mode, the code of the described second functional module correspondence is empty;
Under development mode, the code that the code of the described second functional module correspondence is write again for the initialization function that provides by described programmable software code storehouse and interface function.
3. method according to claim 1 is characterized in that, in the described experimental terminal in each second functional module and the described standard terminal each first functional module draw by the division to field bus device implementation structure level;
Wherein, each second functional module is respectively in the described experimental terminal: transmitting-receiving driver module, clock synchronization module, communication scheduling module, process binding module, system service module, information management module, file system module;
Wherein, described transmitting-receiving driver module is used for driving the physics R-T unit;
Described clock synchronization module is used for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keep system clock synchronous;
Described communication dispatch module is used for planning fieldbus medium and utilizes mode, so that fieldbus reaches industry determinacy requirement in real time;
Described process binding module is used for the described experimental terminal of binding and described experimental terminal client layer program, to finish communication function;
Described system service module is used for providing the application layer entity access services to described experimental terminal;
Described information management module is used for the attribute of the described experimental terminal of management and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data that produce during for the configuration file of managing described experimental terminal and described experimental terminal operation executable file.
4. method according to claim 1, it is characterized in that, described mode of operation according to each described second functional module, the code that obtains each described second functional module respectively from described programmable software code storehouse comprises: according to described each described second functional module mode of operation separately, by manually obtain the code of each described second functional module from described programmable software code storehouse;
Perhaps according to described each described second functional module mode of operation separately, from described programmable software code storehouse, obtain the code of each described second functional module automatically by the compiler toggle program.
5. proving installation based on the fieldbus experiment porch, it is characterized in that, described fieldbus experiment porch comprises the experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores the programmable software code storehouse, described standard terminal comprises a plurality of first functional modules, the code of each described first functional module correspondence is standard code, and first executable file in the described standard terminal can not be revised, described experimental terminal comprises a plurality of second functional modules, and the function that each described second functional module has is corresponding one by one with each function of fieldbus, described first functional module is the identical module of function with described second functional module, wherein, described first executable file carries out the file that compiling link obtains for the code to each described first functional module correspondence, and described device comprises:
First acquiring unit is for the mode of operation of determining each described second functional module that current test assignment is used;
Second acquisition unit is used for the mode of operation according to each definite described second functional module of described first acquiring unit, obtains the code of each described second functional module correspondence respectively from described programmable software code storehouse;
Compilation unit is used for the linking relationship according to each described second functional module, and the code of each described second functional module correspondence that described second acquisition unit is got access to carries out compiling link, generates second executable file;
The burning unit is used for second executable file of the described compilation unit generation of burning to described experimental terminal, to carry out the fieldbus functional test;
Receiving element, first feedback information when described first executable file is moved in second feedback information when be used for receiving described experimental terminal and moving described second executable file and described standard terminal, and with described second feedback information and described first feedback information as the fieldbus functional test results.
6. device according to claim 5 is characterized in that, described mode of operation comprises: mode standard, disable mode and from development mode;
Wherein, under mode standard, the code of the described second functional module correspondence is standard code;
Under disable mode, the code of the described second functional module correspondence is empty;
Under development mode, the code that the code of the described second functional module correspondence is write again for the initialization function that provides by described programmable software code storehouse and interface function.
7. device according to claim 5 is characterized in that, in the described experimental terminal in each second functional module and the described standard terminal each first functional module draw by the division to field bus device implementation structure level;
Wherein, each second functional module is respectively in the described experimental terminal: transmitting-receiving driver module, clock synchronization module, communication scheduling module, process binding module, system service module, information management module, file system module;
Wherein, described transmitting-receiving driver module is used for driving the physics R-T unit;
Described clock synchronization module is used for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keep system clock synchronous;
Described communication dispatch module is used for planning fieldbus medium and utilizes mode, so that fieldbus reaches industry determinacy requirement in real time;
Described process binding module is used for the described experimental terminal of binding and described experimental terminal client layer program, to finish communication function;
Described system service module is used for providing the application layer entity access services to described experimental terminal;
Described information management module is used for the attribute of the described experimental terminal of management and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data that produce during for the configuration file of managing described experimental terminal and described experimental terminal operation executable file.
8. device according to claim 5, it is characterized in that, described second acquisition unit specifically is used for according to described each described second functional module mode of operation separately, by manually obtain the code of each described second functional module from described programmable software code storehouse;
Perhaps described second acquisition unit specifically is used for according to described each described second functional module mode of operation separately, obtains the code of each described second functional module automatically from described programmable software code storehouse by the compiler toggle program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310234674.3A CN103268274B (en) | 2013-06-09 | 2013-06-09 | A kind of method of testing based on fieldbus experiment porch and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310234674.3A CN103268274B (en) | 2013-06-09 | 2013-06-09 | A kind of method of testing based on fieldbus experiment porch and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103268274A true CN103268274A (en) | 2013-08-28 |
CN103268274B CN103268274B (en) | 2015-11-18 |
Family
ID=49011906
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310234674.3A Active CN103268274B (en) | 2013-06-09 | 2013-06-09 | A kind of method of testing based on fieldbus experiment porch and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103268274B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104579721A (en) * | 2013-10-10 | 2015-04-29 | 施耐德电器工业公司 | Communication device and relay protection device |
WO2017198198A1 (en) * | 2016-05-19 | 2017-11-23 | 中兴通讯股份有限公司 | Software compiling method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002163108A (en) * | 2000-11-24 | 2002-06-07 | Sharp Corp | Software test version generating method and software test version generating device |
US20090119647A1 (en) * | 2007-11-01 | 2009-05-07 | Eun Young Kim | Device and method for inspecting software for vulnerabilities |
CN102479132A (en) * | 2010-11-30 | 2012-05-30 | 英业达股份有限公司 | Test system and test method for multiple chips |
CN102681924A (en) * | 2011-04-25 | 2012-09-19 | 中国电子科技集团公司第三十八研究所 | Software-hardware co-verification platform |
-
2013
- 2013-06-09 CN CN201310234674.3A patent/CN103268274B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002163108A (en) * | 2000-11-24 | 2002-06-07 | Sharp Corp | Software test version generating method and software test version generating device |
US20090119647A1 (en) * | 2007-11-01 | 2009-05-07 | Eun Young Kim | Device and method for inspecting software for vulnerabilities |
CN102479132A (en) * | 2010-11-30 | 2012-05-30 | 英业达股份有限公司 | Test system and test method for multiple chips |
CN102681924A (en) * | 2011-04-25 | 2012-09-19 | 中国电子科技集团公司第三十八研究所 | Software-hardware co-verification platform |
Non-Patent Citations (2)
Title |
---|
MARCO RONA等: "Automating the Device Interface Board Modeling for Virtual Test", 《PROCEEDING OF THE EIGHTH IEEE EUROPEAN TEST WORKSHOP》 * |
陈鹏等: "EPA网络芯片验证与测试", 《开发研究与设计技术》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104579721A (en) * | 2013-10-10 | 2015-04-29 | 施耐德电器工业公司 | Communication device and relay protection device |
CN104579721B (en) * | 2013-10-10 | 2018-07-24 | 施耐德电器工业公司 | Communication device and protective relaying device |
US10560547B2 (en) | 2013-10-10 | 2020-02-11 | Schneider Electric Industries Sas | Communication apparatus and relay protection apparatus |
WO2017198198A1 (en) * | 2016-05-19 | 2017-11-23 | 中兴通讯股份有限公司 | Software compiling method and device |
Also Published As
Publication number | Publication date |
---|---|
CN103268274B (en) | 2015-11-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109388566A (en) | A kind of code coverage rate analysis method, apparatus, equipment and storage medium | |
CN102855178B (en) | Method and device for generating Mock base during unit test | |
Mathias et al. | Automatic model generation for virtual commissioning based on plant engineering data | |
CN106330618A (en) | Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses | |
CN104424088A (en) | Software testing method and device | |
CN103136406A (en) | Method for automatic generation of function code for simulation through visualization application program | |
CN102375778A (en) | Method and system for automatically testing digital signal processor (DSP) | |
CN105608258A (en) | Model based system design and information flow visualization simulation system and method | |
CN103455413A (en) | Method, device and system for interaction scenario test data processing of communication terminals | |
CN110968509B (en) | Method and system for batch customizing of variables | |
CN101808356A (en) | Protocol simulation system for TD-SCDMA terminal protocol conformance tests | |
CN105786695A (en) | Data test method and system | |
CN105718259A (en) | Eclipse based rapid component plugging development method | |
Bellettini et al. | Mardigras: Simplified building of reachability graphs on large clusters | |
CN103780455A (en) | TETRA digit cluster protocol test method and system based on TTCN-3 | |
CN103675529B (en) | The protective relaying device automatic test approach of feature based word and device | |
CN103268274A (en) | Test method and test device based on field bus experimental platform | |
CN110096304A (en) | Task construction method, device, equipment and storage medium based on Jenkins | |
CN104703197A (en) | Terminal protocol consistency testing platform and terminal protocol consistency testing method based on TTCN-3 | |
CN104750468A (en) | Server side topological data conversion method and device | |
CN113452556A (en) | Product skill configuration method and device, storage medium and electronic device | |
CN103984540A (en) | Method and device for generating hardware interface running program | |
CN105447003A (en) | Parameter set generation method and device | |
US8160843B2 (en) | Device and method for planning a production unit | |
CN105162645A (en) | Interoperability test method based on PIIF configuration |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |