Mitsubishi MELSEC Q Series Programming Manual page 746

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

S(P).DATE-
(2) If the subtraction results in a negative number, 24 will be added to the result to make a final
operation result.
For example, when the clock time 10:42:12:500 is subtracted from 4:50:32:875, the result is
not 6:8:20:375, but 18:8:20:375.
S1
S1
+1
S1
+2
S1
+3
S1
+4
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
• The device specified by
(For the Universal model QCPU, LCPU.)
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.
7-372
Hour: 4
S2
+1
Minute: 50
S2
Second: 32
S2
+2
-
--
S2
+3
S2
+4
Millisecond: 875
Devices,
+3,
+3, and
S2
S1
A clock data read by S(P).DATERD instruction can be directly subtracted.
D
D
+1
D
+2
D
+3
D
+4
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 subtraction since it does not
perform the calculation for the day of the week.
and
is outside the range. (See Function (1).)
S1
S2
,
S1
S2
Hour: 10
Minute: 42
Second: 12
--
Millisecond: 500
+3 are not used for operation.
D
Hour
Minute
Second
Day of week
Millisecond
or
exceeds the range of the corresponding device.
D
Hour: 18
D
D
+1
Minute: 8
D
+2
Second: 20
D
+3
--
D
+4
Millisecond: 375
(Error code: 4100)
(Error code: 4101)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents