595
S.DATE-, SP.DATE-
1
2
3
4
4
6
7
8
7.16
Expa
nsion Clock Instru
ctions
7.16.3
S
.DATE-, S
P
.DATE-
Devices,
+3,
+3, and
+3 are not used for operation.
A clock data read by S(P).DATERD instruction can be directly subtracted.
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.
Caut
i
on
(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.
Program
E
xamp
l
e
(1) The following program subtracts the time data stored in the area starting from D10 from the clock data read from the
clock element when X1C is turned ON, and stores the result into the area starting from D100.
[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. (See
Function (1).)
––
4101
The range of the device specified by , or exceeds the range of
the corresponding device.
––
––
––
––
S1
S2
D
+
1
+
2
+
3
H
our
M
i
nute
Second
Day
of
w
eek
D
D
D
D
M
illi
second
When
the
c
l
ock
data
i
s
read
by
the
S(P)
.
DA
TE
RD
i
nstruct
i
on,
day
of
w
eek
i
s
i
nserted
bet
w
een
"
second
"
and
"
m
illi
second
".
I
f
the
S(P)
.
DA
TE- i
nstruct
i
on
i
s
used
to
read
the
c
l
ock
data,
the
data
can
be
d
i
rect
l
y
used
for
subtract
i
on
s
i
nce
i
t
does
not
perform
the
ca
l
cu
l
at
i
on
for
the
day
of
the
w
eek
.
+4
D
S1
S2
S1
S2
D
Sets the time to D10 or later.
Reads out the clock element
data to D0 or later.