7-370
S(P).DATE+
(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, when the time 20:20:20:500 is added to 14:20:30:875, the result is not
34:40:51:375, but 10:40:51:375.
Devices, +3, +3, and +3 are not used for operation.
A clock data read by the S(P).DATERD instruction can be directly added.
Operation Error
(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.
• The data set by and is outside the range. (See Function (1).) (Error code: 4100)
• The device specified by , or exceeds the range of the corresponding device.
(For the Universal model QCPU only.) (Error code: 4101)
Caution
(1) Specifying digit for the bit device can be used only when the following conditions (a) and (b)
are met.
(a) Digit specification: K4
(b) Head of device: multiple of 16
When the above conditions (a) and (b) are not met, INSTRCT CODE ERR.
(error code:4004) will occur.
D
S2
S1
+1
+2
+1
+2
+1
+2
+
S1
S1
S2
S2
D
D
Hour: 14
Minute: 20
Second: 30
+3
+3
+3
S1
S2
D
--
+4
+4
+4
S1
S2
D
Millisecond: 875
Hour: 20
Minute: 20
Second: 20
--
Millisecond: 500
Hour: 10
Minute: 40
Second: 51
--
Millisecond: 375
S1
S2
D
+1
+2
+3
Hour
Minute
Second
Day of week
D
D
D
D
Millisecond
When the clock data is read by the S(P).DATERD instruction,
day of week is inserted between "second" and "millisecond".
If the S(P).DATE+ instruction is used to read the clock data,
the data can be directly used for add
ition since it does not perform
the calculation for the day of a week.
+4
D
S1
S2
S1
S2
D