Siemens SIMATIC S7 System Manual page 50

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

PLC concepts
3.1 Execution of the user program
The following types of events are recorded in the diagnostics buffer:
● Each system diagnostic event; for example, CPU errors and module errors
● Each state change of the CPU (each power up, each transition to STOP, each transition
To access the diagnostic buffer, you must be online. Locate the log under "Online &
diagnostics / Diagnostics / Diagnostics buffer". For more information regarding
troubleshooting and debugging, refer to the "Online and diagnostics" chapter.
Time of day clock
The CPU supports a time-of-day clock. A super-capacitor supplies the energy required to
keep the clock running during times when the CPU is powered down. The super-capacitor
charges while the CPU has power. After the CPU has been powered up at least 2 hours,
then the super-capacitor has sufficient charge to keep the clock running for typically 10 days.
The Time of Day Clock is set to system time, which is Coordinated Universal Time (UTC).
STEP 7 Basic sets the Time of Day Clock to system time. There are instructions to read the
system time (RD_SYS_T) or local time (RD_LOC_T). Local time is calculated by using the
time zone and daylight saving time offsets that you set in the CPU Clock device
configuration.
Configure the time-of-day clock for the CPU under the "Time of day" property. You can also
enable daylight saving time and specify the start and end times for daylight saving time. To
set the time-of-day clock, you must be online and in the "Online & diagnostics" view of the
CPU. Use the "Set time of day" function.
System and clock memory
You use the CPU properties to enable bytes for "system memory" and "clock memory". Your
program logic can reference the individual bits of these functions.
● You can assign one byte in M memory for system memory. The byte of system memory
● You can assign one byte in M memory for clock memory. Each bit of the byte configured
The CPU initializes these bytes on the transition from STOP mode to STARTUP mode. The
bits of the clock memory change synchronously to the CPU clock throughout the STARTUP
and RUN modes.
50
to RUN)
provides the following four bits that can be referenced by your user program:
– "Always 0 (low)" bit is always set to 0.
– "Always 1 (high)" bit is always set to 1.
– "Diagnostic graph changed" is set to 1 for one scan after the CPU logs a diagnostic
event. Because the CPU does not set the "diagnostic graph changed" bit until the end
of the first execution of the of the program cycle OBs, your user program cannot
detect if there has been a diagnostic change either during the execution of the startup
OBs or the first execution of the program cycle OBs.
– "First scan" bit is set to1 for the duration of the first scan after the startup OB finishes.
(After the execution of the first scan, the "first scan" bit is set to 0.)
as clock memory generates a square wave pulse. The byte of clock memory provides 8
different frequencies, from 0.5 Hz (slow) to 10 Hz (fast). You can use these bits as control
bits, especially when combined with edge instructions, to trigger actions in the user
program on a cyclic basis.
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents