Table of contents
S7-1200 Programmable controller
6
System Manual, 11/2011, A5E02486680-05
3.3.8.4 Installing the TS adapter on a wall.............................................................................................. 56
3.4
Wiring guidelines......................................................................................................................... 56
4
PLC concepts .......................................................................................................................................... 61
4.1
Execution of the user program.................................................................................................... 61
4.1.1
Operating modes of the CPU...................................................................................................... 63
4.1.2
Processing the scan cycle in RUN mode.................................................................................... 66
4.1.3
Organization blocks (OBs) .......................................................................................................... 66
4.1.4
Event execution priorities and queuing....................................................................................... 68
4.1.5
Monitoring the cycle time ............................................................................................................ 73
4.1.6
CPU memory............................................................................................................................... 75
4.1.6.1 System and clock memory.......................................................................................................... 78
4.1.6.2 Configuring the outputs on a RUN-to-STOP transition ............................................................... 80
4.2
Data storage, memory areas, I/O and addressing...................................................................... 80
4.2.1
Accessing the data of the S7-1200 ............................................................................................. 80
4.3
Processing of analog values ....................................................................................................... 85
4.4
Data types ................................................................................................................................... 86
4.4.1
Bool, Byte, Word, and DWord data types ................................................................................... 87
4.4.2
Integer data types ....................................................................................................................... 88
4.4.3
Floating-point real data types...................................................................................................... 88
4.4.4
Time and Date data types........................................................................................................... 89
4.4.5
Data structure data type.............................................................................................................. 92
4.4.6
PLC data type ............................................................................................................................. 93
4.4.7
Pointer data types ....................................................................................................................... 93
4.4.7.1 "Pointer" pointer data type .......................................................................................................... 94
4.4.7.2 "Any" pointer data type................................................................................................................ 95
4.4.7.3 "Variant" pointer data type .......................................................................................................... 96
4.4.8
Accessing a "slice" of a tagged data type ................................................................................... 96
4.4.9
Accessing a tag with an AT overlay ............................................................................................ 98
4.5
Using a memory card.................................................................................................................. 99
4.5.1
Inserting a memory card in the CPU......................................................................................... 100
4.5.2
Configuring the startup parameter of the CPU before copying the project to the memory
card ........................................................................................................................................... 102
4.5.3
Transfer card............................................................................................................................. 102
4.5.4
Program card ............................................................................................................................ 104
4.6
Recovery from a lost password................................................................................................. 107
5
Device configuration .............................................................................................................................. 109
5.1
Inserting a CPU......................................................................................................................... 110
5.2
Detecting the configuration for an unspecified CPU ................................................................. 111
5.3
Adding modules to the configuration......................................................................................... 112
5.4
Configuring the operation of the CPU ....................................................................................... 114
5.5
Configuring the parameters of the modules.............................................................................. 115
5.6
Configuring the CPU for communication................................................................................... 117
5.6.1
Creating a network connection ................................................................................................. 117
5.6.2
Configuring the Local/Partner connection path......................................................................... 118
5.6.3
Parameters for the PROFINET connection............................................................................... 120