15: W
EEK
P
ROGRAMMER
I
NSTRUCTIONS
15-6
« FC4A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
»
Special Internal Relays for Calendar/Clock Data
Example: Setting Calendar/Clock Data
This example demonstrates how to set calendar/clock data using a ladder program. After storing new calendar/clock data
into data registers D8015 through D8021, special internal relay M8020 (calendar/clock data write flag) must be turned on
to set the new calendar/clock data to the clock cartridge.
Adjusting Clock Using a User Program
Special internal relay M8021 (clock data adjust flag) is provided for adjusting the clock data. When M8021 is turned on,
the clock is adjusted with respect to seconds. If
seconds
are between 0 and 29 for current time, adjustment for
seconds
will
be set to 0 and minutes remain the same. If
seconds
are between 30 and 59 for current time, adjustment for
seconds
will be
set to 0 and
minutes
are incremented one. M8021 is useful for precise timing which starts at zero seconds.
Example: Adjusting Calendar/Clock Data to 0 Seconds
M8016
Calendar Data Write Flag
When M8016 is turned on, data in data registers D8015 through D8018 (calendar
new data) are set to the clock car tridge installed on the CPU module.
M8017
Clock Data Write Flag
When M8017 is turned on, data in data registers D8019 through D8021 (clock
new data) are set to the clock car tridge installed on the CPU module.
M8020
Calendar/Clock Data
Write Flag
When M8020 is turned on, data in data registers D8015 through D8021 (calen-
dar/clock new data) are set to the clock car tridge installed on the CPU module.
M8120
REP
4
S1 R
D0
MOV(W)
D1 R
D8015
I0
SOTU
M8120 is the initialize pulse special internal relay.
When the CPU star ts, seven MOV(W) instructions store calendar/
clock data to data registers D0 through D6.
When input I0 is turned on, new calendar data (year, month, day,
and day of week) are moved to data registers D8015 through
D8018, and internal relay M0 is turned on for 1 scan time.
When input I1 is turned on, new clock data (hour, minute, and
second) are moved to data registers D8019 through D8021, and
internal relay M1 is turned on for 1 scan time.
When either M0 or M1 is turned on, calendar/clock data write flag
special internal relay M8020 is turned on to set the new calen-
dar/clock data to the clock car tridge.
M8125 is the in-operation output special internal relay.
While the CPU is running, the MOV(W) moves current calendar/
clock data to data registers D10 through D16.
REP
3
S1 R
D4
MOV(W)
D1 R
D8019
I1
SOTU
M0
M1
REP
7
S1 R
D8008
MOV(W)
D1 R
D10
M8125
M1
M8020
REP
S1 –
0
MOV(W)
D1 –
D0
REP
S1 –
10
MOV(W)
D1 –
D1
REP
S1 –
10
MOV(W)
D1 –
D2
REP
S1 –
2
MOV(W)
D1 –
D3
REP
S1 –
9
MOV(W)
D1 –
D4
REP
S1 –
30
MOV(W)
D1 –
D5
REP
S1 –
0
MOV(W)
D1 –
D6
M0
I2
SOTU
When input I2 is turned on, clock data adjust flag special internal relay M8021 is turned on
and the clock is adjusted with respect to seconds.
M8021
Содержание FC4A-C10R2
Страница 1: ...FC4A SERIES Micro Programmable Logic Controller User s Manual FC9Y B812 ...
Страница 6: ...PREFACE 4 FC4A MICROSMART USER S MANUAL ...
Страница 94: ...2 MODULE SPECIFICATIONS 2 74 FC4A MICROSMART USER S MANUAL ...
Страница 184: ...6 ALLOCATION NUMBERS 6 20 FC4A MICROSMART USER S MANUAL ...
Страница 218: ...8 ADVANCED INSTRUCTIONS 8 8 FC4A MICROSMART USER S MANUAL ...
Страница 240: ...11 BINARY ARITHMETIC INSTRUCTIONS 11 8 FC4A MICROSMART USER S MANUAL ...
Страница 244: ...12 BOOLEAN COMPUTATION INSTRUCTIONS 12 4 FC4A MICROSMART USER S MANUAL ...
Страница 252: ...13 SHIFT ROTATE INSTRUCTIONS 13 8 FC4A MICROSMART USER S MANUAL ...
Страница 274: ...15 WEEK PROGRAMMER INSTRUCTIONS 15 8 FC4A MICROSMART USER S MANUAL ...
Страница 378: ...22 DUAL TEACHING TIMER INSTRUCTIONS 22 4 FC4A MICROSMART USER S MANUAL ...
Страница 386: ...23 INTELLIGENT MODULE ACCESS INSTRUCTIONS 23 8 FC4A MICROSMART USER S MANUAL ...
Страница 408: ...24 ANALOG I O CONTROL 24 22 FC4A MICROSMART USER S MANUAL ...
Страница 426: ...26 COMPUTER LINK COMMUNICATION 26 6 FC4A MICROSMART USER S MANUAL ...