Delta DVP-ES2 User Manual
Page 494
D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E O p e r a t i o n M a n u a l - P r o g r a m m i n g
3 - 3 7 8
API Mnemonic
Operands
Function
161
TZCP P
Time zone compare
Controllers
ES2/EX2 SS2 SA2
SE
SX2
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
*
*
*
S
*
*
*
D
*
*
*
TZCP, TZCPP: 9 steps
PULSE 16-bit 32-bit
ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2
Operands:
S
1
: Lower bound of the time for comparison (occupies 3 consecutive devices) S
2
: Upper bound of
the time for comparison (occupies 3 consecutive devices) S: Current time of RTC (occupies 3
consecutive devices) D: Comparison result (occupies 3 consecutive devices)
Explanations:
1.
TZCP instruction compares current RTC time in S with the range set in S
1
~ S
2
and the
comparison result is stored in D.
2.
S
1
, S
1
+1, S
1
+2: The “hour”, “minute” and “second” of the lower bound value for comparison.
3.
S
2
, S
2
+1, S
2
+2: The “hour”, “minute” and “second” of the upper bound value for comparison.
4.
S, S +1, S +2: The “hour”, “minute” and “second” of the current time of RTC.
5.
Usually the time of RTC in S is read by TRD instruction first then compared by TZMP
instruction. If operand S, S
1
, S
2
exceed the available range, operation error occurs and M1067
= ON, M1068 = ON. D1067 stores the error code 0E1A (HEX).
6. If
S < S
1
and S < S
2
, D is ON. When S > S
1
and S > S
2
, D+2 is ON. For other conditions, D + 1
will be ON. (Lower bound S
1
should be less than upper bound S
2
.)
Program Example:
When X0 = ON, TZCP instruction executes and M10~M12 will be ON to indicate the comparison
results. When X0 = OFF, the instruction is disabled but the ON/OFF status of M10~M12 remains.
X0
M10
TZCP
D0
D20
D10
M10
M11
M12
ON when
ON when
ON when
D0 Hour
D1 Minute
D2 Second
D10 Hour
D11 Minute
D12 Second
D10 Hour
D11 Minute
D12 Second
D0 Hour
D1 Minute
D2 Second
D10 Hour
D11 Minute
D12 Second
D20 Hour
D21 Minute
D22 Second
D20 Hour
D21 Minute
D22 Second