1014
7 APPLICATION INSTRUCTIONS
7.25 Clock Instructions
■Applicable devices
• These instructions compare the date data in the devices specified by (s1) and (s2), or compare the date data in the device
specified by (s1) with the current date. Set the comparison target by (s3).
• Set each data in binary.
• Set the year data in the range from 1980 to 2079 in the devices specified by (s1) and (s2).
• Set the month data in the range from 1 to 12 in the devices specified by (s1)+1 and (s2)+1.
• Set the date data in the range from 1 to 31 in the devices specified by (s1)+2 and (s2)+2.
• Set the following in (s3) as comparison target setting values. The following shows the bit configuration of (s3).
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB,
FX, FY
J\ T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
U\G, J\,
U3E\(H)G
Z LT, LST,
LC
LZ K, H E $
(s1)
(s2)
(s3)
• Comparing two specified date data
These instructions compare the date data in the device specified by (s1) with the date data in the device specified by (s2) in accordance with the conditions set
by (s3). (Devices are used as a normally open contact.)
(1)Relational operator
(2)Comparison result
• Comparing the specified date data with the current date
These instructions compare the date data in the device specified by (s1) with the current date data in accordance with the conditions set by (s3). (Devices are
used as a normally open contact.) The date data in the device specified by (s2) is regarded as dummy data and ignored.
(1)Relational operator
(2)Current date data
(3)Comparison result
(1) Set "day" as comparison target.
(2) Set "month" as comparison target.
(3) Set "year" as comparison target.
(4) Set 0. If a value other than 0 is set, the operation result will be non-
continuity.
(5) When 1 is set to the 15 bit, the data in the device specified by (s1) is
compared with the current date in accordance with the conditions set in the
0 to 2 bits.
(s1)
(s1)+1
(s1)+2
(s2)
(s2)+1
(s2)+2
year
month
day
year
month
day
(1) (2)
(1980 to 2079)
(1 to 12)
(1 to 31)
(1980 to 2079)
(1 to 12)
(1 to 31)
(s1)
(s1)+1
(s1)+2
year
month
day
year
month
day
(3)
(2)
(1)
(1980 to 2079)
(1 to 12)
(1 to 31)
b15 b14 b3 b2 b1 b0
0/1 0 0/1 0/1 0/1
(5) (4) (3) (2) (1)