E L C P r o g r a m m i n g M a n u a l
F o r
m o r e
i n f o r m a t i o n v i s i t :
w w w. e a t o n . c o m
M N 0 5 0 0 3 0 0 3 E
3 - 4 1 0
API Mnemonic
Operands
Function
162
TADD P
S
1
, S
2
, D
Calendar Data Addition
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K
H KnX
KnY
KnM KnS T
C
D
E
F
S
1
*
*
*
S
2
*
*
*
D
*
*
*
TADD, TADDP: 7 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32
16
P
32
16
P
32
16
P
32
16
P
32 16
P
Operands:
S
1
: Time augend
S
2
: Time addend
D
: Addition result
Operand
S
1
,
S
2
,
D
occupies 3 continuous addresses
Description:
1.
S
1
+
S
2
=
D
. The time data in the registers specified by
S
1
is added to the time data in the
registers specified by
S
2
and the result is stored in the registers specified by
D
.
2.
If the time data in
S
1
,
S
2
exceeds the allowable range, it will result in “operation error”. At this
time, the instruction will not be executed and M1067=ON, M1068=ON, and error code 0E1A
(HEX) will be written to D1067.
3.
If the addition result is a value greater than 24 hours, the Carry flag M1022=ON. The value of
the result shown in
D
is the time remaining above 24 hours.
4.
If the addition result is equal to 0 (zero, 0 hour, 0 minute, 0 second), the Zero flag M1020= ON.
Program Example:
When X0= ON, the instruction is executed. Add the time data specified by D0~D2 and D10~D12 and
store the result in the register specified by D20~D22.
08:10:20
06:40:06
14:50:26
X0
TADD
D0
D10
D20
D0 08(Hour)
D1 10(Min)
D2 20(Sec)
D20 14(Hour)
D21 50(Min)
D22 26(Sec)
D10 06(Hour)
D11 40(Min)
D12 06(Sec)
If the addition result is in a value greater than 24 hours, the Carry flag M1022=ON.
X0
TADD
D0
D10
D20
18:40:30
11:30:08
06:10:38
D0 18(Hour)
D1 40(Min)
D2 30(Sec)
D20 06(Hour)
D21 10(Min)
D22 38(Sec)
D10 11(Hour)
D11 30(Min)
D12 08(Sec)
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...