Siemens SIMATIC S7-200 System Manual page 93

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Tip
The S7-200 CPU does not perform a check to verify that the day of week is correct based upon
the date. Invalid dates, such as February 30, could be accepted. You should ensure that the
date you enter is correct.
Do not use the TODR/TODW instruction in both the main program and in an interrupt routine. A
TODR/TODW instruction in an interrupt routine that attempts to execute while another
TODR/TODW instruction is in process cannot be executed. SM4.3 is set indicating that two
simultaneous accesses to the clock were attempted (non-fatal error 0007).
The time-of-day clock in the S7-200 uses only the least significant two digits for the year, so for
the year 2000, the year is represented as 00. The S7-200 PLC does not use the year
information in any way. However, user programs that use arithmetic or compares with the year's
value must take into account the two-digit representation and the change in century.
Leap year is correctly handled through year 2096.
Read Real Time Clock Extended
The Read Real Time Clock Extended (TODRX) instruction
reads the current time, date, and daylight savings
configuration from the PLC and loads it in a 19-byte buffer
beginning at the address specified by T.
Set Real Time Clock Extended
The Set Real Time Clock (TODWX) instruction writes the
current time, date, and daylight savings configuration to the
PLC beginning at the 19-byte buffer address specified by T.
You must code all date and time values in BCD format (for
example, 16#02 for the year 2002). Table 6-9 shows the
format of the 19-Byte Time Buffer (T).
The time-of-day clock initializes the following date and time
after extended power outages or memory has been lost:
Tip
The only time the S7-200 CPU uses bytes 9 to18 is when the "User Specified" mode is selected
in byte 8. Otherwise, the last value written to these bytes by STEP 7--Micro/WIN or the
SET_RTCX instruction is returned.
S7-200 Instruction Set
Error conditions that set ENO = 0
H 0006 (indirect address)
H 000C (clock cartridge not present)
H 0091 (range error)
Error conditions that set ENO = 0
H 0006 (indirect address)
H 0007 (TOD data error)
H 000C (clock cartridge not present)
H 0091 (range error)
Date:
01--Jan--90
Time
00:00:00
Day of Week: Sunday
Chapter 6
79

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents