8 APPLICATION INSTRUCTION
8.24 Clock Instruction
691
8
Ex.
When adding 7:48:10 to 6:32:40
• If the sum of two values exceeds 24:00:00, the carry flag turns on, and the result will be the sum minus 24:00:00. For
example, if a time value of 20:20:20 is added to another time value of 14:30:30, the sum is 34:40:50. However, the actual
addition result will be 10:40:50.
• If the result is 0 (0:00:00), the zero flag turns on.
• If 1 second is added to 23:59:59, the result will be 0:00:00. This turns on both the carry flag and the zero flag.
• The table below shows the related devices.
Precautions
• These instructions occupy three points for each of three devices starting from device number specified by (s1), (s2), and (d)
respectively. Make sure that these devices are not used by other machine controls.
• When using the time value (hour, minute, second) of the built-in real time clock in the CPU module for the operation, use
the TRD(P) operation to read the special register values first. Then specify the word devices where the read values are
stored to each operand.
Operation error
Device
Name
Description
SM700
Carry
If the result exceeds the maximum value of the time data, 23:59:59, this special relay turns on.
SM8020
Zero
If the result is 0:00:00, this special relay turns on.
SM8022
Carry
If the result exceeds the maximum value of the time data, 23:59:59, this special relay turns on.
Error code
(SD0/SD8067)
Description
2820H
The device range specified by (s1), (s2), and (d) exceeds the corresponding device range.
3405H
Any of values specified by (s1) and (s2) is outside the following range.
0 to 23
Any of values specified by (s1)+1, (s2)+1, (s1)+2, and (s2)+2 is outside the following range.
0 to 59
(s1)
(s1)+1
(s1)+2
+
(s2)
(s2)+1
(s2)+2
(d)
(d)+1
(d)+2
6
32
40
7
48
10
14
20
50
(s1)
(s1)+1
(s1)+2
+
(s2)
(s2)+1
(s2)+2
(d)
(d)+1
(d)+2
14
20
30
20
20
20
10
40
50
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......