Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 693

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Ex.
When adding 7:48:10 to 6:32:40
(s1)
6
32
(s1)+1
+
40
(s1)+2
• 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.
(s1)
14
(s1)+1
20
+
(s1)+2
30
• 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.
Device
Name
SM700
Carry
SM8020
Zero
SM8022
Carry
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
Error code
Description
(SD0/SD8067)
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
(s2)
7
48
(s2)+1
10
(s2)+2
(s2)
20
(s2)+1
20
(s2)+2
20
Description
If the result exceeds the maximum value of the time data, 23:59:59, this special relay turns on.
If the result is 0:00:00, this special relay turns on.
If the result exceeds the maximum value of the time data, 23:59:59, this special relay turns on.
(d)
14
20
(d)+1
50
(d)+2
(d)
10
(d)+1
40
(d)+2
50
8 APPLICATION INSTRUCTION
691
8.24 Clock Instruction
8

Hide quick links:

Advertisement

loading