CN103268274B - A kind of method of testing based on fieldbus experiment porch and device - Google Patents

A kind of method of testing based on fieldbus experiment porch and device Download PDF

Info

Publication number
CN103268274B
CN103268274B CN201310234674.3A CN201310234674A CN103268274B CN 103268274 B CN103268274 B CN 103268274B CN 201310234674 A CN201310234674 A CN 201310234674A CN 103268274 B CN103268274 B CN 103268274B
Authority
CN
China
Prior art keywords
functional module
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.)
Active
Application number
CN201310234674.3A
Other languages
Chinese (zh)
Other versions
CN103268274A (en
Inventor
冯冬芹
褚健
陈建飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZHEJIANG SUPCON RESEARCH Co Ltd
Original Assignee
ZHEJIANG SUPCON RESEARCH Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZHEJIANG SUPCON RESEARCH Co Ltd filed Critical ZHEJIANG SUPCON RESEARCH Co Ltd
Priority to CN201310234674.3A priority Critical patent/CN103268274B/en
Publication of CN103268274A publication Critical patent/CN103268274A/en
Application granted granted Critical
Publication of CN103268274B publication Critical patent/CN103268274B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

This application provides a kind of method of testing based on fieldbus experiment porch, fieldbus experiment porch comprises experimental calculation machine, standard terminal and experimental terminal, and described method comprises: the mode of operation determining each second functional module that current test assignment uses; According to the mode of operation of each second functional module, from programmable software code storehouse, obtain code corresponding to each second functional module respectively; According to the linking relationship of each second functional module, the code corresponding to each second functional module carries out compiling link, generates the second executable file; Burning second executable file is to experimental terminal; Receive the first feedback information when the first executable file is run in the second feedback information when experimental terminal runs the second executable file and standard terminal, and using described second feedback information and described first feedback information as fieldbus functional test results.Therefore the application reaches the object of inner structure, the method for operation and the working mechanism understanding fieldbus.

Description

A kind of method of testing based on fieldbus experiment porch and device
Technical field
The application relates to field bus technique field, particularly a kind of method of testing based on fieldbus experiment porch and device.
Background technology
Fieldbus is the real-time communication control network by the field controller of the industrial automation bottom and field intelligent instrument apparatus interconnection, described fieldbus follows ISO (InternationalStandardsOrganization, ISO (International Standard Organization)) all or part of communications protocol of OSI (OpenSystemInterconnection, open system interconnection) reference model.
At present, Engineering colleges and universities can use the field bus control system with midget plant, demonstrate and globality introduction fieldbus operational process, to carry out theoretical analysis and system survey to fieldbus.
But developer can not understand the working mechanism of the inner structure of fieldbus, the method for operation, fieldbus from the theoretical analysis carried out fieldbus 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 fieldbus experiment porch and device, to reach the object of the working mechanism of each function, the inner structure of fieldbus, the method for operation of fieldbus and the fieldbus of understanding fieldbus, technical scheme is as follows:
A kind of method of testing based on fieldbus experiment porch, described fieldbus experiment porch comprises experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores programmable software code storehouse, described standard terminal is the field bus device can not revising its first executable file, described standard terminal comprises multiple first functional module, code corresponding to each described first functional module is standard code, and the first executable file in described standard terminal can not be revised, described experimental terminal is to revise the field bus device of its second executable file, described experimental terminal comprises multiple second functional module, and each function one_to_one corresponding of the function that described in each, the second functional module has and fieldbus, described first functional module is the module that function is identical with described second functional module, wherein, described first executable file is the file that the code corresponding to each described first functional module carries out compiling link and obtain, described method comprises:
Determine the mode of operation of each described second functional module that current test assignment uses;
According to the mode of operation of each described second functional module, from described programmable software code storehouse, obtain code corresponding to each described second functional module respectively;
According to the linking relationship of each described second functional module, the code corresponding to each described second functional module carries out compiling link, generates the second executable file;
Second executable file described in burning is described experimental terminal extremely, to carry out fieldbus functional test;
Receive the first feedback information when described first executable file is run in the second feedback information when described experimental terminal runs described second executable file and described standard terminal, and using described second feedback information and described first feedback information as fieldbus functional test results.
Preferably, described mode of operation comprises: mode standard, disable mode and from development mode;
Wherein, under mode standard, code corresponding to described second functional module is standard code;
In the disable mode, the code that described second functional module is corresponding is empty;
Under development mode, the code that code corresponding to described second functional module is write again for the initialization function that provided by described programmable software code storehouse and interface function.
Preferably, in described experimental terminal in each second functional module and described standard terminal each first functional module by drawing the division of field bus device layers time;
Wherein, in described experimental terminal, each second functional module is respectively: 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 for driving physics R-T unit;
Described clock synchronization module, for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keeping system clock synchronous;
Described communication scheduling module, for planning Fieldbus medium Land use systems, reaches industry determinacy requirement in real time to make fieldbus;
Described process binding module, for binding described experimental terminal and described experimental terminal client layer program, to complete communication function;
Described system service module, for providing application layer entity access services to described experimental terminal;
Described information management module, for managing the attribute of described experimental terminal and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data produced when configuration file and described experimental terminal for managing described experimental terminal run executable file.
Preferably, the described mode of operation according to each described second functional module, the code obtaining 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, from described programmable software code storehouse, manually obtain the code of each described second functional module;
Or according to described each described second functional module mode of operation separately, from described programmable software code storehouse, automatically obtained the code of each described second functional module by compiler toggle program.
A kind of proving installation based on fieldbus experiment porch, described fieldbus experiment porch comprises experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores programmable software code storehouse, described standard terminal is the field bus device can not revising its first executable file, described standard terminal comprises multiple first functional module, code corresponding to each described first functional module is standard code, and the first executable file in described standard terminal can not be revised, described experimental terminal is to revise the field bus device of its second executable file, described experimental terminal comprises multiple second functional module, and each function one_to_one corresponding of the function that described in each, the second functional module has and fieldbus, described first functional module is the module that function is identical with described second functional module, wherein, described first executable file is the file that the code corresponding to each described first functional module carries out compiling link and obtain, described device comprises:
First acquiring unit, for determining the mode of operation of each described second functional module that current test assignment uses;
Second acquisition unit, for the mode of operation of each described second functional module determined according to described first acquiring unit, obtains code corresponding to each described second functional module respectively from described programmable software code storehouse;
Compilation unit, for the linking relationship according to each described second functional module, code corresponding to each described second functional module got described second acquisition unit carries out compiling link, generates the second executable file;
Burning unit, for the second executable file extremely described experimental terminal that compilation unit described in burning generates, to carry out fieldbus functional test;
Receiving element, for receiving the first feedback information when described first executable file is run in the second feedback information when described experimental terminal runs described second executable file and described standard terminal, and using described second feedback information and described first feedback information as fieldbus functional test results.
Preferably, described mode of operation comprises: mode standard, disable mode and from development mode;
Wherein, under mode standard, code corresponding to described second functional module is standard code;
In the disable mode, the code that described second functional module is corresponding is empty;
Under development mode, the code that code corresponding to described second functional module is write again for the initialization function that provided by described programmable software code storehouse and interface function.
Preferably, in described experimental terminal in each second functional module and described standard terminal each first functional module by drawing the division of field bus device layers time;
Wherein, in described experimental terminal, each second functional module is respectively: 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 for driving physics R-T unit;
Described clock synchronization module, for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keeping system clock synchronous;
Described communication scheduling module, for planning Fieldbus medium Land use systems, reaches industry determinacy requirement in real time to make fieldbus;
Described process binding module, for binding described experimental terminal and described experimental terminal client layer program, to complete communication function;
Described system service module, for providing application layer entity access services to described experimental terminal;
Described information management module, for managing the attribute of described experimental terminal and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data produced when configuration file and described experimental terminal for managing described experimental terminal run executable file.
Preferably, described second acquisition unit, specifically for according to described each described second functional module mode of operation separately, manually obtains the code of each described second functional module from described programmable software code storehouse;
Or described second acquisition unit, specifically 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 compiler toggle program.
Compared with prior art, the beneficial effect of the application is:
In this application, experimental terminal comprises multiple second functional module, and each function one_to_one corresponding of the function that each second functional module has and fieldbus, therefore by understanding to each second functional module of experimental terminal each function can understanding fieldbus, and then the inner structure of fieldbus is drawn by each function distribution of fieldbus.
In this application, in experimental terminal, the mode of operation of each second functional module is corresponding with test assignment, therefore in different test assignments, each second functional module can convert respective mode of operation, and the second executable file generates according to the mode of operation of each second functional module, therefore the second executable file that different test assignment is corresponding is different because of the change of the mode of operation of the second functional module, different by feedback information during operation the second executable file that the different known different test assignment of the second executable file that different test assignment is corresponding is corresponding, identical by feedback information during operation the first executable file that the identical known different test assignment of the first executable file that different test assignment is corresponding is corresponding, and then it is different by feedback information during operation the second executable file that different test assignment is corresponding, fieldbus functional test results corresponding to the identical known different test assignment of feedback information during operation the first executable file corresponding to different test assignment is different.The method of operation of fieldbus and the working mechanism of fieldbus can be understood by contrasting fieldbus functional test results corresponding to different test assignment.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the application, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of process flow diagram of a kind of method of testing based on fieldbus experiment porch that the application provides;
Fig. 2 is a kind of structural representation of a kind of proving installation based on fieldbus experiment porch that the application provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, be clearly and completely described the technical scheme in the embodiment of the present application, obviously, described embodiment is only some embodiments of the present application, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all belong to the scope of the application's protection.
This application provides a kind of fieldbus experiment porch, wherein fieldbus experiment porch comprises: experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores programmable software code storehouse, described standard terminal comprises multiple first functional module, the mode of operation of each described first functional module is always mode standard, namely the code that each described first functional module is corresponding is standard code, and the first executable file in described standard terminal can not be revised, described experimental terminal comprises multiple second functional module, and each function one_to_one corresponding of the function that described in each, the second functional module has and fieldbus, described first functional module is the module that function is identical with described second functional module, wherein, described first executable file is the file that the code corresponding to each described first functional module carries out compiling link and obtain.
Fieldbus experiment porch is a field bus system, and wherein, experimental calculation machine, as field bus management person's active station, has embedded program editor, compiling, debugging and embedded device burning function simultaneously.Standard terminal is the field bus device can not revising its first executable file, and experimental terminal is to revise the field bus device of its second executable file.
The method of the fieldbus functional test carried out based on fieldbus experiment porch will be introduced in detail below.
Refer to Fig. 1, it illustrates a kind of process flow diagram of a kind of method of testing based on fieldbus experiment porch that the application provides, can comprise the following steps:
Step S11: the mode of operation determining each described second functional module that current test assignment uses.
In current test assignment, the mode of operation of each second functional module can be set arbitrarily.Namely the mode of operation setting each second functional module determines the mode of operation of each second functional module that current test assignment uses.
In the present embodiment, the mode of operation of the second functional module has three kinds, is respectively mode standard, disable mode and from development mode.Under mode standard, code corresponding to each described second functional module is standard code, and fieldbus function corresponding to each described second functional module is standard fieldbus function.In the disable mode, the code that each described second functional module is corresponding is empty.Under development mode, the code that code corresponding to each described second functional module is write again for the initialization function that provided by described programmable software code storehouse and interface function.
Step S12: according to the mode of operation of each described second functional module, obtains code corresponding to each described second functional module respectively from described programmable software code storehouse.
In the present embodiment, according to the mode of operation of each second functional module, code corresponding to each second functional module can manually be obtained from programmable software code storehouse.After the mode of operation determining each second functional module, from programmable software code storehouse, obtain code corresponding to each second functional module by experimenter's manual operation.
With the mode of operation of certain the second functional module for mode standard, if manually obtaining code corresponding to this second functional module from programmable code storehouse is the code that example illustrates that manually acquisition the second functional module is corresponding, from programmable software code storehouse, copy code corresponding to this second functional module or the file destination for calling code corresponding to this second functional module by experimenter, and code corresponding for this second functional module copied or the file destination that is used for calling code corresponding to this second functional module are affixed to engineering compiling window.
When the mode of operation of this second functional module changes to disable mode by mode standard, in engineering compiling window, code corresponding for this second functional module or the file destination that is used for calling code corresponding to this second functional module are manually deleted.
When the mode of operation of this second functional module is changed to from development mode by mode standard, in engineering compiling window, code corresponding for this second functional module or the file destination that is used for calling code corresponding to this second functional module are manually deleted, then by this second functional module at code corresponding under development mode or be used for calling this second functional module and be copied to engineering compiling window at the file destination of code corresponding under development mode, the wherein code again write for the initialization function that provided by programmable software code storehouse and interface function at code corresponding under development mode of this second functional module.
In the present embodiment, according to the mode of operation of each second functional module, code corresponding to each second functional module can also be obtained by compiler toggle from programmable software code storehouse.After the mode of operation determining each second functional module, from programmable software code storehouse, automatically obtain code corresponding to each second functional module by experimental calculation machine by compiler toggle.
In the present embodiment, compiler toggle is a variable, when the mode of operation of certain the second functional module is mode standard, compiler toggle can be set to 0, after compiler toggle is set to 0, experimental calculation chance obtains this second functional module code corresponding under mode standard automatically from programmable software code storehouse, inserts engineering compiling window.
When the mode of operation of certain the second functional module is disable mode, compiler toggle can be set to 1, after compiler toggle is set to 1, experimental calculation machine obtains this second functional module code corresponding in the disable mode from programmable software code storehouse, insert engineering compiling window, the code that wherein this second functional module is corresponding is in the disable mode empty.
When the mode of operation of certain the second functional module is from development mode, compiler toggle can be set to 2, after compiler toggle is set to 2, experimental calculation machine obtains this second functional module at code corresponding under development mode from programmable software code storehouse, insert engineering compiling window, wherein the code again write for the initialization function that provided by 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 corresponding to each described second functional module carries out compiling link, generates the second executable file.
In the present embodiment, the linking relationship of each second functional module of the chained file record in programmable software code storehouse, and chained file is the code in programmable software code storehouse, then carry out compiling link according to the code that chained file is corresponding to each second functional module, finally generate the second executable file.
Step S14: the second executable file described in burning is described experimental terminal extremely, to carry out fieldbus functional test.
In the present embodiment, second executable file is burned onto experimental terminal by experimental calculation machine, experimental terminal downloads described second executable file, and run described second executable file, experimental terminal brings into operation while the second executable file, standard terminal brings into operation the first executable file, to carry out fieldbus functional test.The first feedback information produced during operation the first executable file is sent to experimental calculation machine by standard terminal, and the second feedback information produced during operation the second executable file is sent to experimental calculation machine by experimental terminal.
Step S15: receive the first feedback information when described first executable file is run in the second feedback information when described experimental terminal runs described second executable file and described standard terminal, and using described second feedback information and described first feedback information as fieldbus functional test results.
In the present embodiment, the first feedback information when described first executable file is run in the second feedback information when described experimental terminal runs described second executable file and described standard terminal is received by experimental calculation machine, and using described second feedback information and described first feedback information as fieldbus functional test results.
In the present embodiment, under the mode of operation of each the second functional module of experimental terminal is mode standard situation in current test assignment, standard fieldbus function corresponding to this second functional module can be understood according to the fieldbus functional test results of current test assignment.
In current test assignment, the mode of operation of any one the second functional module of experimental terminal is disable mode, impact when can understand fieldbus afunction corresponding to this second functional module according to the fieldbus functional test results of current test assignment, experimental terminal run.
In current test assignment, the mode of operation of any one the second functional module of experimental terminal is from development mode, can judge that whether this second functional module is identical in the fieldbus function that fieldbus function corresponding under development mode is corresponding under mode standard with this second functional module according to the fieldbus functional test results of current test assignment, if this second functional module is identical in the fieldbus function that fieldbus function corresponding under development mode is corresponding under mode standard with this second functional module, then illustrate that the code again write corresponding to this second functional module is correct, otherwise, illustrate that the code again write corresponding to this second functional module is incorrect.
When the fieldbus function of the judged result correspondence under mode standard that is this second functional module in fieldbus function corresponding under development mode and this second functional module is identical, 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, this second functional module can also be compared and whether is better than this second functional module fieldbus performance corresponding under mode standard in fieldbus performance corresponding under development mode.Pass through comparative result, determine to have in the fieldbus performance that this second functional module under development mode and under mode standard is corresponding excellently have poor reason, excellently there is poor reason by analyzing to have in the fieldbus performance that this second functional module under development mode and under mode standard is corresponding, understanding the method for operation of fieldbus and the working mechanism of fieldbus further.
Wherein, judge that the detailed process whether the fieldbus function of this second functional module correspondence under mode standard in fieldbus function corresponding under development mode and this second functional module identical is according to the fieldbus functional test results of current test assignment: the information of the first functional module identical with this second functional module function in the first feedback information in due to the fieldbus functional test results of this second functional module more current test assignment under mode standard with in the second feedback information to should the information of the second functional module whether consistent, if result is consistent, then illustrate that this second functional module is identical in the fieldbus function that fieldbus function corresponding under development mode is corresponding under mode standard with this second functional module, if result is inconsistent, then illustrate that this second functional module is not identical in the fieldbus function that fieldbus function corresponding under development mode is corresponding under mode standard with this second functional module.
In the process of again writing code corresponding to this second functional module, 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 the second functional module of any one in experimental terminal can not be set to simultaneously mode standard, disable mode and from development mode, but the mode of operation of any one the second functional module can be different in different test assignment.When the mode of operation of any one the second functional module is different in different test assignment, fieldbus functional test results corresponding to each test assignment is different, and the test result different according to each test assignment can understand the method for operation and the working mechanism of fieldbus function corresponding to this second functional module.Because the mode of operation of any one the second functional module in experimental terminal can be different in different test assignment, the method for operation and the working mechanism of the fieldbus function that each second functional module is corresponding therefore can be recognized.
In this application, each second functional module in experimental terminal and each first functional module in standard terminal are obtained by the division secondary to field bus device layers.Certainly, each second functional module in experimental terminal and each first functional module in standard terminal also can be obtained by other dividing mode.
Wherein, in experimental terminal, each second functional module can be respectively: 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 for driving physics R-T unit;
Described clock synchronization module, for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keeping system clock synchronous;
Described communication scheduling module, for planning Fieldbus medium Land use systems, reaches industry determinacy requirement in real time to make fieldbus; Wherein, plan that Fieldbus medium Land use systems refers to when planning field bus device node sends data, when take fieldbus data medium and how long take fieldbus data medium.The object of planning Fieldbus medium Land use systems clashes when being and avoiding each field bus device node to send data.
Described process binding module, for binding described experimental terminal and described experimental terminal client layer program, to complete communication function;
Described system service module, for providing application layer entity access services to described experimental terminal;
Described information management module, for managing the attribute of described experimental terminal and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data produced when configuration file and described experimental terminal for managing described experimental terminal run executable file.
Each first functional module of standard terminal can be: identical with transmitting-receiving driver module function first receives and dispatches driver module, first clock synchronization module identical with clock synchronization module function, the first communication scheduling module identical with communication scheduling functions of modules, the first process binding module identical with process binding module function, the first system service module identical with system service functions of modules, the first information administration module identical with information management module function, first file system module identical with file system module function.
Now for clock synchronization module in experimental terminal in the present embodiment, the method for operation and working mechanism that can understand fieldbus function according to fieldbus functional test results are described in detail.Wherein, identical with clock synchronization module function in experimental terminal in standard terminal module is the first clock synchronization module.
When the mode of operation of clock synchronization module in first time test assignment is mode standard, according to first time, the primary scene bus functionality test result of test assignment can understand standard fieldbus function corresponding to clock synchronization module.
When the mode of operation of clock synchronization module in second time test assignment is disable mode, impact when can understand fieldbus afunction corresponding to clock synchronization module according to the secondary scene bus test result of second time test assignment, experimental terminal run, thus the necessity understanding that fieldbus function corresponding to clock synchronization module exist.
When the mode of operation of clock synchronization module in third time test assignment is from development mode, the code that code corresponding to clock synchronization module is write again for the initialization function that provided by programmable software code storehouse and interface function, can judge that whether clock synchronization module is identical in the fieldbus function that fieldbus function corresponding under development mode is corresponding under mode standard with clock synchronization module according to the fieldbus functional test results of current test assignment, if clock synchronization module is identical in the fieldbus function that fieldbus function corresponding under development mode is corresponding under mode standard with clock synchronization module, then illustrate that the code again write that clock synchronization module is corresponding is correct, otherwise, illustrate that the code again write that clock synchronization module is corresponding is incorrect.
When the fieldbus function of the judged result correspondence under mode standard that is this clock synchronization module in fieldbus function corresponding under development mode and this clock synchronization module is identical, 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, this clock synchronization module can also be compared and whether is better than this clock synchronization module fieldbus performance corresponding under mode standard in fieldbus performance corresponding under development mode.Pass through comparative result, determine to have in the fieldbus performance that this clock synchronization module under development mode and under mode standard is corresponding excellently have poor reason, excellently there is poor reason by analyzing to have in the fieldbus performance that this clock synchronization module under development mode and under mode standard is corresponding, understanding the method for operation of fieldbus and the working mechanism of fieldbus further.
Wherein, the fieldbus function corresponding under mode standard with the clock synchronization module of experimental terminal due to the fieldbus function that the first clock synchronization module of standard terminal is corresponding is identical, therefore in current test assignment, judge that clock synchronization module is when whether the fieldbus function whether fieldbus function corresponding under development mode is corresponding under mode standard with clock synchronization module is identical, only need to judge that whether clock synchronization module is identical in the fieldbus function that fieldbus function corresponding under development mode is corresponding with the first clock synchronization module of standard terminal according to the fieldbus functional test results of current test assignment.
The impact run fieldbus experiment porch during the fieldbus afunction corresponding in second time test assignment of the standard fieldbus function corresponding in first time test assignment by comparison clock synchronization module and clock synchronization module, understands the effect of fieldbus function corresponding to clock synchronization module.
By the impact that when fieldbus function, fieldbus afunction corresponding in the second test assignment that comparison clock synchronization module is corresponding in the first test assignment, fieldbus experiment porch run and in the 3rd test assignment the fieldbus function of the corresponding codes implement by again writing, the method for operation and the working mechanism of fieldbus function corresponding to clock synchronization module can be understood.
Fieldbus functional test results is the test result of current test assignment, and after test assignment changes, fieldbus functional test results can change with the change of test assignment.
In this application, experimental terminal comprises multiple second functional module, and each function one_to_one corresponding of the function that each second functional module has and fieldbus, therefore by understanding to each second functional module of experimental terminal each function can understanding fieldbus, and then the inner structure of fieldbus is drawn by each function distribution of fieldbus.
In this application, in experimental terminal, the mode of operation of each second functional module is corresponding with test assignment, therefore in different test assignments, each second functional module can convert respective mode of operation, and the second executable file generates according to the mode of operation of each second functional module, therefore the second executable file that different test assignment is corresponding is different because of the change of the mode of operation of the second functional module, different by feedback information during operation the second executable file that the different known different test assignment of the second executable file that different test assignment is corresponding is corresponding, identical by feedback information during operation the first executable file that the identical known different test assignment of the first executable file that different test assignment is corresponding is corresponding, and then it is different by feedback information during operation the second executable file that different test assignment is corresponding, fieldbus functional test results corresponding to the identical known different test assignment of feedback information during operation the first executable file corresponding to different test assignment is different.The method of operation of fieldbus and the working mechanism of fieldbus can be understood by contrasting fieldbus functional test results corresponding to different test assignment.
When carrying out fieldbus functional test, do not limit the number of experimental terminal in experiment porch, when only having an experimental terminal in experiment porch, need to understand the method for operation of fieldbus and the working mechanism of fieldbus by contrasting fieldbus functional test results corresponding to different test assignment.
When experiment porch comprises multiple experimental terminal, and the functional module that comprises of each experimental terminal identical time, can in a test assignment, make the mode of operation of the functional module that each experimental terminal is identical different, when the mode of operation of the identical functional module of each experimental terminal is different, the second executable file that each experimental terminal obtains is different, because each self-corresponding second executable file of each experimental terminal is different, feedback information during each self-corresponding second executable file of each experimental terminal operation is different, feedback information when the first executable file is run in feedback information when running each self-corresponding second executable file according to each experimental terminal and standard terminal, the method of operation of fieldbus and the working mechanism of fieldbus can be understood.
When experiment porch comprises an experimental terminal, need to understand the method for operation of fieldbus and the working mechanism of fieldbus by contrasting fieldbus functional test results corresponding to different test assignment, owing to repeatedly testing, therefore inefficiency, but owing to only needing an experimental terminal, the cost therefore tested is low; When experiment porch comprises multiple experimental terminal, owing to can understand the method for operation of fieldbus and the working mechanism of fieldbus by once testing, therefore work efficiency is high, but due to the multiple experimental terminal of needs, testing cost is high.Certainly in actual applications, can, according to actual conditions, corresponding experiment porch be selected to carry out fieldbus functional test.But the number of the experimental terminal no matter in experiment porch is several, and the method for carrying out on-the-spot functional test is constant, as shown in Figure 1 a kind of method of testing based on fieldbus experiment porch.
When carrying out fieldbus functional test, do not limit the number of experiment porch Plays terminal yet, but more accurate in order to ensure the fieldbus functional test results obtained by fieldbus experiment porch, at least two standard terminals can be set.Arrange at least two standard terminals can make fieldbus functional test results more accurately reason be: 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 breaks down, the feedback information of standard terminal A is different with the feedback information of standard terminal B, by in different feedback informations known standard terminal A and standard terminal B, one of them has occurred fault, after in discovery, one of them breaks down, fault is got rid of, after failture evacuation, proceeds experiment again.If fieldbus experiment porch Plays terminal only has one, when breaking down in standard terminal, the feedback information obtained is wrong and can not find that the feedback information obtained is obtained by the standard terminal of fault, causes experimental result inaccurate.
As shown in the above, fieldbus experiment porch has two standard terminals to have a standard terminal compared to fieldbus experiment porch, and the fieldbus functional test results obtained is more accurate.When the standard terminal of fieldbus experiment porch is more than two, the fieldbus functional test results obtained when the fieldbus functional test results obtained is two compared to the standard terminal of fieldbus experiment porch is more accurate.
Corresponding with above-described embodiment, this application provides a kind of a kind of structural representation of the proving installation based on fieldbus experiment porch, refer to Fig. 2, wherein, fieldbus experiment porch comprises experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores programmable software code storehouse, described standard terminal comprises multiple first functional module, code corresponding to each described first functional module is standard code, and the first executable file in described standard terminal can not be revised, described experimental terminal comprises multiple second functional module, and each function one_to_one corresponding of the function that described in each, the second functional module has and fieldbus, described first functional module is the module that function is identical with described second functional module, wherein, described first executable file is the file that the code corresponding to each described first functional module carries out compiling link and obtain, proving installation based on fieldbus experiment porch comprises: the first acquiring unit 201, second acquisition unit 202, compilation unit 203, burning unit 204 and receiving element 205.Wherein:
First acquiring unit 201, for determining the mode of operation of each described second functional module that current test assignment uses.
In the present embodiment, described mode of operation comprises: mode standard, disable mode and from development mode;
Wherein, under mode standard, code corresponding to described second functional module is standard code;
In the disable mode, the code that described second functional module is corresponding is empty;
Under development mode, the code that code corresponding to described second functional module is write again for the initialization function that provided by described programmable software code storehouse and interface function.
Second acquisition unit 202, for the mode of operation of each described second functional module determined according to described first acquiring unit 201, obtains code corresponding to each described second functional module respectively from described programmable software code storehouse.
In the present embodiment, second acquisition unit 202, specifically for according to described each described second functional module mode of operation separately, manually obtains the code of each described second functional module from described programmable software code storehouse.
Or described second acquisition unit 202, specifically 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 compiler toggle program.
Compilation unit 203, for the annexation according to each described second functional module, code corresponding to each described second functional module got described second acquisition unit carries out compiling link, generates the second executable file.
Burning unit 204, for the second executable file extremely described experimental terminal that compilation unit described in burning 203 generates, to carry out fieldbus functional test.
Receiving element 205, for receiving the first feedback information when described first executable file is run in the second feedback information when described experimental terminal runs described second executable file and described standard terminal, and using described second feedback information and described first feedback information as fieldbus functional test results.
In the present embodiment, in experimental terminal in each second functional module and described standard terminal each first functional module by drawing the division of field bus device layers time;
Wherein, in described experimental terminal, each second functional module is respectively: 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 for driving physics R-T unit;
Described clock synchronization module, for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keeping system clock synchronous;
Described communication scheduling module, for planning Fieldbus medium Land use systems, reaches industry determinacy requirement in real time to make fieldbus;
Described process binding module, for binding described experimental terminal and described experimental terminal client layer program, to complete communication function;
Described system service module, for providing application layer entity access services to described experimental terminal;
Described information management module, for managing the attribute of described experimental terminal and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data produced when configuration file and described experimental terminal for managing described experimental terminal run executable file.
In the present embodiment, do not limit the number of experiment porch Plays terminal, but more accurate in order to ensure the fieldbus functional test results obtained by fieldbus experiment porch, at least two standard terminals can be set.Arrange at least two standard terminals can make fieldbus functional test results more accurately reason can make fieldbus functional test results reason more accurately with reference to arranging at least two standard terminals in a kind of method of testing based on fieldbus experiment porch shown in Fig. 1, do not repeat them here.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.For device class embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
Finally, also it should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
A kind of method of testing based on fieldbus experiment porch provided the application above and device are described in detail, apply specific case herein to set forth the principle of the application and embodiment, the explanation of above embodiment is just for helping method and the core concept thereof of understanding the application; Meanwhile, for one of ordinary skill in the art, according to the thought of the application, all will change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application.

Claims (6)

1. the method for testing based on fieldbus experiment porch, it is characterized in that, described fieldbus experiment porch comprises experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores programmable software code storehouse, described standard terminal is the field bus device can not revising its first executable file, described standard terminal comprises multiple first functional module, code corresponding to each described first functional module is standard code, and the first executable file in described standard terminal can not be revised, described experimental terminal is to revise the field bus device of its second executable file, described experimental terminal comprises multiple second functional module, and each function one_to_one corresponding of the function that described in each, the second functional module has and fieldbus, described first functional module is the module that function is identical with described second functional module, wherein, described first executable file is the file that the code corresponding to each described first functional module carries out compiling link and obtain, described method comprises:
Determine the mode of operation of each described second functional module that current test assignment uses;
According to the mode of operation of each described second functional module, from described programmable software code storehouse, obtain code corresponding to each described second functional module respectively;
According to the linking relationship of each described second functional module, the code corresponding to each described second functional module carries out compiling link, generates the second executable file;
Second executable file described in burning is described experimental terminal extremely, to carry out fieldbus functional test;
Receive the first feedback information when described first executable file is run in the second feedback information when described experimental terminal runs described second executable file and described standard terminal, and using described second feedback information and described first feedback information as fieldbus functional test results;
In wherein said experimental terminal in each second functional module and described standard terminal each first functional module by drawing the division of field bus device layers time; In described experimental terminal, each second functional module is respectively: 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 for driving physics R-T unit;
Described clock synchronization module, for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keeping system clock synchronous;
Described communication scheduling module, for planning Fieldbus medium Land use systems, reaches industry determinacy requirement in real time to make fieldbus;
Described process binding module, for binding described experimental terminal and described experimental terminal client layer program, to complete communication function;
Described system service module, for providing application layer entity access services to described experimental terminal;
Described information management module, for managing the attribute of described experimental terminal and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data produced when configuration file and described experimental terminal for managing described experimental terminal run executable file.
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, code corresponding to described second functional module is standard code;
In the disable mode, the code that described second functional module is corresponding is empty;
Under development mode, the code that code corresponding to described second functional module is write again for the initialization function that provided by described programmable software code storehouse and interface function.
3. method according to claim 1, it is characterized in that, the described mode of operation according to each described second functional module, the code obtaining each described second functional module corresponding from described programmable software code storehouse respectively comprises: according to described each described second functional module mode of operation separately, from described programmable software code storehouse, manually obtain code corresponding to each described second functional module;
Or according to described each described second functional module mode of operation separately, from described programmable software code storehouse, automatically obtain code corresponding to each described second functional module by compiler toggle program.
4. the proving installation based on fieldbus experiment porch, it is characterized in that, described fieldbus experiment porch comprises experimental calculation machine, standard terminal and experimental terminal, described experimental calculation machine stores programmable software code storehouse, described standard terminal is the field bus device can not revising its first executable file, described standard terminal comprises multiple first functional module, code corresponding to each described first functional module is standard code, and the first executable file in described standard terminal can not be revised, described experimental terminal is to revise the field bus device of its second executable file, described experimental terminal comprises multiple second functional module, and each function one_to_one corresponding of the function that described in each, the second functional module has and fieldbus, described first functional module is the module that function is identical with described second functional module, wherein, described first executable file is the file that the code corresponding to each described first functional module carries out compiling link and obtain, described device comprises:
First acquiring unit, for determining the mode of operation of each described second functional module that current test assignment uses;
Second acquisition unit, for the mode of operation of each described second functional module determined according to described first acquiring unit, obtains code corresponding to each described second functional module respectively from described programmable software code storehouse;
Compilation unit, for the linking relationship according to each described second functional module, code corresponding to each described second functional module got described second acquisition unit carries out compiling link, generates the second executable file;
Burning unit, for the second executable file extremely described experimental terminal that compilation unit described in burning generates, to carry out fieldbus functional test;
Receiving element, for receiving the first feedback information when described first executable file is run in the second feedback information when described experimental terminal runs described second executable file and described standard terminal, and using described second feedback information and described first feedback information as fieldbus functional test results;
In wherein said experimental terminal in each second functional module and described standard terminal each first functional module by drawing the division of field bus device layers time; In described experimental terminal, each second functional module is respectively: 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 for driving physics R-T unit;
Described clock synchronization module, for adjusting described experimental terminal and described standard terminal system clock, makes described experimental terminal and described standard terminal keeping system clock synchronous;
Described communication scheduling module, for planning Fieldbus medium Land use systems, reaches industry determinacy requirement in real time to make fieldbus;
Described process binding module, for binding described experimental terminal and described experimental terminal client layer program, to complete communication function;
Described system service module, for providing application layer entity access services to described experimental terminal;
Described information management module, for managing the attribute of described experimental terminal and described experimental terminal to the operation of described fieldbus experiment porch;
Described file system module, the data produced when configuration file and described experimental terminal for managing described experimental terminal run executable file.
5. device according to claim 4, is characterized in that, described mode of operation comprises: mode standard, disable mode and from development mode;
Wherein, under mode standard, code corresponding to described second functional module is standard code;
In the disable mode, the code that described second functional module is corresponding is empty;
Under development mode, the code that code corresponding to described second functional module is write again for the initialization function that provided by described programmable software code storehouse and interface function.
6. device according to claim 4, it is characterized in that, described second acquisition unit, specifically for according to described each described second functional module mode of operation separately, manually obtains the code of each described second functional module from described programmable software code storehouse;
Or described second acquisition unit, specifically 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 compiler toggle program.
CN201310234674.3A 2013-06-09 2013-06-09 A kind of method of testing based on fieldbus experiment porch and device Active CN103268274B (en)

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 CN103268274A (en) 2013-08-28
CN103268274B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104579721B (en) * 2013-10-10 2018-07-24 施耐德电器工业公司 Communication device and protective relaying device
CN107402797A (en) * 2016-05-19 2017-11-28 中兴通讯股份有限公司 A kind of software compilation method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
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
KR100916329B1 (en) * 2007-11-01 2009-09-11 한국전자통신연구원 Device and Method for Inspecting Vulnerability of Software

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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)

* Cited by examiner, † Cited by third party
Title
Automating the Device Interface Board Modeling for Virtual Test;Marco Rona等;《Proceeding of the Eighth IEEE European Test Workshop》;20031231;第71-76页 *
EPA网络芯片验证与测试;陈鹏等;《开发研究与设计技术》;20120430;第38卷(第8期);第264-267页 *

Also Published As

Publication number Publication date
CN103268274A (en) 2013-08-28

Similar Documents

Publication Publication Date Title
CN106330618A (en) Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses
CN104407971A (en) Method for automatically testing embedded software
CN101841436B (en) Method for testing performance of IPFIX (Internet Protocol Flow Information Export) server, device and system thereof
CN103345885A (en) Method and device for configuring box wiring and method for configuring split-joint-type display screen
CN106326088B (en) Method and device for realizing construction of test object and device for realizing service configuration test
CN105577463B (en) A kind of test method and its device based on communication protocol
CN104978258A (en) Software automation test method and system
CN103019732B (en) A kind of installation and deployment method and system based on province's cities and counties' integrated software
CN101114953A (en) Automatized test method for broadband accessing server
CN110968509B (en) Method and system for batch customizing of variables
CN105787364A (en) Automated testing method, device and system for task
CN106411637A (en) Internet-of-things device scenario testing method
CN105337796A (en) WIFI router performance test method and system
CN108121657A (en) Programmable logic device software simulation verification system based on system model
CN105117345A (en) Interface testing method and device for application program
CN103746840A (en) Method and system for automatic checking of software version information of network equipment
CN103780455A (en) TETRA digit cluster protocol test method and system based on TTCN-3
CN103268274B (en) A kind of method of testing based on fieldbus experiment porch and device
CN109471693A (en) Proprietary component is mapped to method, medium and the equipment of Cross-border congestion management system
CN104780076A (en) A code inspection method and apparatus
CN116107893A (en) Heterogeneous platform embedded software test verification system and method
CN104090185A (en) Testing system and method
CN104703197A (en) Terminal protocol consistency testing platform and terminal protocol consistency testing method based on TTCN-3
CN109858257A (en) Access control method and device
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