PLC Architecture and Operation Explained
PLC Architecture and Operation Explained
The central processing unit - CPU, Central Processing Unit - is, so to speak
thus, the intelligence of the system since, through the interpretation of the
user program instructions - and, based on the values of the
inputs–, activate the desired outputs.
The output section. Through the interface, it works in the opposite way to that of
inputs; that is, it decodes the signals coming from the CPU, amplifies them and
send with them the output devices or actuators – lamps, relays,
contactors, starters, solenoid valves, etc. –. There are also interfaces here
for adaptation to outputs and for protection of internal circuits.
Data memory. The memory in this area is also of the RAM type or
NVRAM.
On one side, there is the image of the states of the entries and
outputs, and on the other hand, the numerical data and internal variables, such as counters,
•Program memory. This memory, along with the processor, makes up the
CPU is divided into two areas: the so-called system memory, which
it uses RAM, and that which corresponds to the system program or firmware,
What is a fixed program recorded by the manufacturer and, therefore, uses the type of
ROM memory. In some PLCs, only the EPROM is used, so that
the system memory program can be modified, after deleting the previous one
with UV.
In compact PLCs, the inputs and outputs - I/O - are located in a single
block, along with the rest of the PLC.
In modular systems, the I/O are independent modules or cards, with several I/O.
that connect to the data bus through their driver and connector
corresponding, or to a frame or rack, which provides it with that connection to
bus and its mechanical support.
The main functions are to adapt the working voltages and intensities of
the sensors and actuators for the working of the PLC electronic circuits;
make an electrical separation between the logic circuits and the power ones
generally, through optocouplers – and provide the means of
identification of the sensors and actuators before the processor.
Entries
The tickets are easily identifiable, as they are physically characterized by
the terminals to connect input devices or sensors, for their
numbering, and by its identification input entry.
They also have a luminous activation indicator, through an LED diode.
Digital. They are the most used and correspond to an input signal either or
nothing; that is, at a level of tension or its absence. Example of elements of
these are the end of race switches, buttons, etc.
Outputs
The identification of the outputs is carried out with the indication of output.
It is in the outputs where the output devices are connected or coupled.
actuators.
It includes an LED power indicator.
There are three types of outputs that can occur:
The relay,
A transistor,
A triac.
While the transistor output is used when the actuators are DC, the
Relays and triacs are commonly used for AC actuators.
Regarding the intensities that each of the outputs can support, these are
variables; however, they usually range between 0.5 and 2 A.
2.5 Sources.
It is responsible for supplying voltage to all the modules that connect to the
PLC, as well as the processing unit and other cards according to the
PLC configuration. Its function is to reduce and adapt the input voltage, which
it is of high values and alternating current, to lower voltage values and of
direct current, Initially, the input voltage must be reduced to values
more manageable. Then, through a rectifier, it must be converted from AC to
Finally, regulators must be used to ensure stability in the
output voltage,
In addition to compact PLCs like the S7-200, there are modular PLCs, with
possibility of exchanging its components and possibilities of expansion of
its capabilities:
Modular PLC
RUN: The PLC executes the user program as normal operating mode, it
birthday the cycle of functioning explained with prior
STOP or TERM: The PLC ignores the user program and executes its programs.
internal. In this mode, the user can monitor and/or program the PLC from
a PC
ERROR: The PLC stops the execution of the user program, as its
internal programs find a programming or hardware error.
As in the case of STOP mode, all outputs are deactivated and not allowed.
carry out the RUN mode until the problem that caused it is resolved
error
POWER-ON: This mode occurs from the moment the PLC is powered on;
this uses the POWER-ON mode to self-configure and perform checks
of the system state. Once the startup routines are completed, they assume according to the
conditions of the system, one of the other three nodes.
Exampe
l oftheoperan
tigmodesoftheDL05PLChasthreeoperan
tigmodes:mode
TERM,[Link](kilethsi exampe
l ),tisi omtied
POWER-ON mode, which will always be present in the PLC.
Mode Description
TERM (Termn
i a)[Link]
li be
l.
debuggn
i g, programmn
i g, and execuo
tin. The
dfierent ways and the changes n
i the
programmn
i g can be swtcihed to
through programming software.
RUN (ProgramExecuto
i n).TheCPUsi forced
wth
in
i theexecuo
tinmodefitheydonotexsit
errors.
STOP TheCPUsisrtuggnilgo
tso
tp.
The operation of the Programmable Logic Controller is, except for the initial process
what follows a Reset, of sequential and cyclic type, that is, the operations have
place one after another, and they continue to repeat while the automaton is
under tension.
Figure 2.7 schematically shows the sequence of operations performed
the automaton, with the operations of the operation cycle being the ones that are repeated
indefinitely.
The operating cycle is divided into two parts as can be observed in the
diagram scheme of the figure. called Initial Process and Operation Cycle.
Figure 2.7. Sequence of operations of an automaton.
Initial process:
As shown in the figure, before entering the operating cycle, the automaton
carry out a series of common actions, which mainly aim to initialize
the states of the same and check the hardware. These check routines,
included in the monitor ROM program, check:
If any error is found during the check, the error LED would be activated and would remain
error code registered.
Once the connections have been verified, the internal variables are initialized:
The internal memory positions are turned OFF (except for the)
maintained or protected against voltage loss
All image I/O memory positions are cleared.
All counters and timers are cleared (except for those maintained or
protected against voltage losses.
Once the Initial Process has passed and no errors have appeared, the automaton enters
the Operation Cycle.
Operating cycle:
This cycle can be considered divided into three blocks:
Common Process
Execution of the program
Peripheral service
Common process:
In this first block, the cyclical checks of connections are carried out and of
program memory, protecting the system against:
Hardware errors (I/O connections, absence of program memory, etc.).
Syntax errors (impossible to execute program).
Program execution:
In this second block, the statuses of the entries and exits are consulted.
and the command or dispatch orders are prepared based on them.
The execution time of this block of operations is the sum of:
Access time to I/O interfaces.
Time for program scrutiny
And this, in turn, depends, respectively on:
Number and location of I/O interfaces.
Length of the program and type of CPU that processes it
Peripheral service:
This third and final block is only addressed if there is anything pending.
exchange with the outside. In case there is any, the CPU dedicates time to it.
limited, from 1 to 2ms, in handling the data exchange. If this time were not
sufficient, the service will be interrupted until the next cycle.
The total cycle times (real time) are then the sum of times.
employees in carrying out the various operations of the cycle
Self-diagnosis (Common process)
I/O Update (Program Execution)
Program execution. (Execution of the program)
Peripheral service. (Peripheral service)
2.9 Quick process elements.
There are three types of activities that require quick responses from the automaton:
Programming with PC