Siemens 020-011 User Manual
Industry Sector, IA&DT
SCE Training Curriculum
Page 20 of 79
To be used only in Educational and R&D Facilities
TIA Portal Module 020-011, Edition 04/2014
Unrestricted / © Siemens AG 2014. All Rights Reserved
SCE_EN _020-011_R1404_Startup Programming with SIMATIC S7-1500
5.6
How is the program processed in the PLC?
Programs are processed in a PLC cyclically in the following sequence:
1.
First, the status is transferred from the process image of the outputs (PIO) to the outputs; these are
then switched on or switched off.
2.
Next the processor (which is practically
the PLC’s brain) polls whether the individual inputs carry
voltage. The status of the inputs is stored in the process image of the inputs (PII). For the inputs
that carry voltage the info
rmation 1 or 'high‘ is stored, for those that do not carry voltage the
information 0 or 'low‘ is stored..
3.
This processor processes the program stored in the program memory. The program consists of a
list of logic operations and instructions that are processed one after the other. For the required input
information the PII entered previously is accessed, and the results of the logic operation are written
list of logic operations and instructions that are processed one after the other. For the required input
information the PII entered previously is accessed, and the results of the logic operation are written
to the process image of the outputs (PIO). If required, the processor also accesses other memory
areas; for example, for local data of subprograms, data blocks and flags.
4.
Finally, internal tasks of the operating system such as self-test and communication are carried out.
Then the process continues with Item 1.
Then the process continues with Item 1.
Note:
The time the processor needs for this sequence is called cycle time. It in turn depends on the number
and type of instructions and the processor capability.
and type of instructions and the processor capability.
Program of the PLC in
program memory
1st instruction
2nd instruction
3rd instruction
4th instruction
...
Last instruction
program memory
1st instruction
2nd instruction
3rd instruction
4th instruction
...
Last instruction
1. Transferring the status from the PIO to the outputs.
2. Storing the inputs in the PII.
2. Storing the inputs in the PII.
3. Processing the
program instruction by
instruction with access
to PII and PIO
program instruction by
instruction with access
to PII and PIO
4. Performing internal tasks of the operating
system. (communication, self-
system. (communication, self-
test, etc…)
PII
Local data
Flags
Data blocks
PIO