Modeling, Specification and Construction of PLC-programs
https://doi.org/10.18255/1818-1015-2013-2-104-120
Abstract
A new approach to construction of reliable discrete PLC-programs with timers — programming based on specification and verification — is proposed. Timers are modelled in a discrete way. For the specification of a program behavior we use the linear-time temporal logic LTL. Programming is carried out in the ST-language according to a LTLspecification. A new approach to programming of PLC is shown by an example. The proposed programming approach provides an ability of a correctness analysis of PLC-programs using the model checking method. The programming requires fulfillment of the following two conditions: 1) a value of each variable should be changed not more than once per one full PLC-program implementation (per one full working cycle of PLC); 2) a value of each variable should only be changed in one place of a PLC-program. Under the proposed approach the change of the value of each program variable is described by a pair of LTL-formulas. The first LTL-formula describes situations that increase the value of the corresponding variable, the second LTL-formula specifies conditions leading to a decrease of the variable value. The LTL-formulas (used for specification of the corresponding variable behavior) are constructive in the sense that they construct the PLC-program, which satisfies temporal properties expressed by these formulas. Thus, the programming of PLC is reduced to the construction of LTL-specification of the behavior of each program variable.
About the Authors
E. V. KuzminRussian Federation
д-р физ.-мат. наук, профессор,
Sovetskaya str., 14, Yaroslavl, 150000, Russia
V. A. Sokolov
Russian Federation
д-р физ.-мат. наук, профессор,
Sovetskaya str., 14, Yaroslavl, 150000, Russia
References
1. Грис Д. Наука программирования: Пер. с англ. М.: Мир, 1984. 416 с. (Gries D. The Science of Programming. Springer-Verlag, 1981).
2. Кларк Э. М., Грамберг О., Пелед Д. Верификация моделей программ: Model Checking: Пер. с англ. М.: МЦНМО, 2002. 416 с. (Clark E. M., Grumberg O., Peled D. A. Model Checking. The MIT Press, 2001).
3. Кузьмин Е. В., Соколов В. А. О построении и верификации программ логических контроллеров // Моделирование и анализ информационных систем. 2012. Т. 19, №4. С. 25–36 (Kuzmin E. V., Sokolov V. A. On Construction and Verification of PLCPrograms // Modeling and analysis of information systems. 2012. V. 19, №4. P. 25–36 [in Russian]).
4. Кузьмин Е. В., Соколов В. А. О верификации LD-программ логических контроллеров // Моделирование и анализ информационных систем. 2012. Т. 19, №2. С. 138–144 (Kuzmin E. V., Sokolov V. A. On Verification of PLC-Programs Written in the LD-Language // Modeling and analysis of information systems. 2012. V. 19, №2. P. 138–144 [in Russian]).
5. Парр Э. Программируемые контроллеры: руководство для инженера. М.: БИНОМ. Лаборатория знаний, 2007. 516 с. (Parr E. A. Programmable Controllers. An engineer’s guide. Newnes, 2003. 442 p.).
6. Петров И. В. Программируемые контроллеры. Стандартные языки и приемы прикладного проектирования. М.: СОЛОН-Пресс, 2004. 256 с. (Petrov I. V. Programmiruemye kontrollery. Standartnye jazyki i priemy prikladnogo proektirovanija. M.: SOLON-Press, 2004. 256 p. [in Russian]).
7. CoDeSys. Controller Development System. http://www.3s-software.com/
8. SMV. The Cadence SMV Model Checker. http://www.kenmcmil.com/smv.html
Review
For citations:
Kuzmin E.V., Sokolov V.A. Modeling, Specification and Construction of PLC-programs. Modeling and Analysis of Information Systems. 2013;20(2):104-120. (In Russ.) https://doi.org/10.18255/1818-1015-2013-2-104-120