Chapter 7 Second Development PlatformVP3000
369
API Instruction code Operand Function
166 TRD P D
Time read
Type
Operand
Bit devices Word devices
16-bit instruction (3 steps)
TRD
Continuous
execution
type
TRDP
Pulse
execution
type
32-bit instruction
- - - -
Associated flag: none
X Y M K H KnX KnY KnM T C D
D
Caution for using operand
See the specification of each model for the scope of device’s usage.
Description
S: the device for storing the current time read in RTC
The RTC offers year, week, month, day, hour, minute, second, a total of 7 sets of data to store
in D1063–D1069. The function of TRD instruction allows programmers to read the current time
of RTC and store in the designated 7 registers.
D1063 only stores the last 2 digits of the A.D. year.
Example
When X0 = ON, read the current time of RTC and store in D0–D6 registers.
The content of D1064, 1 = Monday, 2 = Tuesday ... 7 = Sunday
X0
TRD D0
Special D Item Content General D Item
D1063 Year (A.D.) 00–99
D0 Year (A.D.)
D1064 Week 1–7
D1 Week
D1065 Month 1–12
D2 Month
D1066 Day 1–31
D3 Day
D1067 Hour 0–23
D4 Hour
D1068 Minute 0–59
D5 Minute
D1069 Second 0–59
D6 Second