Departments of Electrical and Electronic Engineering and Mathematics and Computer Science, University College of Swansea, Singleton Park, Swansea SA2 8PP, UK
Abstract:
This paper is concerned with a procedure for the automatic generation of code for programmable logic controllers. Input to the procedure is data from a graphical model of the discrete event dynamic system which is to be implemented. The model is constructed in the form of a ladder diagram at a graphics workstation. The data are held as Prolog tuples, and Prolog is used in the procedure to implement a rule base through which the data are mapped into the programmable logic controller code. Underlying the rule base are two methodologies. The first is a top-down decomposition of the ladder diagram to a level of three basic structures. The second is a bottom-up integration of code based on these structures into code for the whole system. An example is used throughout and the approach is shown to be effective.