97BPLC concepts
4.1 Execution of the user program
S7-1200 Programmable controller
64
System Manual, 11/2011, A5E02486680-05
A memory reset clears all work memory, clears retentive and non-retentive memory areas,
and copies load memory to work memory. A memory reset does not clear the diagnostics
buffer or the permanently saved values of the IP address.
Note
When you download one or more DBs from STEP 7 V11 to an S7-1200 V2 CPU, the
retentive and non-retentive values of those DBs are set to their start values. The next
transition to RUN performs a warm restart, setting all non-retentive data to their start values
and setting all retentive data to their retained values.
When you download project elements (such as device configuration, code blocks or DBs)
from STEP 7 V10.5 to any S7-1200 CPU or from STEP 7 V11 to an S7-1200 V1 CPU (or a
V2 CPU that has been configured as a V1 CPU), the next transition to RUN mode resets all
of the DBs in the project to their start values.
You can configure the "startup after POWER ON" setting of the CPU. This configuration item
appears under the "Device configuration" for the CPU under "Startup". When power is
applied, the CPU performs a sequence of power-up diagnostic checks and system
initialization. During system initialization the CPU deletes all non-retentive bit memory and
resets all non-retentive DB contents to the initial values from load memory. The CPU retains
retentive bit memory and retentive DB contents and then enters the appropriate operating
mode. Certain detected errors prevent the CPU from entering the RUN mode. The CPU
supports the following configuration choices:
●
No restart (stay in STOP mode)
●
Warm restart - RUN
●
Warm restart - mode prior to POWER OFF
You can change the current operating mode using the "STOP" or "RUN" commands
(Page 639) from the online tools of the programming software. You can also include a STP
instruction (Page 222) in your program to change the CPU to STOP mode. This allows you
to stop the execution of your program based on the program logic.
●
In STOP mode, the CPU handles any communication requests (as appropriate) and
performs self-diagnostics. The CPU does not execute the user program, and the
automatic updates of the process image do not occur.
You can download your project only when the CPU is in STOP mode.
●
In STARTUP and RUN modes, the CPU performs the tasks shown in the following figure.