268
4
4 Instructions4.8.2 Clock Operations
◆
Function
The time of an internal real-time clock is compared with a time range dened by two time values in
hours:minutes:
seconds
format. The result is stored in three consecutive variable units.
Example:
M20 (hours) = ON
M21 (hours) = ON
M22 (hours) = ON
S2S1
DS
ǒTZCP D40 D50 D10 M20Ǔ
M12
M20
M21
M22
D10 (Hours)
D11 (Minutes)
D12 (Seconds)
D10 (Hours)
D11 (Minutes)
D12 (Seconds)
D10 (Hours)
D11 (Minutes)
D12 (Seconds)
D40 (Hours)
D41 (Minutes)
D42 (Seconds)
D40 (Hours)
D41 (Minutes)
D42 (Seconds)
D50 (Hours)
D51 (Minutes)
D52 (Seconds)
D50 (Hours)
D51 (Minutes)
D52 (Seconds)
When M12 = ON, then M20, M21, or M22 is set to ON.
The TZCP instruction is not executed when M12 switches from ON to OFF, and M20 to M22
remain in the state prior to M12 = OFF. Use the RST or ZRST instruction to clear the
comparison result of M20 to M22.
4.8.2 Clock Operations
TADD: Clock data addition operation
◆
Overview
The TADD instruction adds two time values in
hours:minutes:seconds
format together. The result is
stored in designated variables.
TADD S1 S2 S3
Clock data addition
operation
Applicable model:
H3U
S1
Time
augend
Time augend, which is represented by hours, minutes, and seconds
respectively stored in three consecutive variable units
16-bit instruction
(7 steps)
TADD:
Continuous
execution
TADDP: Pulse
execution
S2
Time
addend
Time addend, which is represented by hours, minutes, and seconds
respectively stored in three consecutive variable units
D
Sum of two
time values
Sum of two time values, which is represented by hours, minutes,
and seconds respectively stored in three consecutive variable units
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S1 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
S2 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.