Mitsubishi Electric MELSEC FX3U Programming Manual page 605

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
Program example
1. Example of setting the clock data (time)
In the program example shown below, the real time clock is set (to 15:20:30 on Tuesday, April 25, 2001).
X000
X001
• The shaded area indicates the set value of each item.
• When setting the time, it is recommended to set the time to several minutes ahead in advance, and then
set X000 to ON when the accurate time is reached. The set time is then immediately written to the real
time clock, and the clock data is updated.
• Every time X001 is set to ON, the current time can be corrected by ±30 seconds.
• When handling the year in the 4-digit mode, add the following program.
D8018 will specify the 4-digit year mode in the second scan and later after the PLC mode is changed to
RUN.
M8002
Initial pulse
- A PLC is normally operating in the 2-digit year mode. When the above instruction is executed and
"K2000 (fixed value)" is transferred to D8018 (year) in only one operation cycle after the PLC mode was
changed to RUN, the year mode is switched to the 4-digit mode.
- Execute this program every time the PLC mode is changed to RUN. Even if "K2000" is transferred, only
the display format is changed to the 4-digit year mode. The current date and time are not affected.
- In the 4-digit year mode, the set values "80 to 99" correspond to "1980 to 1999", and "00 to 79"
correspond to "2000 to 2079".
Examples:
"80" indicates 1980. "99" indicates 1999. "00" indicates 2000. "79" indicates 2079.
• When the data access unit FX-10DU-E/20DU-E/25DU-E is connected, select the 2-digit year mode. If the
4-digit year mode is selected, the year is not correctly displayed in the current version of the FX-10DU-E/
20DU-E/25DU-E.
Note that the clock is changed to the 2-digit year mode when the clock is set from the FX-10DU-E/20DU-E/
25DU-E while the PLC is operating in the 4-digit year mode.
FNC 12
K1
D0
MOV
FNC 12
K4
D1
MOV
FNC 12
K25
D2
MOV
FNC 12
K15
D3
MOV
FNC 12
K20
D4
MOV
FNC 12
K30
D5
MOV
FNC 12
K2
D6
MOV
The current value of the built-in
FNC167
D0
real time clock is updated.
TWR
M8017
FNC 12
K2000
D8018
MOV
21 Real Time Clock Control – FNC160 to FNC169
21.8 FNC167 – TWR / Set RTC data
Year (lower two digits)
Month
Day
Hour
Minute
Second
Day of week
The current value is
corrected by ±30 seconds.
21
22
23
24
25
26
27
28
29
30
603

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents