CN102541562B - The generation method of interlocking system PLC code - Google Patents

The generation method of interlocking system PLC code Download PDF

Info

Publication number
CN102541562B
CN102541562B CN201110457511.2A CN201110457511A CN102541562B CN 102541562 B CN102541562 B CN 102541562B CN 201110457511 A CN201110457511 A CN 201110457511A CN 102541562 B CN102541562 B CN 102541562B
Authority
CN
China
Prior art keywords
model
plc
locking sheet
code
interlocking system
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.)
Expired - Fee Related
Application number
CN201110457511.2A
Other languages
Chinese (zh)
Other versions
CN102541562A (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.)
Beijing Jiaotong University
Original Assignee
Beijing Jiaotong University
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 Beijing Jiaotong University filed Critical Beijing Jiaotong University
Priority to CN201110457511.2A priority Critical patent/CN102541562B/en
Publication of CN102541562A publication Critical patent/CN102541562A/en
Application granted granted Critical
Publication of CN102541562B publication Critical patent/CN102541562B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Programmable Controllers (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a kind of generation method of interlocking system PLC code, comprise step: A, to arrange according to the operation demand of actual railway and meet the locking sheet meta-model of model to model transformation language QVT grammer to the transformation rule expanding locking sheet meta-model; B, the expansion locking sheet meta-model meeting QVT grammer according to the conversion requirements setting of PLC model and interlock access logic basis model are to the transformation rule of PLC meta-model; C, to arrange based on model to the PLC model of text-converted language MOFScript grammer to the transformation rule of PLC code according to the conversion requirements of PLC code.Application the present invention, can improve the development efficiency of interlocking system software, enhance reliability and the security of interlocking system software.Avoid h coding and the inefficiency problem caused, effectively alleviate the mistake that h coding introduces, ensure that the synchronous of the document that analytical engineering phase produces and final code, improve efficiency and the accuracy of software subsequent upgrade and later maintenance.

Description

The generation method of interlocking system PLC code
Technical field
The present invention relates to technical field of rail traffic, particularly relate to the generation method of a kind of interlocking system programmable logic controller (PLC) (PLC, Programmable Logic Controller) code.
Background technology
Computer interlock system (hereinafter referred to as interlocking system) is for commanding the signal system of train operation, guarantee driving safety in railway station, it directly control the signalling arrangement in whole station, transport safely guarantee is passenger-cargo, improve conevying efficiency and play an important role.According to the regulation of standard EN 50126 and IEC61508, interlocking system is divided into the Safety-Critical System of SIL-4, and therefore its reliability and security are subject to the great attention of railway leading department, system development business and user.
In existing computer interlock system Software for Design, mostly use conventional methods, namely (stand field and locking sheet) from the requirement profile of computer interlock system, the functional specification of manual development computer interlocking system, the mode of then encoding by hand realizes writing of interlocking system code.The man power and material of the development approach at substantial of this manual coding, and the mistake that inevitable introducing is artificial, for the safe operation of interlocking system hides some dangers for.In addition, often cause design documentation and final code inconsistent in interlocking system early stage with the method being encoded to core, increase upgrading and the later maintenance difficulty of software.
In sum, there is following defect in existing computer interlock system software design scheme:
1, the manual coding of interlocking system inevitably introduces mistake, reduces the security of interlocking system;
2, to have the construction cycle long for the manual coding of interlocking system, the defects such as development efficiency is low;
In the manual coding process of 3, interlocking system, developer can ignore document and the design chart of analytical engineering phase generation, only be absorbed in writing and debugging of code, cause the inconsistent of final code and design documentation, bring difficulty to follow-up software upgrading and software maintenance, make the of a high price of software upgrading and software maintenance.
Summary of the invention
(1) technical matters that will solve
The technical problem to be solved in the present invention is, for above-mentioned defect, how to provide a kind of generation method of interlocking system PLC code, it can improve the development efficiency of interlocking system software, reduce the mistake that manual coding causes, ensure the safe reliability of interlocking system software.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides a kind of generation method of interlocking system PLC code, comprising step:
A, to arrange according to the operation demand of actual railway and meet the locking sheet meta-model of model to model transformation language QVT grammer to the transformation rule expanding locking sheet meta-model;
B, the expansion locking sheet meta-model meeting QVT grammer according to the conversion requirements setting of PLC model and interlock access logic basis model are to the transformation rule of PLC meta-model;
C, to arrange based on model to the PLC model of text-converted language MOFScript grammer to the transformation rule of PLC code according to the conversion requirements of PLC code.
Wherein, described locking sheet meta-model is used for describing locking sheet grammer and static semantic;
Described expansion chained list meta-model is used for being described in grammer and the static semantic of the register needed for follow-up PLC code and the timer state variable added in locking sheet model;
Described locking sheet model is used for setting up the station interlocking table model meeting the requirement of locking sheet syntax and semantics.
Wherein, described PLC meta-model is used for describing grammer and the static semantic of PLC code;
Described PLC model is the model of interlocking system code;
Described interlock access logical model for describing the application of interlocking system route, route is set up and the UML state machine diagram of route release logic.
Wherein, the running environment of described QVT is the Model Transformation Engine in MDA based on CPN, for realizing locking sheet model to the conversion expanding locking sheet and PLC model.
(3) beneficial effect
The invention discloses a kind of generation method of interlocking system PLC code, in the prior art, PLC model relates to a large amount of language primitives and operation, and complicated PLC set reduces the checking ability of follow-up model conversion and model characteristics.And in the generation method of interlocking system PLC code of the present invention, the subset of PLC code is only used in this characteristic field of interlocking system, make the present invention simple.
Transformation rules relates to locking sheet to expansion locking sheet, and locking sheet is to the conversion of PLC model; The completeness of transformation rules requires that transformation rule covers all elements be converted in model, and correctness ensures that the semanteme before and after conversion is consistent.Model conversion of the present invention ensures correctness and the completeness of transformation rule by formal proof engine CPN.
The present invention uses the locking sheet transformation rule based on MOFScript, avoids the arbitrariness of model to code conversion, ensure that model arrives modularization and the standardization of code conversion.
Tool of the present invention has the following advantages:
1, improve the development efficiency of interlocking system software, enhance reliability and the security of interlocking system software.The inefficiency problem that the automatic generation of interlocking system PLC code avoids h coding and causes, effectively alleviate the mistake that h coding introduces, simultaneously, the Model Transformation Engine in MDA with formal semantics effectively can verify the completeness of transformation rule and correct type, thus improves the safety and reliability of interlocking software.
2, the automatic PLC code generating method of interlocking system software, ensure that the synchronous of the document that analytical engineering phase produces and final code, improves efficiency and the accuracy of software subsequent upgrade and later maintenance.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the generation method of interlocking system PLC code described in the embodiment of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail.Following examples for illustration of the present invention, but are not used for limiting the scope of the invention.
As shown in Figure 1, the generation method of interlocking system PLC code of the present invention comprises step:
A, to arrange according to the operation demand of actual railway and meet model to model transformation language (QVT, Query View and Transformation) the locking sheet meta-model of grammer to the transformation rule of expansion locking sheet meta-model, to realize locking sheet model to the automatic conversion expanding locking sheet model.
In this step, described locking sheet meta-model is used for describing locking sheet grammer and static semantic;
Described expansion chained list meta-model is used for being described in grammer and the static semantic of the register needed for follow-up PLC code and the timer state variable added in locking sheet model.
Described locking sheet model is used for setting up the station interlocking table model meeting the requirement of locking sheet syntax and semantics, with modeling interlocking requirement profile;
B, the expansion locking sheet meta-model that meets QVT grammer and the interlock access logic basis model transformation rule to PLC meta-model is set, to realize the automatic conversion to PLC model of expansion locking sheet model and interlock access logical model according to the conversion requirements of PLC model.
In this step, described expansion locking sheet model is by realizing the register and timer state variable that add follow-up PLC code building needs in interlocking table model.
Described PLC meta-model is used for describing grammer and the static semantic of PLC code.
Described PLC model is the model of interlocking system code.
Described interlock access logical model for describing the application of interlocking system route, route is set up and the UML state machine diagram of route release logic.
C, arrange based on model to the PLC model of text-converted language MOFScript grammer to the transformation rule of PLC code, to realize the automatic conversion of PLC model to PLC code according to the conversion requirements of PLC code.
In this step, described MOFScript is the conversion of model to text, realizes the conversion of PLC model to PLC code.
Wherein, the running environment of described QVT is the Model Transformation Engine in MDA based on colored Petri network (CPN, Colored Petri Net), for realizing locking sheet model to the conversion expanding locking sheet and PLC model.
In sum, the invention discloses a kind of generation method of interlocking system PLC code, in the prior art, PLC model relates to a large amount of language primitives and operation, and complicated PLC set reduces the checking ability of follow-up model conversion and model characteristics.And in the generation method of interlocking system PLC code of the present invention, the subset of PLC code is only used in this characteristic field of interlocking system, make the present invention simple.
Transformation rules relates to locking sheet to expansion locking sheet, and locking sheet is to the conversion of PLC model; The completeness of transformation rules requires that transformation rule covers all elements be converted in model, and correctness ensures that the semanteme before and after conversion is consistent.Model conversion of the present invention ensures correctness and the completeness of transformation rule by formal proof engine CPN.
The present invention uses the locking sheet transformation rule based on MOFScript, avoids the arbitrariness of model to code conversion, ensure that model arrives modularization and the standardization of code conversion.
Tool of the present invention has the following advantages:
1, improve the development efficiency of interlocking system software, enhance reliability and the security of interlocking system software.The inefficiency problem that the automatic generation of interlocking system PLC code avoids h coding and causes, effectively alleviate the mistake that h coding introduces, simultaneously, the Model Transformation Engine in MDA with formal semantics effectively can verify the completeness of transformation rule and correct type, thus improves the safety and reliability of interlocking software.
2, the automatic PLC code generating method of interlocking system software, ensure that the synchronous of the document that analytical engineering phase produces and final code, improves efficiency and the accuracy of software subsequent upgrade and later maintenance.
Above embodiment is only for illustration of the present invention; and be not limitation of the present invention; the those of ordinary skill of relevant technical field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all equivalent technical schemes also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (3)

1. a generation method for interlocking system PLC code, is characterized in that, comprise step:
A, to arrange according to the operation demand of actual railway and meet the locking sheet meta-model of model to model transformation language QVT grammer to the transformation rule expanding locking sheet meta-model, to realize locking sheet model to the automatic conversion expanding locking sheet model;
Described locking sheet meta-model is used for describing locking sheet grammer and static semantic;
Described expansion locking sheet meta-model is used for being described in grammer and the static semantic of the register needed for follow-up PLC code and the timer state variable added in locking sheet model;
Described locking sheet model is used for setting up the station interlocking table model meeting the requirement of locking sheet syntax and semantics, with modeling interlocking requirement profile;
B, the expansion locking sheet meta-model meeting QVT grammer according to the conversion requirements setting of PLC model and interlock access logic basis model are to the transformation rule of PLC meta-model;
C, to arrange based on model to the PLC model of text-converted language MOFScript grammer to the transformation rule of PLC code according to the conversion requirements of PLC code.
2. the generation method of interlocking system PLC code according to claim 1, is characterized in that, described PLC meta-model is used for describing grammer and the static semantic of PLC code;
Described PLC model is the model of interlocking system code;
Described interlock access logic basis model for describing the application of interlocking system route, route is set up and the UML state machine diagram of route release logic.
3. the generation method of interlocking system PLC code according to claim 1 and 2, is characterized in that, the running environment of described QVT is the Model Transformation Engine in MDA based on CPN, for realizing locking sheet model to the conversion expanding locking sheet and PLC model.
CN201110457511.2A 2011-12-30 2011-12-30 The generation method of interlocking system PLC code Expired - Fee Related CN102541562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110457511.2A CN102541562B (en) 2011-12-30 2011-12-30 The generation method of interlocking system PLC code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110457511.2A CN102541562B (en) 2011-12-30 2011-12-30 The generation method of interlocking system PLC code

Publications (2)

Publication Number Publication Date
CN102541562A CN102541562A (en) 2012-07-04
CN102541562B true CN102541562B (en) 2015-07-29

Family

ID=46348535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110457511.2A Expired - Fee Related CN102541562B (en) 2011-12-30 2011-12-30 The generation method of interlocking system PLC code

Country Status (1)

Country Link
CN (1) CN102541562B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514062B (en) * 2013-10-11 2016-01-13 上海富欣智能交通控制有限公司 Be applied to the dynamic coding method of computer interlock system
CN103523054B (en) * 2013-10-25 2016-03-16 王先宏 The automation control system of locomotive depot's signal system
CN105159656A (en) * 2014-06-16 2015-12-16 上海宝信软件股份有限公司 PLC software programming aided design method
CN104035782B (en) * 2014-06-27 2017-01-25 上海自仪泰雷兹交通自动化系统有限公司 Interlocking software development system based on Petri network
CN110874215B (en) * 2019-11-19 2023-03-21 深圳市宜居云科技有限公司 Drive control method and system for electric appliance or electric equipment
CN113534730B (en) * 2021-06-29 2022-09-16 广东利元亨智能装备股份有限公司 Model-based PLC control code generation method, system, device and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Executable system architecting using systems modeling language in conjunction with colored Petri nets in a model-driven systems development process;Renzhong Wang等;《Systems Engineering》;20110304;第14卷(第4期);第383-409页 *
Jan Bosch等.Developing a Software Product Line for Train Control: A Case Study of CVL.《Software Product Lines: Going Beyond》.Springer,2010,第108页. *
Krzysztof Czarnecki等.The future of train signaling.《Model Driven Engineering Languages and Systems》.Springer,2008,第145-159页. *
模型驱动架构中模型转换技术的研究;朱彬等;《微机发展》;20050731;第15卷(第7期);第54-56,59页 *

Also Published As

Publication number Publication date
CN102541562A (en) 2012-07-04

Similar Documents

Publication Publication Date Title
CN102541562B (en) The generation method of interlocking system PLC code
CN102522128B (en) Method and system for testing configuration logic design of DCS (Distributed Control System) of nuclear power station
CN103838675B (en) The method of the automatic generating test use case of computer interlock system
CN104049976B (en) Interlocking software automatic creation system based on Boolean logic
CN103885439A (en) Automated testing system for railway signal computer interlocking system
CN103310861B (en) A kind of overall operation using digital human machine interface nuclear power plant controls the functional analysis approach of display
CN103885879B (en) Script resolving method for interlocking software automatically testing platform system
CN102355062A (en) IEC (International Electrotechnical Commission) 61850 relay protection model checking method
CN102043719A (en) Method for testing IEC61850 configuration description file
CN103020366B (en) A kind of track traffic BAS system cross platform automatic programming method
CN106650149B (en) Modelica model-based runtime fault injection system and method
CN107505851A (en) Ovation control analogue systems and emulation mode based on Rinsim platforms
Hei et al. Automatic transformation from UML statechart to Petri nets for safety analysis and verification
Ferrari et al. From commercial documents to system requirements: an approach for the engineering of novel CBTC solutions
CN105205039A (en) Customizable SCD (substation configuration description) file verification method
CN103186582A (en) Device description file-based data analysis method
CN103793458B (en) Method for nondestructively converting AADL (architecture analysis and design language) into XML (extensible markup language)
CN103885810A (en) Gerber file compiler based on regular expressions
CN109783507B (en) Automatic checking method and system for clutch regulation of engineering clearance distance of transformer substation
Huang et al. MDE-based verification of SysML state machine diagram by UPPAAL
CN103631854A (en) ICD and SCD consistency calibration method based on model objectification semantics
Zhao et al. Meta-models combination for reusing verification techniques
CN102937910A (en) System and method for cross-platform conversion of control algorithms
CN103020162A (en) Method for converting and importing CC2000 model into D5000 system
Zhang Aspect-oriented approach to modeling railway cyber physical systems

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150729

Termination date: 20201230

CF01 Termination of patent right due to non-payment of annual fee