Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 1030

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• These instructions add the time data in the device specified by (s2) to the time data in the device specified by (s1), and
store the addition result in the device number specified by (d) and later.
(s1)
hour
(0 to 23)
(s1)+1
minute
(0 to 59)
second
(0 to 59)
(s1)+2
(s1)+3
(s1)+4
1/1000second
(0 to 999)
Ex.
7:48:10:500 is added to 6:32:40:875.
(s1)
6
(s1)+1
32
(s1)+2
40
(s1)+3
(s1)+4
875
• If the time obtained as the result of addition exceeds 24 hours, 24 hours are subtracted from the resultant time to produce
the operation result. For example, when 20:20:20:500 is added to 14:20:30:875, the operation result is 10:40:51:375 rather
than 34:40:51:375.
(s1)
14
(s1)+1
20
(s1)+2
30
(s1)+3
(s1)+4
875
• Devices (s1)+3, (s2)+3, and (d)+3 are not used for operation.
• The clock data that has been read by the S(P).DATERD instruction can be added without conversion.
(d)
(d)+1
(d)+2
(d)+3
(d)+4
When 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 clock data, the data can be directly used for addition since it does
not perform calculation for the day of week.
Operation error
Error code
Description
(SD0)
3405H
The data in the device specified by (s1) or (s2) is out of range.
7 APPLICATION INSTRUCTIONS
1028
7.25 Clock Instructions
(s2)
hour
(s2)+1
minute
+
second
(s2)+2
(s2)+3
(s2)+4
1/1000second
(s2)
7
(s2)+1
48
+
(s2)+2
10
(s2)+3
(s2)+4
500
(s2)
20
(s2)+1
20
+
(s2)+2
20
(s2)+3
(s2)+4
500
Hour
Minute
Second
Day of week
Millisecond
(0 to 23)
(d)
hour
(0 to 59)
(d)+1
minute
(0 to 59)
second
(d)+2
(d)+3
(0 to 999)
(d)+4
1/1000second
(d)
(d)+1
(d)+2
(d)+3
(d)+4
(d)
(d)+1
(d)+2
(d)+3
(d)+4
(0 to 23)
(0 to 59)
(0 to 59)
(0 to 999)
14
20
51
375
10
40
51
375

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents