690
7 APPLICATION INSTRUCTIONS
7.15 Clock Instructions
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
• The following program subtracts the time data stored in devices starting from D10 from the clock data read from the clock
element when X1C is turned ON, and stores the result at devices starting from R10.
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100 The value set for (S1) and (S2) is not within the setting range.
4101 The range of the device specified by (S1), (S2) or (D) exceeds the range of
the corresponding device.
[Ladder Mode] [List Mode]
[Operation]
• Time data read operation triggered by DATERDP instruction.
• Subtraction as triggered by DATE-P instruction (when 10 hours, 40 minutes, and 10 seconds have been designated by D10 to D12).
Clock device
95
4
20
D101
D102
Year
Day
Month
3
21
20
1
D100
D103
D104
D105
D106
Hour
Minute
Second
Day of week
Time data
Hour: 10
Minute: 40
Second: 10
D11
D12
Hour: 16
Minute: 41
Second: 10
R11
R12
Hour: 3
Minute: 21
Second: 20
D104
D105
R10D10D103
3:21:20 - 10:40:10 -8:41:10
24 is added to this value
16:41:10