Table of contents
3.4
Wiring guidelines ......................................................................................................................... 70
4
PLC concepts ....................................................................................................................................... 77
4.1
4.1.1
Operating modes of the CPU ...................................................................................................... 81
4.1.2
4.1.3
Organization blocks (OBs) .......................................................................................................... 85
4.1.3.1
Program cycle OB ....................................................................................................................... 86
4.1.3.2
Startup OB................................................................................................................................... 86
4.1.3.3
Time delay interrupt OB .............................................................................................................. 87
4.1.3.4
Cyclic interrupt OB ...................................................................................................................... 87
4.1.3.5
Hardware interrupt OB ................................................................................................................ 87
4.1.3.6
Time error interrupt OB ............................................................................................................... 88
4.1.3.7
4.1.3.8
Pull or plug of modules OB ......................................................................................................... 91
4.1.3.9
Rack or station failure OB ........................................................................................................... 92
4.1.3.10 Time of day OB ........................................................................................................................... 92
4.1.3.11 Status OB .................................................................................................................................... 93
4.1.3.12 Update OB................................................................................................................................... 93
4.1.3.13 Profile OB .................................................................................................................................... 94
4.1.4
4.1.5
CPU memory ............................................................................................................................... 99
4.1.5.1
System and clock memory ........................................................................................................ 101
4.1.6
Diagnostics buffer ..................................................................................................................... 103
4.1.7
Time of day clock ...................................................................................................................... 104
4.1.8
4.2
4.2.1
4.3
4.4
Data types ................................................................................................................................. 110
4.4.1
4.4.2
Integer data types ..................................................................................................................... 112
4.4.3
4.4.4
Time and Date data types ......................................................................................................... 113
4.4.5
4.4.6
Array data type .......................................................................................................................... 116
4.4.7
Data structure data type ............................................................................................................ 117
4.4.8
PLC data type ........................................................................................................................... 117
4.4.9
Pointer data types ..................................................................................................................... 118
4.4.9.1
"Pointer" pointer data type ........................................................................................................ 118
4.4.9.2
"Any" pointer data type .............................................................................................................. 119
4.4.9.3
"Variant" pointer data type ........................................................................................................ 120
4.4.10
4.4.11
4.5
Using a memory card ................................................................................................................ 124
4.5.1
4.5.2
card ........................................................................................................................................... 127
4.5.3
Transfer card ............................................................................................................................. 127
8
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG