Delta C2000 series User Manual page 542

Classical field oriented control ac motor drive
Hide thumbs Also See for C2000 series:
Table of Contents

Advertisement

API
TSUB
163
P
Bit Devices
X
Y
M
K
S1
S2
D
Operands:
Please refer to the specifications of each model for the
range of operands.
S1: Time Minuend S2: Time Subtrahend D: Subtraction result
Explanation
Operand S1, S2, D occupies 3 continuous devices.
將 S1 − S2 = D. The time data in the register specified by S2 is subtracted from the
time data in the register specified by S1 and the 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 subtraction result is a negative value (less than 0), the Barrow Flag M1021=
On. The value of the result shows in D is the time remaining above 24 (twenty-four)
hour.
If the subtraction result is equal to 0 (zero, 0 hour, 0 minute, 0 second), the Zero
flag M1020= On.
When X10= On, the command is executed. The time data specified by D10~D12 is
Example
subtracted from the time data specified by D0~D2 and the result is stored in the
register specified by D20~D22.
X10
Word Devices
H
KnX KnY KnM
T
TSUB
D0
20(
D0
min)
D1
20(
sec)
D2
5(
20: 20: 5
Chapter 16 PLC Function C2000 Series
Calendar data substraction
16-bit command (5 STEPS)
TSUB
C
D
32-bit command
 Flag signal: M1020 (Zero flag)
D10
D20
hr)
min
D11
sec)
8(
D12
14: 30: 8
16-95
TSUBP
M1022 (Carry flag)
M1068 (calendar error)
D20
D21
49(
)
D22
57(
5: 49: 57
5(
hr)
min)
sec)

Advertisement

Table of Contents
loading

Table of Contents