17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>DVP</strong>-<strong>ES2</strong>/<strong>EX2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> - Programming<br />

API Mnemonic Operands Function<br />

161 TZCP P Time zone compare<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

SE<br />

<strong>SX2</strong><br />

Type<br />

Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F<br />

S 1 * * *<br />

S 2 * * *<br />

S * * *<br />

D * * *<br />

TZCP, TZCPP: 9 steps<br />

PULSE 16-bit 32-bit<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE SE SE <strong>SX2</strong><br />

Operands:<br />

S 1 : Lower bound of the time for comparison (occupies 3 consecutive devices) S 2 : Upper bound of<br />

the time for comparison (occupies 3 consecutive devices) S: Current time of RTC (occupies 3<br />

consecutive devices) D: Comparison result (occupies 3 consecutive devices)<br />

Explanations:<br />

1. TZCP instruction compares current RTC time in S with the range set in S 1 ~ S 2 and the<br />

comparison result is stored in D.<br />

2. S 1 , S 1 +1, S 1 +2: The “hour”, “minute” and “second” of the lower bound value for comparison.<br />

3. S 2 , S 2 +1, S 2 +2: The “hour”, “minute” and “second” of the upper bound value for comparison.<br />

4. S, S +1, S +2: The “hour”, “minute” and “second” of the current time of RTC.<br />

5. Usually the time of RTC in S is read by TRD instruction first then compared by TZMP<br />

instruction. If operand S, S 1 , S 2 exceed the available range, operation error occurs and M1067<br />

= ON, M1068 = ON. D1067 stores the error code 0E1A (HEX).<br />

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<br />

will be ON. (Lower bound S 1 should be less than upper bound S 2 .)<br />

Program Example:<br />

When X0 = ON, TZCP instruction executes and M10~M12 will be ON to indicate the comparison<br />

results. When X0 = OFF, the instruction is disabled but the ON/OFF status of M10~M12 remains.<br />

X0<br />

TZCP D0 D20 D10 M10<br />

M10<br />

ON when<br />

D0 Hour<br />

D1 Minute<br />

D10 Hour<br />

D11 Minute<br />

D2 Second<br />

D12 Second<br />

M11<br />

ON when<br />

D0 Hour<br />

D1 Minute<br />

D10 Hour<br />

D11 Minute<br />

D20 Hour<br />

D21 Minute<br />

D2 Second<br />

D12 Second<br />

D22 Second<br />

M12<br />

ON when<br />

D10 Hour<br />

D11 Minute<br />

D20 Hour<br />

D21 Minute<br />

D12 Second<br />

D22 Second<br />

3-378

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!