- English
- Deutsch
- Português
- Español
- PLC Programable Logic Control
- What is a PLC
- Analog and Digital
- PLC Programming Languages
- Basic Logic Functions
- Combinatorial Logic
- Wire Break Detection
- Algebraic Simplification of Logic Circuits
- Karnaugh map
- PLC Exercises I
- PLC-exercises II – boolean algebra
- PLC exercise – Tank level monitoring
- Work Order PLC Material detection
- How a PLC works
- PLC function Set and Reset
- PLC-Program for H-Bridge
- Sequence control
- Analog value processing
- Bus Network
- Number Systems
- Videos about PLC
- Index PLC
How a PLC works
Table of Contents
ToggleFrom the content:
Which programs are running within a PLC?
Within a PLC, more exactly the CPU, two different programs are running simultaneously:
The operating system is a part of each Central processing Unit (C.P.U) and organizes all the functions and the processes of the CPU that are not associated with a specific control task. Its responsibilities include:
- Handling the cold and warm restart
- Updating of the process image of the inputs and the output
- The call of the user program
- The detection of alarms and alarm calls of Ob´s
- How to handle errors
- Managing memory
- The communication of programmíng devices and other communication partners
The user program - this is your program what you have written and loaded into the CPU. It is a specific application program.
How the instructions of a user program are processed by the CPU?
How are the instructions of a user program processed by the CPU? To illustrate the operation of a PLC, please write the following program. With the botton I0.0 "On" the output is switched on, with the bottom "Off" switched off. You may write the set command first or at the end of the program, i.e. in network 1 or network 2. But how does the output behave when both inputs are active at the same time?
Note: Commands used in this program (Instruction list IL):
- A => And
- S => Set
- AN => And Not
- R => Reset
We recognize that obviously the last command is executed, i.e. dominates. The explanation is the way the PLC works:
First the signal states of the inputs are read. Then these input signals are processed, i.e. the logical links are created. The instructions of the program are processed one after the other, i.e. sequentially.
Once the program has been processed, the outputs are activated, i.e. a Bit pattern is sent in parallel to the output modul of the PLC.
Of course, this process must be carried out repeatedly, i.e. a new cylcles begins.
In this context, two terms describe the speed of the PLC:
The cycle time is the time required by the PLC for a single execution of the program. The cycle time is composed of the processing time of an instruction and the number of instructions
The reaction time of a PLC is generally many times greater than the cycle time. It is composed of delay time of the input and output modules and the cycle time.
Note: The cycle time is an essential feature of a PLC and usually refers to 1 k = 1024 program instructions. Example: Our PLC has the average processing time of 200 ns for one instruction. Which value has the cycle time?
Tcycle = 1024 * 200 ns = 204800 ns = 204.8 μs = 0.2048 ms