Delta Electronics VFD037CH23A-21 — функция TADD в PLC: Добавление календарных данных [547/638]

Превью страниц Страница 547 / 638
Delta Electronics VFD750CH23A-00/-21 [547/638] 10 20 6 40 6 14 50 26
Chapter 16 PLC Function CH2000 Series
16-94
API
162
TADD
P
Calendar data addition
Bit Devices Word Devices
X
Y
M
K H KnX KnY KnM T C D
S1
S2
D
Operands:
Please refer to the specifications of each model for the
range of operands.
16-bit command (5 STEPS)
TADD
TADDP
32-bit command
Flag signal: M1020 (Zero flag)
M1022 (Carry flag)
M1068 (calendar error)
Explanation
S1: Time augend S2: Time addend D: Addition result
Operand S1, S2, D occupies 3 continuous devices
S1 + S2 = D. The time data in the register specified by S1 is added to the time data
in the register specified by S2 and the addition result is stored in the register
specified by D.
If the time data in S1, S2 exceeds the range, it will result in “operation error”. At this
time, the command won’t be executed and M1067=On, M1068=On, records error
code 0E1A (HEX) in D1067.
If the addition result is in a value greater than 24 hours, the Carry flag M1022=On.
The value of the result shows in D is the time remaining above 24 hours.
If the addition result is equal to 0 (zero, 0 hour, 0 minute, 0 second), the Zero flag
M1020= On.
Example
When X10= On, the command is executed. Add the time data specified by
D0~D2 and D10~D12 and store the result in the register specified by
D20~D22.
X10
TADD D0 D10 D20
+
D0
D1
D2
8(
hr
)
min
)
20(
sec
)
D11
D12
6(
hr
)
40(
min)
6(
sec
)
D20
D21
D22
14(
hr
)
50(
min
)
26(
sec)
8 : 10 : 20
6 : 40 : 6
14: 50: 26

Содержание

1610

Изучите функцию TADD для добавления календарных данных в PLC. Узнайте о операндах, флагах и примерах использования для эффективной работы с временными данными.