COMPACT PLC WITH EVENT-DRIVEN PROGRAM TASKS EXECUTION Mirosław CHMIEL, Edward HRYNKIEWICZ, Adam MILIK Institute of Electronics, Silesian University of Technology Akademicka 16, 44-100 Gliwice, POLAND <mchmiel, ehrynkiewicz, amilik>@polsl.pl Abstract: The paper presents modified idea of program execution in the Programmable Logic Controllers (PLCs). Instead of serial cyclic execution is proposed event sensitive cyclic execution. Proposed approach to program execution allow for selective execution of program blocks or tasks provided calculation condition for this part has changed since last time. Proposed method can be implemented as software modification or as hardware accelerated solution. The most important part of the idea is task or subprogram triggering condition computation. Different method of program optimization are discussed. Finally hardware implementation of event triggered system is presented. Copyright © 2006 IFAC Keywords: Programmable Logic Controller, Central Processing Unit, Control Program, Scan Time, Throughput Time 1. INTRODUCTION One of basic parameters that determine performance of Programmable Logic Controllers (PLCs) is the time needed to execute one thousand of instructions (Michel G., 1990). If the value of this parameter is low a possible range of PLC application is wider. Design and development of a CPU that would enable execution of a control program during extremely short time is becoming a very important task. Owing to its constructional features, such a unit should not only cover all the possible functional requirements but also make possible to take maximum benefits from the provided features (Aramaki et al. 1997, Donandot J. 1989, Chmiel, 2004, Chmiel et al., 2005, Chmiel and Hrynkiewicz, 2005). Typical PLC executes control program in serial- cyclic manner. Instruction from program are executed one after another. After execution point reach to end of instruction list cycle starts over. Each execution cycle begins with system and diagnostic part than the control program is executed. Execution process is independent from variable changes. Even though variables haven’t changed between consecutive program executions PLC always behaves in the same way. If variables the PLC is operate on have not changed since last processing then worked out result is equal to the one previously calculated. This is very important observation that allow to introduce modified approach in construction and implementation of program execution in PLC. This idea bases on event driven program execution. A Program fragments are executed conditionally only if input variables have changed since last calculation. This approach allow to reduce calculation overhead by execution of required parts of program instead of entire control algorithm processing. Commercially available PLCs can implement (at least partially) presented approach of event driven execution. This event driven implementation pushes all event detection to software that makes program longer and can potentially extends response time. Event driven architecture requires specific hardware construction that automatically detects regions that was modified and allow for immediate selection of task or function that should be executed. This will guarantee maximal reduction of response time as well it reduces access time to input-output area and internal variables.