How a PLC works

Home  ⇒  Overview Courses   ⇒  PLC ⇒  How a PLC works

How a PLC works

From the content:

  • 0:00 Introduction PLC
  • 0:29 Hardware PLC
  • 2:50 PLC – how it works

Which programs are running within a PLC?

Within a PLC, more exactly the CPU, two different programs are running simultaneously:

- The operating system
- The user program

The operating system is a part of each CPU 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 programming 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?

How a PLC works

fig.: How a PLC works

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:

How a PLC works

fig.: How a 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.

Cycle time - Reaction time of a PLC

Cycle time - Reaction time of a PLC

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?

Leave a Reply

Your email address will not be published. Required fields are marked *

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO