iDect FC6A series User Manual page 243

Microsmart all-in-one type
Table of Contents

Advertisement

Example ladder program 1
This example sets the calendar and clock in a user program.
If you turn on M8020 with the new calendar/clock data set in the write-only data registers D8015 to D8021, the internal clock on
the FC6A Series MicroSmart is updated with the current time (calendar, clock). In this example, the FC6A Series MicroSmart
internal clock is set to 9:35:00 on Tuesday February 21, 2012.
MOV(W)
M8120
MOV(W)
MOV(W)
MOV(W)
MOV(W)
MOV(W)
MOV(W)
MOV(W)
MOV(W)
SOTU
I0000
MOV(W)
SOTU
I0001
M0000
M0001
MOV(W)
M8125
Example ladder program 2
When I1 turns off to on, the seconds on the internal clock are corrected to 0 seconds.
SOTU
I0001
When input I1 turns on, clock data adjust flag M8021 turns on to correct the seconds on the internal clock.
Note: The internal clock backup time is guaranteed for one year. If the backup time is exceeded, the retained clock data is lost and the current time
is initialized as 00:00:00 on January 1, 2000. For details on the battery, see "Battery Monitor" on page 5-58.
S1 R
D1 R
REP
D8008
D8015
7
S1 -
D1 -
REP
12
D0000
S1 -
D1 -
REP
2
D0001
S1 -
D1 -
REP
21
D0002
S1 -
D1 -
REP
2
D0003
S1 -
D1 -
REP
9
D0004
S1 -
D1 -
REP
35
D0005
S1 -
D1 -
REP
0
D0006
S1 R
D1 R
REP
D8000
D8015
4
M0000
S1 R
D1 R
REP
D0004
D8019
3
M0001
M8020
S1 R
D1 R
REP
D8008
D0010
7
M8021
FC6A S
M
S
A
ERIES
ICRO
MART
M8120 is the initial pulse that turns on for only one scan at the start of
operation.
When the FC6A Series MicroSmart starts operating, the current calendar/
clock data is stored in D8015 to D8021 and the new calendar/clock data is
stored in D0 to D6 with the MOV (move) instruction.
When external input I0 turns on, the new calendar data is stored in special
data registers D8015 to D8018.
Internal relay M0 turns on for one scan only.
When external input I1 turns on, the new clock data is stored in special data
registers D8019 to D8021.
Internal relay M1 turns on for one scan only.
When external input M0 or M1 turns on, M8020 turns on and the calendar/
clock data is written to the internal clock.
(M8020: Calendar/Clock Data Write Flag)
M8125 is a special internal relay that is always on during operation.
While the FC6A Series MicroSmart is running, the current time (calendar,
clock) is stored in D10 to D16 with the MOV instruction.
-
-O
T
U
'
M
LL
IN
NE
YPE
SER
S
ANUAL
5: F
UNCTIONS AND
FC9Y-B1722
S
ETTINGS
5-57

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents