Table of contents
S7-200 SMART
6 System Manual, 09/2015, A5E03822230-AC
4 PLC concepts .......................................................................................................................................... 55
4.1 Execution of the control logic ................................................................................................. 55
4.1.1 Reading the inputs and writing to the outputs ........................................................................ 57
4.1.2 Immediately reading or writing the I/O ................................................................................... 57
4.1.3 Executing the user program ................................................................................................... 58
4.2 Accessing data ....................................................................................................................... 60
4.2.1 Accessing memory areas ....................................................................................................... 61
4.2.2 Format for Real numbers ....................................................................................................... 68
4.2.3 Format for strings ................................................................................................................... 68
4.2.4 Assigning a constant value for instructions ............................................................................ 69
4.2.5 Addressing the local and expansion I/O ................................................................................ 69
4.2.6 Using pointers for indirect addressing ................................................................................... 70
4.2.7 Pointer examples ................................................................................................................... 73
4.3 Saving and restoring data ...................................................................................................... 75
4.3.1 Downloading project components .......................................................................................... 75
4.3.2 Uploading project components .............................................................................................. 77
4.3.3 Types of storage .................................................................................................................... 78
4.3.4 Using a memory card ............................................................................................................. 79
4.3.5 Inserting a memory card in the CPU ...................................................................................... 81
4.3.6 Transferring your program with a memory card ..................................................................... 81
4.3.7 Restoring data after power on ................................................................................................ 84
4.4 Changing the operating mode of the CPU ............................................................................. 84
5 Programming concepts ............................................................................................................................ 85
5.1 Guidelines for designing a PLC system ................................................................................. 85
5.2 Elements of the user program ................................................................................................ 87
5.3 Creating your user program ................................................................................................... 90
5.3.1 Earlier versions of STEP 7-Micro/WIN projects ..................................................................... 90
5.3.2 Using STEP 7-Micro/WIN SMART user interface .................................................................. 92
5.3.3 Using STEP 7-Micro/WIN SMART to create your programs ................................................. 93
5.3.4 Using wizards to help you create your control program......................................................... 94
5.3.5 Features of the LAD editor ..................................................................................................... 95
5.3.6 Features of the FBD editor ..................................................................................................... 96
5.3.7 Features of the STL editor ..................................................................................................... 96
5.4 Data block (DB) editor ............................................................................................................ 97
5.5 Symbol table ........................................................................................................................ 100
5.6 Variable table ....................................................................................................................... 104
5.7 PLC error reaction ................................................................................................................ 109
5.7.1 Non-fatal errors and I/O errors ............................................................................................. 110
5.7.2 Fatal errors ........................................................................................................................... 111
5.8 Program edit in RUN mode .................................................................................................. 112
5.9 Features for debugging your program ................................................................................. 114