Programming options
5.1 Easy to configure the hardware devices
Easy Book
Manual, 05/2009, A5E02486774-01
47
Configuring the STOP-to-RUN operation of the CPU
Whenever the operating state changes from STOP to RUN, the CPU clears the process
image inputs, initializes the process image outputs, and processes the startup OBs.
(Therefore, any read accesses to the process-image inputs by instructions in the startup OBs
will read zero rather than the current physical input value.) To read the current state of a
physical input during the startup mode, you must perform an immediate read. The startup
OBs and any associated FCs and FBs are executed next. If more than one startup OB
exists, each is executed in order according to the OB number, with the lowest OB number
executing first.
The CPU also performs the following tasks during the startup processing.
●
Interrupts are queued but not processed during the startup phase
●
No cycle time monitoring is performed during the startup phase
●
Configuration changes to HSC (high-speed counter), PWM (pulse-width modulation), and
PtP (point-to-point communication) modules can be made in startup
●
Actual operation of HSC, PWM, and point-to-point communication modules only occurs in
RUN
After the execution of the startup OBs finishes, the CPU goes to RUN mode and processes
the control tasks in a continuous scan cycle.
Use the CPU properties to configure how the CPU starts up after a power cycle.
Select whether the CPU
starts in STOP mode,
RUN mode, or in the
previous mode (prior to
the power cycle).
The CPU performs a warm restart before going to RUN mode. Warm restart resets all non-
retentive memory to the default start values, but retains the current values stored in the
retentive memory.
Note
The CPU always performs a cold restart after a download
Whenever you download an element of your project (such as a program block, data block, or
hardware configuration), the CPU performs a cold restart on the next transition to RUN
mode. In addition to clearing the inputs, initializing the outputs and clearing the non-retentive
memory the cold restart also clears the retentive memory areas.
After the cold restart that follows a download, all subsequent STOP-to-RUN transitions
perform a warm restart (that does not clear the retentive memory).