EasyManua.ls Logo

Delta AH500 - Explanation of Real-Time Clock Instructions

Delta AH500
749 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 6 Applied Instructions
6-363
6.17.2 Explanation of Real-time Clock Instructions
API
Instruction code Operand
Function
1600 TRD P
D
Reading the time
Device
X Y M S T C HC D L SM SR E PR K 16# $” DF
D
Pulse instruction 16-bit instruction (3 steps)
32-bit instruction
AH500
AH500
-
Symbol:
D
Device in which the result is
stored
Word
Explanation:
1. D: The device in which the current time is stored
2. The operand D occupies seven consecutive devices.
3. The built-in real-time clock in the CPU module provides the data relating to the year, the week,
the moth, the day, the minute, and the second. The data is stored in SR391~SR397. The
instruction TRD is used to read the current time into the seven registers.
4. The last two digits of the year number for A.D. are stored in SR391.
Example:
When M0 is ON, the current time is read from the real-time clock into D0~D6. The value 1 in SR397
represents Monday, the value 2 represents Tuesday, and by analogy, the value 7 represents
Sunday.
Special data
register
Item Value
General data
register
Item
SR391
Year (A.D.)
00~99
D0
Year (A.D.)
SR392
Month
1~12
D1
Month
SR393
Day
1~31
D2
Day
SR394
Hour
0~23
D3
Hour
SR395
Minute
0~59
D4
Minute
SR396
Second
0~59
D5
Second
SR397
Week
1~7
D6
Week
Additional remark:
1. If D+6 exceeds the device range, the instruction is not executed, SM0 is ON, and the error
code in SR0 is 16#2003.
2. When SM220 is ON, the real-time clock is calibrated within ±30 seconds. If the value of the
second in the real-time clock is within the range between 0 and 29, the value of the second is
cleared to zero. If the value of the second in the real-time clock is within the range between 30

Table of Contents

Other manuals for Delta AH500

Related product manuals