12.4 CSUB (Clock Subtraction)
■
Ladder diagram
■
List of operands
Operand Description
S1 Starting device address of clock data
S2 Starting device address of time data
D Starting device address of subtraction result
(Note 1) For details of clock data and time data, refer to "19.2 Clock and Time Data"
■
Available devices (●: Available)
Operan
d
16-Bit device:
32-Bit
device:
Integer
Real
numbe
r
St
rin
g
Index
modifie
r
W
X
W
Y
W
R
W
L
W
S
S
D
D
T
L
D
U
M
WI
W
O
TS
C
S
TE
C
E
IX K U H SF
D
F
" "
S1 ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ●
D ● ● ● ● ● ● ●
■
Outline of operation
● Time data (hours, minutes and seconds), stored in the area starting with [S2], are subtracted
from the clock data (year, month, day, hours, minutes and seconds), stored in the area
starting with [S1].
● The calculation result is stored in the area starting with [D].
● This operation takes leap years into account.
12.4 CSUB (Clock Subtraction)
12-8 WUME-FP7CPUPGR-12