Chapter 16 PLC Function ApplicationsC2000-HS
16-105
API
TADD
Calendar data addition
162
P
Bit device Word device
16-bit command (7 STEP)
TADD Continuous
execution type
TADDP Pulse
execution type
32-bit command
- - - -
Flag signal: M1020 Zero flag
M1022 Carry flag
M1068 Calendar error
X Y M K H KnX KnY KnM T C D
S1 * * *
S2 * * *
D * * *
Notes on operand usage:
Please refer to the function specifications table for each device in
series for the scope of device usage
S
1
: time addend. S
2
: time augend. D: time sum.
The calendar data in hours, minutes, and seconds designated by S
2
is added to the
calendar data in hours, minutes, and seconds designated by S
1
, and the result is
stored as hours, minutes, and seconds in the register designated by D.
If the value of S
1
or S
2
exceeds the range, this is considered an operating error, the
command will not execute, M1067, M1068=On, and D1067 will record the error
code 0E1A(HEX).
If the results of addition are greater than or equal to 24 hours, carry flag
M1022=On, and D will display the results of addition minus 24 hours.
If the results of addition are equal to 0 (0 hours, 0 minutes, 0 seconds), zero flag
M1020=On.
When X10=On, the TADD command will be executed, and the calendar data in
hours, minutes, and seconds designated by D0 to D2 will be added to the calendar
data in hours, minutes, and seconds designated by D10 to D12, and the results are
stored as a total number of hours, minutes, and seconds in the registers
designated by D20 to D22.
X10
TADD D0 D10 D20