8 APPLICATION INSTRUCTION
8.24 Clock Instruction
703
8
Processing details
• 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 4 digit "year" data in the devices specified by (s1) and (s2) within the range 1980 to 2079.
• Set the "month" data in the devices specified by (s1)+1 and (s2)+1 within the range 1 to 12.
• Set the "date" data in the devices specified by (s1)+2 and (s2)+2 within the range 1 to 31.
• Set the following in (s3) as comparison target setting values. The following shows the bit configuration of (s3).
• When 0 is set to the 0 to 2 bits, the date data are not compared. When 1 is set, the entire date data (year, month, and day)
are compared.
• When 0 is set to the 15 bit, the data in the device specified by (s1) and the date data in the device specified by (s2) are
compared. When 1 is set, the data in the device specified by (s1) is compared with the current date. The date data in the
device specified by (s2) is ignored.
• The following table lists processing details of each bit.
• 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.)
• 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) 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.
(s3) value when
comparing two
specified date data
(s3) value when
comparing the
specified date data
with the current date
Comparison
target
Contents of processing
0001H
8001H
Day
Only data in the device specified by (s1)+2 is compared.
0002H
8002H
Month
Only data in the device specified by (s1)+1 is compared.
0003H
8003H
Month, day
Data in the device areas specified by (s1)+2 and (s1)+2 are compared.
0004H
8004H
Year
Only data in the device specified by (s1) is compared.
0005H
8005H
Year, day
Data in the device areas specified by (s1) and (s1)+2 are compared.
0006H
8006H
Year, month
Data in the device areas specified by (s1) and (s1)+1 are compared.
0007H
8007H
Year, month, day
The entire date data in the device areas specified by (s1), (s1)+1, and (s1)+2
are compared.
Other than 0001H to 0007H, 8001H to 8007H
None
The entire date data in the device areas specified by (s1), (s1)+1, and (s1)+2
are not compared. (The operation result will be non-continuity.)
(s1)
(s1)+1
(s1)+2
(s2)
(s2)+1
(s2)+2
year
month
day
year
month
day
(1980 to 2079)
(1 to 12)
(1 to 31)
(1980 to 2079)
(1 to 12)
(1 to 31)
Relational
operator
Comparison
operation
result
(s1)
(s1)+1
(s1)+2
Relational
operator
year
month
day
(1980 to 2079)
(1 to 12)
(1 to 31)
Comparison
operation
result
Current date
(Year/month/day)
b15 b14
b3
b2
b1
b0
0/1
0
0/1 0/1 0/1
(5)
(4)
(3) (2) (1)
Содержание MELSEC iQ-F FX5
Страница 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Страница 2: ......
Страница 17: ...15 CONTENTS ...
Страница 24: ...22 MEMO ...
Страница 25: ...23 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW 2 PRECAUTIONS ON PROGRAMMING ...
Страница 126: ...124 6 SEQUENCE INSTRUCTIONS 6 3 Output Instructions Operation error There is no operation error ...
Страница 132: ...130 6 SEQUENCE INSTRUCTIONS 6 3 Output Instructions Operation error There is no operation error ...
Страница 140: ...138 6 SEQUENCE INSTRUCTIONS 6 3 Output Instructions Operation error There is no operation error ...
Страница 191: ...7 BASIC INSTRUCTIONS 7 2 Arithmetic Operation Instructions 189 7 Operation error There is no operation error ...
Страница 202: ...200 7 BASIC INSTRUCTIONS 7 2 Arithmetic Operation Instructions Operation error There is no operation error ...
Страница 278: ...276 7 BASIC INSTRUCTIONS 7 4 Bit Processing Instructions Operation error There is no operation error ...
Страница 280: ...278 7 BASIC INSTRUCTIONS 7 4 Bit Processing Instructions Operation error There is no operation error ...
Страница 915: ...18 TYPE CONVERSION FUNCTIONS 18 13 Converting DWORD to WORD 913 18 Operation error There is no operation error ...
Страница 917: ...18 TYPE CONVERSION FUNCTIONS 18 14 Converting DWORD to INT 915 18 Operation error There is no operation error ...
Страница 932: ...930 18 TYPE CONVERSION FUNCTIONS 18 26 Converting DINT to WORD Operation error There is no operation error ...
Страница 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Страница 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Страница 1107: ...I 1105 MEMO ...
Страница 1111: ......