CN102184286B - Method for generating instrument circuit diagram automatically - Google Patents

Method for generating instrument circuit diagram automatically Download PDF

Info

Publication number
CN102184286B
CN102184286B CN 201110114761 CN201110114761A CN102184286B CN 102184286 B CN102184286 B CN 102184286B CN 201110114761 CN201110114761 CN 201110114761 CN 201110114761 A CN201110114761 A CN 201110114761A CN 102184286 B CN102184286 B CN 102184286B
Authority
CN
China
Prior art keywords
instrument
circuit diagram
excel
excel document
information
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
CN 201110114761
Other languages
Chinese (zh)
Other versions
CN102184286A (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.)
China National Petroleum Corp
China Huanqiu Engineering Co Ltd
Original Assignee
China National Petroleum Corp
China Huanqiu Engineering 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 China National Petroleum Corp, China Huanqiu Engineering Co Ltd filed Critical China National Petroleum Corp
Priority to CN 201110114761 priority Critical patent/CN102184286B/en
Publication of CN102184286A publication Critical patent/CN102184286A/en
Application granted granted Critical
Publication of CN102184286B publication Critical patent/CN102184286B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for generating an instrument circuit diagram automatically. The method comprises the following steps: the original data sources of a plurality of types of instrument circuit diagrams are converted into information list with instrument labels, and the information list is guided into a first Excel document; the information lists are classified according to the preset instrument sequence so as to obtain the instrument indexes of a plurality of types; the data of the instrument indexes of a plurality of types are compared through Access, the instruments having the same tail number and belonging to the same circuit are extracted and guided into a second Excel document; an AutoCAD template file is built, the key codes of all the texts are obtained, after matching each key code with the row and column in the first Excel document, the corresponding cell data in the second Excel document is called to generate the circuit diagram.

Description

The method of automatic generating instrument circuit diagram
Technical field
The present invention relates to the chemical instruments field, in particular to a kind of method of automatic generating instrument circuit diagram.
Background technology
In petrochemical plant design, finish the design effort of a large amount of instrument circuit diagrams, adopt the mode of drawing one by one on the traditional sense, very loaded down with trivial details.
Some limitation of the intellectuality that INtools software provides itself, it can not construct a model that is fit to various application, then design on this basis robotization, intelligentized data processor system, thereby the user of restricted software makes a choice according to the characteristics of project and arranges, and causes work efficiency lower.
Summary of the invention
The invention provides a kind of method of automatic generating instrument circuit diagram, in order to realize the automatic generation of instrument circuit diagram, increase work efficiency.
For achieving the above object, the invention provides a kind of method of automatic generating instrument circuit diagram, it may further comprise the steps: the raw data source of the instrument circuit diagram of a plurality of classifications is converted to information list with the instrument item, and it is imported to an Excel document; Information list is sequentially classified according to predefined instrument, obtain the instrument index of a plurality of classifications; By Access the data of the instrument index of a plurality of classifications are compared, meter information tail number is identical and the genus the same circuit extracts, and then imports to the 2nd Excel document; Set up the AutoCAD template file and obtain the wherein key code of all texts, each key code is corresponding with row and column in the Excel file on after, call cell data corresponding in the 2nd Excel document, generate loop diagram.
Better, in the method for above-mentioned automatic generating instrument circuit diagram, the raw data source of the instrument circuit diagram of a plurality of classifications is converted to information list with the instrument item, and it is imported to an Excel document step comprise: by using Excel VB all instrument signals in the connection table of raw data source are generated instrument tabulation with junction box's information, the raw information with the field instrument connection table of instrument item, the wiring case number (CN) that comprises all instrument, connection terminal, cable number and the core information of counting all extracts, and obtains information list through importing to an Excel document.
Better, in the method for above-mentioned automatic generating instrument circuit diagram, information list is sequentially classified according to predefined instrument, and the instrument index step that obtains a plurality of classifications comprises: set the instrument order according to every kind of meter type quantity and relative importance; According to the instrument order information list is classified, obtain the instrument index of a plurality of classifications.
Better, in the method for above-mentioned automatic generating instrument circuit diagram, set up the AutoCAD template file and obtain the wherein key code of all texts, after on each key code is corresponding with row and column in the Excel file, call cell data corresponding in the 2nd Excel document, generating the loop diagram step comprises: build up the AutoCAD template file, the external control program of writing by VB obtains the key code of all texts in the current AutoCAD template file; After on the row and column of each key code and an Excel document at the data source place that will import is corresponding, recycle the cell data in the 2nd Excel document with all loop diagram information that another VB routine call obtained, and the cell data all assignment to the AutoCAD template; The loop diagram that generates circulating saves as the loop diagram title of setting and preserves and close.
In the above-described embodiments, by the accumulation to data source, then compare, arrangement, importing, derivation be until the output of final finished product instrument circuit diagram.After all data have obtained obtaining, and design procedure all obtained sufficient consideration, automatically finishes the instrument circuit map generalization, thereby realize the layout design standardization, reduce simultaneously a large amount of work that repeat of designer, saved in a large number when artificial, work efficiency is provided.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art, apparently, accompanying drawing in the following describes only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram of the automatic generating instrument circuit diagram of one embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not paying the every other embodiment that obtains under the creative work prerequisite.
The instrument circuit diagram general design of each project is more consistent, mainly is divided into instrument index (Index), DCS rack, electric meter connection signal, field instrument junction box, Instrument connection terminal cabinet and these several classes of emergency stopping system.These files must the Seeking Truth final version, or substantially near final version (need revise fewer), otherwise the instrument circuit diagram of making can only be as the reference paper of intermediate releases.
The raw data source of instrument circuit diagram roughly is divided into following situation: All Kinds of Index for Two Loop (the various Index that are used for two-wire circuit figure), Connecting Information for ESD (the emergency stopping system connection table that ESD manufacturer provides), DCS IO Allocation HPM (the dcs signal distribution list that DCS manufacturer provides), Electrical Connection Cabinet (the electric meter signal connecting cabinet connection table that manufacturer provides), Electrical Motor Signal (the electric induction motor signal tabulation that electric specialty provides), Instrument Tag Existed in JB (all instrument signal tabulations among the junction box), Marshalling Rack List (instrument terminals wiring cabinet wiring tabulation).
Above-mentioned file will convert the information list with the instrument item to.For example wherein just have by using Excel VB, the instrument tabulation of all instrument signals generations in the connection table with junction box's information, the raw information with the field instrument connection table of instrument item, the information such as wiring case number (CN), connection terminal, cable number and core number that are exactly all instrument in this Excel table all extract, just obtain afterwards such instrument tabulation, other file all adopts this kind mode to carry out data and extracts.
Fig. 1 is the method flow diagram of the automatic generating instrument circuit diagram of one embodiment of the invention.As shown in Figure 1, it may further comprise the steps:
S102 is converted to information list with the instrument item with the raw data source of the instrument circuit diagram of a plurality of classifications, and it is imported to an Excel document;
S104 sequentially classifies information list according to predefined instrument, obtains the instrument index of a plurality of classifications;
S106 compares the data of the instrument index of a plurality of classifications by Access, and instrument tail number is identical and that belong to the same circuit extracts and to importing to the 2nd Excel document;
S 108, set up the AutoCAD template file and obtain the wherein key code of all texts, each key code is corresponding with row and column in the Excel file on after, call cell data corresponding in the 2nd Excel document, generate loop diagram.
In the present embodiment, by the accumulation to data source, then compare, arrangement, importing, derivation be until the output of final finished product instrument circuit diagram.After all data have obtained obtaining, and design procedure all obtained sufficient consideration, automatically finishes the instrument circuit map generalization, thereby realize the layout design standardization, reduce simultaneously a large amount of work that repeat of designer, saved in a large number when artificial, work efficiency is provided.
For example, in the method for above-mentioned automatic generating instrument circuit diagram, the raw data source of the instrument circuit diagram of a plurality of classifications is converted to information list with the instrument item, and it is imported to an Excel document step comprise: by using Excel VB all instrument signals in the connection table of raw data source are generated instrument tabulation with junction box's information, the raw information with the field instrument connection table of instrument item, the wiring case number (CN) that comprises all instrument, connection terminal, cable number and the core information of counting all extracts, and obtains information list through importing to an Excel document.
How so many loop diagram message files being organized in needs to take into full account in advance together.If unilateral wait final version file also is to be difficult to guarantee the duration in addition, this can cause instrument circuit design phase thing less, the later stage design again can be in a rush, so will consider first to finish first intermediate releases, this intermediate releases is wanted and can easily just be imported when final version arrives and replace simultaneously.
Because field instrument is of a great variety, determining according to a definite sequence meter type to be classified through after thinking over.For example, in the method for above-mentioned automatic generating instrument circuit diagram, information list is sequentially classified according to predefined instrument, the instrument index step that obtains a plurality of classifications comprises: set the instrument order according to every kind of meter type quantity and relative importance; According to the instrument order information list is classified, obtain the instrument index of a plurality of classifications.
The below is one and carries out the example of exhaustive division from low to high according to the instrument grade that putting in order is successively: ⑴: electrical connection; ⑵: weighing instrument; ⑶: vibration instrument; ⑷: fire-type instrument valve; ⑸: mass flowmeter; ⑹: with the instrument of on-the-spot reometer; ⑺: electromagnetic flowmeter; ⑻: speed switch; ⑼: tuning fork liquid level gauge; ⑽: radioactive level gauge; ⑾: signal distributor; ⑿: by-pass valve control; ⒀: switch valve; ⒁: analysis meter; ⒂: set of equipments air compressor.
Above-mentioned these files are to delete step by step the respective type instrument by Access, simultaneously with the deletion instrument separately as an instrument index.The benefit of doing like this is instrument can never occur to repeat in the middle of the instrument index of difference classification, also is simultaneously the identical basis as classification of sequence number according to back in the instrument item.
Carry out the instrument index classification according to top instrument grade, the result of classification obtains certain type instrument index and the instrument index except this type of instrument index, the latter is used as the index classification of residue type instrument, constantly repeat similar work, what obtain at last is exactly the corresponding instrument index of various types of meters, and has guaranteed that the classification of various instrument can not duplicate situation certainly.
The facility that adopts the Access database to bring to work in the instrument assorting process is huge.Certainly the prerequisite of utilizing Access is sufficient understanding to be arranged to meter type, and classification just can not repeat and lose like this.The work in this step is to process for follow-up data to lay a solid foundation.Ensuing work is exactly will be the rack of DCS, and electric meter connects signal, the field instrument junction box, and the Instrument connection terminal cabinet, the information of these several classes of emergency stopping system is reacted on the Index file of certain instrument of processing one by one.Before the generating instrument circuit diagram, use Access to the data importing of the classification of main Types instrument index, with electromagnetic flowmeter as example, before the generating instrument circuit diagram, with Access the data of advancing the instrument index classification are compared, therefrom can extract the instrument of tail number same genus the same circuit, export to afterwards the Excel document.
Can find after above-mentioned work all finishes that the line number of each instrument circuit in the Excel file is different, may have 1 row, 2 row, 3 row etc., at this time needing to analyze which line number can merge.Can allow the instrument circuit that line number is few, quantity is few pass through to increase line number, otherwise subtract row.Tell at last the line number of several large classifications.Causing the different reason of line number is that the inside, a loop may have various instrument signals.For example for the electromagnetic flowmeter loop, the inside also has by-pass valve control except electromagnetic flowmeter itself, controlled valve, valve position switch, reometer etc., and signal has or not the difference that will cause the line number in loop in Excel in the loop.
Next just can carry out instrument circuit map generalization Job readiness.At the coordinate that begins most to plan or utilize AutoCAD to have instrument circuit information is imported among the AutoCAD, after through test, find that this workload is excessive, surpass expection, and be easy to just surpass the Excel maximum number of column, and be difficult to the rationality of the instrument circuit information position of assurance input.Input instrument circuit information by the method for replacing text numerical value, this method has been simplified working strength greatly.Learn that thus reaching designing requirement has diverse ways, but must excavate optimized thinking.
For example, in the method for above-mentioned automatic generating instrument circuit diagram, set up the AutoCAD template file and obtain the wherein key code of all texts, after on each key code is corresponding with row and column in the Excel file, call cell data corresponding in the 2nd Excel document, generating the loop diagram step comprises: first the AutoCAD template file is built up, the external control program of then writing by VB obtains the key code of all texts in front template, the key code of each text is unique in AutoCAD, after on row and column in the Excel document at each key code and the data source place that will import is corresponding, next recycle the cell data in the Excel file with all loop diagram information that another VB routine call obtained, and data all assignment to the AutoCAD template, then save as the loop diagram title of setting, automatically preserve, close, constantly circulation.Whole process all automatically performs, and just makes the loop diagram of such instrument same number of rows complete very efficiently.
Can find out that from foregoing description the above embodiment of the present invention realizes following beneficial effect:
For traditional approach, utilize Excel VBA, AutoCAD VBA and Access, by the flexible use to VBA, realize the accumulation of data source, then to compare, arrangement, importing, derivation are until the output of final finished product instrument circuit diagram.According to the performance of pilot project, after all data have obtained obtaining, and design procedure all obtained sufficient consideration, thereby realizes the layout design standardization, reduces simultaneously a large amount of work that repeat of designer, saved a large amount of when artificial.
One of ordinary skill in the art will appreciate that: accompanying drawing is the synoptic diagram of an embodiment, and the module in the accompanying drawing or flow process might not be that enforcement the present invention is necessary.
One of ordinary skill in the art will appreciate that: the module in the device among the embodiment can be described according to embodiment and be distributed in the device of embodiment, also can carry out respective change and be arranged in the one or more devices that are different from present embodiment.The module of above-described embodiment can be merged into a module, also can further split into a plurality of submodules.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of programmed instruction, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: the various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that previous embodiment is put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of embodiment of the invention technical scheme.

Claims (4)

1. the method for an automatic generating instrument circuit diagram is characterized in that, may further comprise the steps:
The raw data source of the instrument circuit diagram of a plurality of classifications is converted to information list with the instrument item, and it is imported to an Excel document;
Described information list is sequentially classified according to predefined instrument, obtain the instrument index of a plurality of classifications;
By Access the data of the instrument index of described a plurality of classifications are compared, meter information tail number is identical and the genus the same circuit extracts, and then imports to the 2nd Excel document;
Set up the AutoCAD template file and obtain the wherein key code of all texts, each described key code is corresponding with row and column in the described Excel file on after, call cell data corresponding in described the 2nd Excel document, generate loop diagram.
2. the method for automatic generating instrument circuit diagram according to claim 1 is characterized in that, the raw data source of the instrument circuit diagram of a plurality of classifications is converted to information list with the instrument item, and it is imported to an Excel document step comprises:
Tabulate by using Excel VB that all instrument signals in the connection table of raw data source are generated with the instrument of junction box's information, the raw information with the field instrument connection table of instrument item, wiring case number (CN), connection terminal, cable number and the core information of counting that comprises all instrument all extracts, and obtains information list through importing to an Excel document.
3. the method for automatic generating instrument circuit diagram according to claim 1 is characterized in that, described information list is sequentially classified according to predefined instrument, and the instrument index step that obtains a plurality of classifications comprises:
Set the instrument order according to every kind of meter type quantity and relative importance;
According to described instrument order described information list is classified, obtain the instrument index of a plurality of classifications.
4. the method for automatic generating instrument circuit diagram according to claim 1, it is characterized in that, set up the AutoCAD template file and obtain the wherein key code of all texts, after on each described key code is corresponding with row and column in the described Excel file, call cell data corresponding in described the 2nd Excel document, generate the loop diagram step and comprise:
Build up the AutoCAD template file, the external control program of writing by VB obtains the key code of all texts in the current AutoCAD template file;
After on the row and column of each described key code and a described Excel document at the data source place that will import is corresponding, recycle the cell data in described the 2nd Excel document with all loop diagram information that another VB routine call obtained, and described cell data all assignment give described AutoCAD template;
The loop diagram that generates circulating saves as the loop diagram title of setting and preserves and close.
CN 201110114761 2011-05-05 2011-05-05 Method for generating instrument circuit diagram automatically Active CN102184286B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110114761 CN102184286B (en) 2011-05-05 2011-05-05 Method for generating instrument circuit diagram automatically

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110114761 CN102184286B (en) 2011-05-05 2011-05-05 Method for generating instrument circuit diagram automatically

Publications (2)

Publication Number Publication Date
CN102184286A CN102184286A (en) 2011-09-14
CN102184286B true CN102184286B (en) 2013-04-24

Family

ID=44570463

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110114761 Active CN102184286B (en) 2011-05-05 2011-05-05 Method for generating instrument circuit diagram automatically

Country Status (1)

Country Link
CN (1) CN102184286B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880748A (en) * 2012-09-06 2013-01-16 国电联合动力技术有限公司 Method for automatically drawing electric diagrams
CN103258090B (en) * 2013-04-28 2016-07-06 中国寰球工程公司 The method automatically generating pipeline meter flow chart
CN105183966B (en) * 2015-08-28 2019-03-26 中国昆仑工程有限公司 Instrument floor plan fast drawing method based on database
CN106126792A (en) * 2016-06-17 2016-11-16 中国寰球工程公司 A kind of method making instrument index according to process chart

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1684033A (en) * 2005-03-10 2005-10-19 上海大学 Automatic forming method for intelligent instrument interface
CN101027672A (en) * 2004-09-22 2007-08-29 日本精工株式会社 Automatic drawing creation system
JP2010108473A (en) * 2008-09-30 2010-05-13 Sanmi:Kk Drawing creation software, processing/estimation software for furniture
CN101719176A (en) * 2009-12-04 2010-06-02 煤炭科学研究总院西安研究院 Method for processing drilling trajectory parameters and drawing graphs by utilizing Excel

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101027672A (en) * 2004-09-22 2007-08-29 日本精工株式会社 Automatic drawing creation system
CN1684033A (en) * 2005-03-10 2005-10-19 上海大学 Automatic forming method for intelligent instrument interface
JP2010108473A (en) * 2008-09-30 2010-05-13 Sanmi:Kk Drawing creation software, processing/estimation software for furniture
CN101719176A (en) * 2009-12-04 2010-06-02 煤炭科学研究总院西安研究院 Method for processing drilling trajectory parameters and drawing graphs by utilizing Excel

Also Published As

Publication number Publication date
CN102184286A (en) 2011-09-14

Similar Documents

Publication Publication Date Title
CN103077183B (en) A kind of data lead-in method and its system of distributed sequence list
CN101504672B (en) Method and system for dynamically configuring physical data table
CN102789491B (en) A kind of configurable data subscription and delivery system and method thereof
CN102541521B (en) Automatic operating instruction generating device based on structured query language and method
CN104360865A (en) Serialization method, deserialization method and related equipment
CN104133772A (en) Automatic test data generation method
CN103838672A (en) Automated testing method and device for all-purpose financial statements
CN109241159B (en) Partition query method and system for data cube and terminal equipment
CN104298595A (en) Automatic testing method and testing system
CN104216961A (en) Method and device for data processing
CN103309904A (en) Method and device for generating data warehouse ETL (Extraction, Transformation and Loading) codes
CN102184286B (en) Method for generating instrument circuit diagram automatically
CN109508355A (en) A kind of data pick-up method, system and terminal device
CN105975466A (en) Method and device for machine manuscript writing aiming at short newsflashes
CN101984411A (en) Method and device for nuclear power station to generate virtual digital control system configuration file
CN105447246A (en) Method and system for generating electrical principle diagram through one key
CN104699613A (en) Automatic generating system and method thereof of spacecraft testing requirements
CN104077727A (en) Substation electric equipment machine account intelligent type-in method and system
CN102955739B (en) A kind of method improving performance test script reuse rate
CN102521551B (en) Personalized IC (integrated circuit) card issuing device and method
CN103744952A (en) Method and system for implementing multi-table property of NoSQL database
CN111400169A (en) Method and system for automatically generating netlist file for testing software and hardware
CN104036372A (en) Method for identifying suspected repeating data of electrical equipment
CN102279886B (en) Method and equipment for processing metadata
CN102707938A (en) Table-form software specification manufacturing and supporting method and device

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
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 100007 Beijing, Dongzhimen, North Street, No. 9, No.

Patentee after: China National Petroleum Corporation

Patentee after: China Global Engineering Co. Ltd.

Address before: 100007 Beijing, Dongzhimen, North Street, No. 9, No.

Patentee before: China National Petroleum Corporation

Patentee before: China Huanqiu Engineering Co.