8 APPLICATION INSTRUCTION
8.24 Clock Instruction
693
8
Ex.
When subtracting 3:50:10 from 10:40:20
• If the remainder is a negative time value, the borrow flag turns on. The actual result will be the remainder plus 24:00:00. For
example, if a time value of 10:42:12 is subtracted from another time value of 4:50:32, the remainder is -6:08:20. However,
the actual subtraction result will be 18:08:20.
• If the result is 0 (0:00:00), the zero flag turns on.
• 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
SM8020
Zero
If the result is 0:00:00, this special relay turns on.
SM8021
Borrow
If the execution result of the TSUB(P) instruction is less than 0:00:00, 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
10
40
20
3
50
10
6
50
10
(s1)
(s1)+1
(s1)+2
-
(s2)
(s2)+1
(s2)+2
(d)
(d)+1
(d)+2
4
50
32
10
42
12
18
8
20
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: ......