Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Mnemonic Operands Function Controllers 161, Tzcp

Models: DVP-ES2/EX2/SS2/SA2/SX2/SE

1 702
Download 702 pages 56.54 Kb
Page 494
Image 494

DVP - ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming

API

Mnemonic

Operands

Function

Controllers

161

TZCP

P

 

Time zone compare

ES2/EX2 SS2 SA2 SX2

 

SE

 

 

 

 

 

 

 

Type

Bit Devices

 

Word devices

Program Steps

OP

X

Y

M

S K

H

KnX

KnY

KnM

KnS

T

C

D

E

 

F TZCP, TZCPP: 9 steps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

*

*

*

 

 

 

 

 

 

 

 

 

 

S2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

*

*

*

 

 

 

 

 

 

 

 

 

 

S

 

 

 

 

 

 

 

 

 

 

 

 

 

 

*

*

*

 

 

 

 

 

 

 

 

 

 

D

 

*

*

*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PULSE

 

 

 

 

16-bit

 

 

 

 

32-bit

 

 

 

 

 

 

 

 

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

 

 

 

 

 

 

 

 

 

SE

SE

SE

 

Operands:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S1: Lower bound of the time for comparison (occupies 3 consecutive devices)

S2: 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 S1~ S2 and the comparison result is stored in D.

2.S1, S1 +1, S1 +2: The “hour”, “minute” and “second” of the lower bound value for comparison.

3.S2, S2 +1, S2 +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, S1, S2 exceed the available range, operation error occurs and M1067 = ON, M1068 = ON. D1067 stores the error code 0E1A (HEX).

6.If S < S1 and S < S2, D is ON. When S > S1 and S > S2, D+2 is ON. For other conditions, D + 1 will be ON. (Lower bound S1 should be less than upper bound S2.)

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

 

 

TZCP

D0

 

D20

D10

M10

 

 

 

 

 

 

 

M10

ON when

D0

Hour

D10

Hour

 

 

 

 

 

 

 

 

 

 

 

 

D1

Minute

D11 Minute

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D2

Second

D12

Second

 

 

M11

ON when

D0

Hour

D10

Hour

D20

Hour

 

 

 

 

 

 

 

 

D1

Minute

D11 Minute

D21

Minute

 

 

 

 

 

 

 

 

 

 

D2

Second

D12

Second

D22

Second

M12

ON when

 

 

D10

Hour

D20

Hour

 

 

 

 

 

 

D11 Minute

D21

Minute

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

D12

Second

D22

Second

3 - 378

Page 494
Image 494
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Mnemonic Operands Function Controllers 161, Tzcp, Time zone compare