EasyManuals Logo

Siemens Simatic S7 Series System Manual

Siemens Simatic S7 Series
726 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #165 background imageLoading...
Page #165 background image
Program instructions
7.2 Clock
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
165
7.2
Clock
7.2.1
Read and set real-time clock
LAD / FBD
STL
Description
TODR T
The Read real-time clock instruction reads the current time and date from the CPU
and loads it in an 8 byte Time buffer starting at byte address T.
TODW T
The Set real-time clock instruction writes a new time and date to the CPU using the
8 byte Time buffer data that is assigned by T.
Non-fatal errors with ENO = 0
SM bits affected
0006H Indirect address
0007H T data error
None
Input
Data type
Operand
T
BYTE
IB, QB, VB, MB, SMB, SB, LB, *VD, *LD, *AC
Note
READ_RTC, SET_RTC programming tips
Invalid dates are not accepted. If you enter February 30, for example, a time
-of-day non-
fatal
error will occur (0007H).
Do not use the READ_RTC / SET_RTC instructions in both the
main program and in an
interrupt routine. A READ_RTC / SET_RTC instruction in an interrupt routine cannot execute,
while another READ_RTC / SET_RTC instruction is executing. In this case, system flag bit
SM4.3 is set, indicating that two simultaneous acces
ses to the clock were attempted
resulting in a T data error (non
-fatal error 0007H).
The time
-of-
day clock in the CPU uses only the least significant two digits for the year, so for
the year 2000, the year is represented as 00. However, user programs that
use the year's
value must take into account the two
-digit representation.
Leap year is correctly handled through year 2099.

Table of Contents

Other manuals for Siemens Simatic S7 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7 Series and is the answer not in the manual?

Siemens Simatic S7 Series Specifications

General IconGeneral
CPUVaries by model (e.g., S7-300, S7-400, S7-1200, S7-1500)
Communication InterfacesPROFIBUS, PROFINET, Ethernet, MPI
ProgrammingTIA Portal, STEP 7
Programming LanguagesLAD, FBD, STL, SCL, GRAPH
I/O ModulesDigital, Analog, Specialty modules available
Operating Temperature0°C to 60°C (standard models)
MountingDIN rail mounting
Operating Voltage24V DC or 120/230V AC (varies by model)
Protection ClassIP20 (standard models)
MemoryVaries depending on the S7 model. Includes work memory (RAM) for program execution, load memory (EEPROM or Flash) for program storage, and system memory for operating system functions. Memory sizes range from kilobytes to megabytes.

Related product manuals