CN102541562A - Method for generating PLC (programmable logic controller) code for interlocking system - Google Patents

Method for generating PLC (programmable logic controller) code for interlocking system Download PDF

Info

Publication number
CN102541562A
CN102541562A CN2011104575112A CN201110457511A CN102541562A CN 102541562 A CN102541562 A CN 102541562A CN 2011104575112 A CN2011104575112 A CN 2011104575112A CN 201110457511 A CN201110457511 A CN 201110457511A CN 102541562 A CN102541562 A CN 102541562A
Authority
CN
China
Prior art keywords
model
plc
code
interlocking
locking sheet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011104575112A
Other languages
Chinese (zh)
Other versions
CN102541562B (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 method for generating a PLC (programmable logic controller) code for an interlocking system, comprising the following steps of: A, setting a rule for transferring an interlocking table element model into an expanded interlocking table element model according to the actual operation requirements of the railway, wherein the rule conforms to the grammar of the model-model transfer language QVT; B, setting a rule for transferring the expanded interlocking table element model and an interlocking access logic element module into a PLC element model according to the transfer requirement of a PLC model, wherein the rule conforms to the QVT crammer; and C, setting a rule for transferring the PLC element model into a PLC code according to the transfer requirement of the PLC code, wherein the rule is based on the grammar of the model-text transfer language MOFScript. Due to the adoption of the method for generating the PLC (programmable logic controller) code for the interlocking system, the development efficiency of the software of the interlocking system can be improved, the reliability and the security of the software of the interlocking system can be enhanced, the problem of low efficiency caused by manual coding can be avoided, the human errors resulted from manual coding can be effectively alleviated, the synchronization of the document and the final code generated in the analysis and design phase can be guaranteed, and the follow-up software upgrading and maintaining efficiency and accuracy can be enhanced.

Description

The generation method of interlocking system PLC code
Technical field
The present invention relates to the track traffic technical field, relate in particular 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 to be referred as interlocking system) is the signal system that is used to command train operation, guarantee driving safety in the railway station; It is directly controlling the signalling arrangement in the whole station; To ensureing passenger-cargo transporting safely, improve conevying efficiency and play an important role.According to the regulation of standard EN 50126 and IEC61508, interlocking system is divided into the overcritical system of safety of SIL-4, so its reliability and security receive railway leading department, system development merchant and user's great attention.
In existing computer interlock system software design; Use conventional methods mostly; Promptly from the requirement profile of computer interlock system (stand and the locking sheet), the functional specification of manual development computer interlocking system, the mode of coding realizes writing of interlocking system code by hand then.The man power and material of the development approach labor of this manual coding, and unavoidably introduce artificial mistake is for the safe operation of interlocking system hides some dangers for.In addition, often cause the inconsistent of interlocking system design documentation in earlier stage and final code, increased the upgrading and the later maintenance difficulty of software with the method that is encoded to core.
In sum, there is following defective in existing computer interlock system software design scheme:
1, the manual coding of interlocking system can be introduced mistake inevitably, reduces the security of interlocking system;
Defectives such as it is long that 2, the manual coding of interlocking system has the construction cycle, and development efficiency is low;
3, in the manual coding process of interlocking system; The developer can ignore document and the design chart that analytical engineering phase produces; Only be absorbed in writing and debugging of code; Cause the inconsistent of final code and design documentation, bring difficulty for follow-up software upgrading and software maintenance, make the of a high price of software upgrading and software maintenance.
Summary of the invention
The technical matters that (one) will solve
The technical matters that the present invention will solve is; To above-mentioned defective, how a kind of generation method of interlocking system PLC code is provided, it can improve interlocking system Development of Software efficient; Reduce the mistake that manual coding causes, guarantee 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, comprise step:
A, meet the transformation rule of model to the locking sheet meta-model of model conversion language QVT grammer to expansion locking sheet meta-model according to the operation demand setting of actual railway;
B, require to be provided with expansion locking sheet meta-model and the interlocking route logic basis model of accord with Q VT grammer transformation rule to the PLC meta-model according to the conversion of PLC model;
C, require to be provided with based on the transformation rule of model to the PLC model of text-converted language MOFScript grammer to the PLC code according to the conversion of PLC code.
Wherein, said locking sheet meta-model is used for describing locking sheet grammer and static semantic;
Said expansion chained list meta-model is used for being described in the required register of the follow-up PLC code that adds in the locking sheet model and the grammer and the static semantic of timer state variable;
Said locking sheet model is used for setting up the station interlocking table model that meets the requirement of locking sheet syntax and semantics.
Wherein, said PLC meta-model is used for describing the grammer and the static semantic of PLC code;
Said PLC model is the model of interlocking system code;
Said interlocking route logical model is used to describe 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 said QVT is based on the model conversion engine of CPN, is used to realize the conversion of locking sheet model to expansion 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, the PLC model relates to great deal of language primitive and operation, the checking ability of complicated PLC set reduction the follow-up model conversion and model characteristics.And in the generation method of interlocking system PLC code of the present invention, the subclass of PLC code is only used in this characteristic field of interlocking system, makes the present invention simple.
The model conversion rule relates to locking sheet to the expansion locking sheet, and locking sheet is to the conversion of PLC model; The completeness of model conversion rule requires transformation rule to cover by all elements in the transformation model, and correctness guarantees that the semanteme before and after the conversion is consistent.Model conversion of the present invention guarantees the correctness and the completeness of transformation rule through formal proof engine CPN.
The present invention uses the locking sheet transformation rule based on MOFScript, has avoided the arbitrariness of model to code conversion, has guaranteed modularization and the standardization of model to code conversion.
The present invention has following advantage:
1, improves interlocking system Development of Software efficient, strengthened the reliability and the security of interlocking system software.The automatic generation of interlocking system PLC code has been avoided the h coding and the inefficiency problem that causes; Effectively alleviated the mistake that the h coding introduced; Simultaneously; Model conversion engine with formal semantics can effectively be verified the completeness and correct type of transformation rule, thereby has improved the security and the reliability of interlocking software.
2, the automatic PLC code generating method of interlocking system software, guaranteed document that analytical engineering phase produces and final code synchronously, promoted the efficient and the accuracy of software subsequent upgrade and later maintenance.
Description of drawings
Fig. 1 is the process flow diagram of the generation method of the described interlocking system PLC code of the embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing and embodiment, specific embodiments of the invention is done further explain.Following examples are used to explain the present invention, but are not used for limiting scope of the present invention.
As shown in Figure 1, the generation method of interlocking system PLC code of the present invention comprises step:
A, meet model to model conversion language (QVT according to the operation demand setting of actual railway; Query View and Transformation) the locking sheet meta-model of grammer is to the transformation rule of expansion locking sheet meta-model, to realize the automatic conversion of locking sheet model to expansion locking sheet model.
In this step, said locking sheet meta-model is used for describing locking sheet grammer and static semantic;
Said expansion chained list meta-model is used for being described in the required register of the follow-up PLC code that adds in the locking sheet model and the grammer and the static semantic of timer state variable.
Said locking sheet model is used for setting up the station interlocking table model that meets the requirement of locking sheet syntax and semantics, with modeling interlocking requirement profile;
B, require to be provided with expansion locking sheet meta-model and the interlocking route logic basis model of accord with Q VT grammer transformation rule according to the conversion of PLC model, to realize the expansion locking sheet model and the automatic conversion of route logical model of interlocking to the PLC model to the PLC meta-model.
In this step, said expansion locking sheet model is realized through register and the timer state variable that the follow-up PLC code generation of interpolation in the interlocking table model is needed.
Said PLC meta-model is used for describing the grammer and the static semantic of PLC code.
Said PLC model is the model of interlocking system code.
Said interlocking route logical model is used to describe the application of interlocking system route, route is set up and the UML state machine diagram of route release logic.
C, require to be provided with based on the transformation rule of model, with of the automatic conversion of realization PLC model to the PLC code to the PLC model of text-converted language MOFScript grammer to the PLC code according to the conversion of PLC code.
In this step, said MOFScript is the conversion of model to text, realizes the conversion of PLC model to the PLC code.
Wherein, the running environment of said QVT is based on the model conversion engine of colored Petri network (CPN, Colored Petri Net), is used to realize the conversion of locking sheet model to expansion locking sheet and PLC model.
In sum, the invention discloses a kind of generation method of interlocking system PLC code, in the prior art, the PLC model relates to great deal of language primitive and operation, the checking ability of complicated PLC set reduction the follow-up model conversion and model characteristics.And in the generation method of interlocking system PLC code of the present invention, the subclass of PLC code is only used in this characteristic field of interlocking system, makes the present invention simple.
The model conversion rule relates to locking sheet to the expansion locking sheet, and locking sheet is to the conversion of PLC model; The completeness of model conversion rule requires transformation rule to cover by all elements in the transformation model, and correctness guarantees that the semanteme before and after the conversion is consistent.Model conversion of the present invention guarantees the correctness and the completeness of transformation rule through formal proof engine CPN.
The present invention uses the locking sheet transformation rule based on MOFScript, has avoided the arbitrariness of model to code conversion, has guaranteed modularization and the standardization of model to code conversion.
The present invention has following advantage:
1, improves interlocking system Development of Software efficient, strengthened the reliability and the security of interlocking system software.The automatic generation of interlocking system PLC code has been avoided the h coding and the inefficiency problem that causes; Effectively alleviated the mistake that the h coding introduced; Simultaneously; Model conversion engine with formal semantics can effectively be verified the completeness and correct type of transformation rule, thereby has improved the security and the reliability of interlocking software.
2, the automatic PLC code generating method of interlocking system software, guaranteed document that analytical engineering phase produces and final code synchronously, promoted the efficient and the accuracy of software subsequent upgrade and later maintenance.
Above embodiment only is used to explain the present invention; And be not limitation of the present invention; The those of ordinary skill in relevant technologies field under the situation that does not break away from the spirit and scope of the present invention, can also be made various variations and modification; Therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (4)

1. the generation method of an interlocking system PLC code is characterized in that, comprises step:
A, meet the transformation rule of model to the locking sheet meta-model of model conversion language QVT grammer to expansion locking sheet meta-model according to the operation demand setting of actual railway;
B, require to be provided with expansion locking sheet meta-model and the interlocking route logic basis model of accord with Q VT grammer transformation rule to the PLC meta-model according to the conversion of PLC model;
C, require to be provided with based on the transformation rule of model to the PLC model of text-converted language MOFScript grammer to the PLC code according to the conversion of PLC code.
2. the generation method of interlocking system PLC code according to claim 1 is characterized in that, said locking sheet meta-model is used for describing locking sheet grammer and static semantic;
Said expansion chained list meta-model is used for being described in the required register of the follow-up PLC code that adds in the locking sheet model and the grammer and the static semantic of timer state variable;
Said locking sheet model is used for setting up the station interlocking table model that meets the requirement of locking sheet syntax and semantics.
3. the generation method of interlocking system PLC code according to claim 1 is characterized in that, said PLC meta-model is used for describing the grammer and the static semantic of PLC code;
Said PLC model is the model of interlocking system code;
Said interlocking route logical model is used to describe the application of interlocking system route, route is set up and the UML state machine diagram of route release logic.
4. according to the generation method of each described interlocking system PLC code among the claim 1-3, it is characterized in that the running environment of said QVT is based on the model conversion engine of CPN, be used to realize of the conversion of locking sheet model to expansion 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 true CN102541562A (en) 2012-07-04
CN102541562B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514062A (en) * 2013-10-11 2014-01-15 上海富欣智能交通控制有限公司 Dynamic coding method applied to computer interlocking system
CN103523054A (en) * 2013-10-25 2014-01-22 王先宏 Automatic control system of locomotive-depot signal system
CN104035782A (en) * 2014-06-27 2014-09-10 上海自仪泰雷兹交通自动化系统有限公司 Interlocking software development system based on Petri network
CN105159656A (en) * 2014-06-16 2015-12-16 上海宝信软件股份有限公司 PLC software programming aided design method
CN110874215A (en) * 2019-11-19 2020-03-10 深圳市宜居云科技有限公司 Drive control method and system for electric appliance or electric equipment
CN113534730A (en) * 2021-06-29 2021-10-22 广东利元亨智能装备股份有限公司 Model-based PLC control code generation method, system, device and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
JAN BOSCH等: "《Software Product Lines: Going Beyond》", 17 September 2010, SPRINGER *
KRZYSZTOF CZARNECKI等: "《Model Driven Engineering Languages and Systems》", 3 October 2008, SPRINGER *
RENZHONG WANG等: "Executable system architecting using systems modeling language in conjunction with colored Petri nets in a model-driven systems development process", 《SYSTEMS ENGINEERING》 *
朱彬等: "模型驱动架构中模型转换技术的研究", 《微机发展》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514062A (en) * 2013-10-11 2014-01-15 上海富欣智能交通控制有限公司 Dynamic coding method applied to computer interlocking system
CN103514062B (en) * 2013-10-11 2016-01-13 上海富欣智能交通控制有限公司 Be applied to the dynamic coding method of computer interlock system
CN103523054A (en) * 2013-10-25 2014-01-22 王先宏 Automatic control system of locomotive-depot signal 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
CN104035782A (en) * 2014-06-27 2014-09-10 上海自仪泰雷兹交通自动化系统有限公司 Interlocking software development system based on Petri network
CN104035782B (en) * 2014-06-27 2017-01-25 上海自仪泰雷兹交通自动化系统有限公司 Interlocking software development system based on Petri network
CN110874215A (en) * 2019-11-19 2020-03-10 深圳市宜居云科技有限公司 Drive control method and system for electric appliance or electric equipment
CN110874215B (en) * 2019-11-19 2023-03-21 深圳市宜居云科技有限公司 Drive control method and system for electric appliance or electric equipment
CN113534730A (en) * 2021-06-29 2021-10-22 广东利元亨智能装备股份有限公司 Model-based PLC control code generation method, system, device and storage medium

Also Published As

Publication number Publication date
CN102541562B (en) 2015-07-29

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
US8359111B2 (en) Method and apparatus for controlling a distributed automation system
CN106528744A (en) Format conversion method and system
WO2001067289A3 (en) Method and system for applying xml schema
CN105159656A (en) PLC software programming aided design method
CN103310861B (en) A kind of overall operation using digital human machine interface nuclear power plant controls the functional analysis approach of display
CN102355062A (en) IEC (International Electrotechnical Commission) 61850 relay protection model checking method
CN109213762A (en) The automatic Pilot track data generation method and device of Locomotive Running Monitor System
CN104049976A (en) System for automatically generating interlocking software based on Boolean logic
CN105760272A (en) Monitoring background service customization method based on plug-in and system based on method
Ecker et al. The metamodeling approach to system level synthesis
CN107505851A (en) Ovation control analogue systems and emulation mode based on Rinsim platforms
Ferrari et al. From commercial documents to system requirements: an approach for the engineering of novel CBTC solutions
Hei et al. Automatic transformation from UML statechart to Petri nets for safety analysis and verification
CN105760194A (en) DSP control system software update method and device
CN111338948B (en) Formal verification system
Huang et al. MDE-based verification of SysML state machine diagram by UPPAAL
CN108681445B (en) P L C program design method based on time automaton
CN109783507B (en) Automatic checking method and system for clutch regulation of engineering clearance distance of transformer substation
Zhao et al. Meta-models combination for reusing verification techniques
CN102521291B (en) ANTLR (Another Tool for Language Recognition)-based importing method for LDF (Log Data File) of description file of LIN (Local Interconnect Network)
CN101807147A (en) Method for automatically abstracting software architecture from embedded software code
Yang et al. Modeling and verification of RBC handover protocol
Parkhomenko Complex requirements analysis for the high-level design of Embedded 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