7 APPLICATION INSTRUCTIONS
7.15 Clock Instructions
701
7
Time comparison
LDTM, ANDTM, ORTM
• This instruction compares the clock data specified by (S1) with those specified by (S2), or the clock data specified by (S1)
with the current time data. Setting n determines the data to be compared.
When either (S1) or (S2) corresponds to any of the following conditions in comparing given or current time
data with specified clock data, the operation error (error code: 4101) or a malfunction may occurs.
• The range of the devices to be used for the index modification is specified over the range of the device
specified by (S1) or (S2).
• File registers are specified by (S1) or (S2) without a register set.
• QnU(D)(H)CPU, QnUDE(H)CPU: the serial number (first five digits) is "10102" or later
• Q00UJCPU, Q00UCPU, Q01UCPU, QnUDVCPU: Supported
(S1): Head number of the devices where the data to be compared are stored (BIN 16 bits)
(S2): Head number of the devices where the data to be compared are stored (BIN 16 bits)
n: Value of the data to be compared or the number of the stored data to be compared (BIN 16 bits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S1)
(S2)
n
• Comparison of given clock data
This instruction treats the clock data specified by (S1) and the clock data specified by (S2) as a normally open contact, and compares the data in accordance
with the value of n.
• Comparison of current time data
This instruction treats the clock data specified by (S1) and the current time data as a normally open contact, and compares the data in accordance with the value
of n.
This instruction treats the clock data specified by (S2) as dummy data and ignores the data.
Basic
High
performance
Process
Redundant
Universal
LCPU
Ver.
n
S2S1
LD
n
S2S1
AND
OR
n
S2S1
Command
Command
indicates an instruction symbol of TM=/TM<>/TM</TM<=/TM>/TM>=.
(S1)
(S1)+1
(S1)+2
(S2)
(S2)+1
(S2)+2
Hour
Minute
Second
Comparison
operator
Comparison
operation result
Hour
Minute
Second
Data range
(0 to 23)
(0 to 59)
(0 to 59)
Data range
(0 to 23)
(0 to 59)
(0 to 59)
(S1)
(S1)+1
(S1)+2
Hour
Minute
Second
Data range
Comparison
operator
Comparison
operation result
Current time (hour, minute, second)
(0 to 23)
(0 to 59)
(0 to 59)