Справочник Пользователя для Mitsubishi Electronics FX2NC

Скачать
Страница из 382
FX Series Programmable Controllers
Assigning System Devices 9
9-8
9.4.1
Setting the real time clock
The RTC can be set using the special data registers and control flags as follows:
Device
Number
Function
Range
Device
Number
Comments
D8013
Seconds
0 to 59
M8015
Time
setting
Set ON to stop the clock.
When the clock is stopped the 
time values can be reset.
The clock restarts when the flag 
is reset to OFF.
D8014
Minutes
0 to 59
D8015
Hours
 0 to 23
D8016
Date
1 to 31 (correct for 
current Month)
M8016
Register
Hold
The clock data in the data regis-
ters is held. The clock still runs. 
Use this to pause the data to 
read the current time.
D8017
Month
1 to 12
D8018
Year
00 to 99 (1980 to 
2079)
M8017
Minute
Rounding
When on rounds the time up or 
down to the nearest minute.
D8019
Day of 
Week
0 to 6 (Sunday to Sat-
urday
M8018
Clock
Available
Automatically set to indicate the 
RTC is available.
M8019
Setting
Error
ON when the values for the RTC 
are out of range.
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
X00
M8015
M0
K30
D8013
MOV
K20
D8014
MOV
K10
D8015
MOV
K25
D8016
MOV
K4
D8017
MOV
K96
D8018
MOV
K4
D8019
MOV
M8017
X1
M0
PLF
The clock stops when X0 is ON.
The new values are set when X0 turns OFF.
X1 is used to reset the clock
to the nearest minute.
These devices are used as shown in the program on
the right.
Note: The FX
2 N ( C )
 has special instructions that
simplify the setting and use of the RTC.
See section 5.14 for more details.