576
DATE+, DATE+P
F
unct
i
on
(1) Adds the time data designated by to the clock data designated by , and stores the result into the area starting from
the device designated by .
For example, adding the time 7:48:10 to 6:32:40 would result in the following operation:
(2) If the results of the addition of time exceed 24 hours, 24 hours will be subtracted from the sum to make the final operation
result.
For example, if the time 20:20:20 were added to 14:20:30, the result would not be 34:40:50, but would instead be
10:40:50.
Remark
See Page 573, Section 7.15.2 for further information regarding the data that can be set for hours, minutes, and seconds.
Operat
i
on
E
rror
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
Program
E
xamp
l
e
(1) The following program adds 1 hour to the clock data read from the clock element, and stores the results in the area
starting from D100 when X20 is ON.
[Ladder Mode]
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4100
The value set for and is not within the setting range.
––
––
––
––
4101
The range of the device specified by , or exceeds the range of
the corresponding device.
––
––
––
––
S2
S1
D
D
S2
S1
H
our
M
i
nute
Second
+
1
+
2
(0
to
23)
(0
to
59)
(0
to
59)
H
our
M
i
nute
Second
+
1
+
2
(0
to
23)
(0
to
59)
(0
to
59)
H
our
M
i
nute
Second
+
1
+
2
(0
to
23)
(0
to
59)
+
(0
to
59)
S1
S1
S2
S2
D
D
Data
range
Data
range
Data
range
D
S2
S1
+
1
+
2
+
1
+
2
+
1
+
2
+
S1
S1
S2
S2
D
D
H
our
:
7
M
i
nute
: 4
8
Second
:
10
H
our
:
1
4
M
i
nute
:
20
Second
:
50
H
our
:
6
M
i
nute
:
32
Second
: 4
0
D
S2
S1
+
1
+
2
+
1
+
2
+
1
+
2
+
S1
S1
S2
S2
D
D
H
our
:
20
M
i
nute
:
20
Second
:
20
H
our
:
10
M
i
nute
: 4
0
Second
:
50
H
our
:
1
4
M
i
nute
:
20
Second
:
30
S1
S2
S1
S2
D
Reads data in the clock element to D0 or later
Sets the time to D0 or later