
Program instructions
7.2 Clock
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
187
7.2.2
Read and set real-time clock extended
LAD / FBD
STL
Description
TODRX T
The Read real-time clock extended instruction reads the current time, date, and
daylight saving configuration from the PLC and loads it in a 19-byte buffer begin-
ning at the address assigned by T.
TODWX T
The Set real-time clock instruction writes a new time, date, and daylight saving
configuration to the PLC using the 19-byte buffer data that is assigned by byte
address T.
Non-fatal errors with ENO = 0
SM bits affected
•
0006H Indirect address
•
0007H T data error
•
0091H Operand out of range
None
Input
Data type
Operand
T
BYTE
IB, QB, VB, MB, SMB, SB, LB, *VD, *LD, *AC
Note
READ_RTCX, SET_RTCX programming tips
These instructions do not accept Invalid dates. If you enter February 30, for example, a time-
of-day non-fatal error occurs (0007H).
Do not use the READ_RTCX / SET_RTCX instructions in both the main program and in an
interrupt routine. A READ_RTCX / SET_RTCX instruction in an interrupt routine cannot
execute while another READ_RTCX / SET_RTCX instruction is executing. In this case, the
CPU sets system flag bit SM4.3, indicating that two simultaneous accesses 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 00
represents the year 2000. User programs that use the year's value must take into account
the two-digit representation.
The CPU handles leap year correctly through year 2099.
Содержание SIMATIC S7-200
Страница 30: ...Product overview 1 7 Programming software S7 200 SMART 30 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 267: ...Program instructions 7 6 Counters S7 200 SMART System Manual V2 3 07 2017 A5E03822230 AF 267 HSC modes 3 and 4 ...
Страница 394: ...Program instructions 7 18 Subroutine S7 200 SMART 394 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 425: ...Communication 8 5 PROFIBUS S7 200 SMART System Manual V2 3 07 2017 A5E03822230 AF 425 ...
Страница 786: ...Technical specifications A 11 S7 200 SMART cables S7 200 SMART 786 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 798: ...Error codes C 4 PLC fatal error codes S7 200 SMART 798 System Manual V2 3 07 2017 A5E03822230 AF ...
Страница 848: ...Ordering information F 6 Human Machine Interface devices S7 200 SMART 848 System Manual V2 3 07 2017 A5E03822230 AF ...