Mitsubishi Electric melsec q00ujcpu User Manual page 165

Programmable controller
Hide thumbs Also See for melsec q00ujcpu:
Table of Contents

Advertisement

(4) Changing and reading clock data
(a)
Changing clock data
Clock data can be changed either by GX Developer or a program.
1) Changing clock data by GX Developer
Select [Online]
2) Changing clock data by a program
Use the DATEWR instruction (instruction for writing clock data) to change the clock data.
Figure 6.12
For details of the DATEWR instruction, refer to the following.
QCPU Programming Manual (Common Instructions)
When clock data is changed by GX Developer or a program, the clock of 1/1000 second is reset to 0.
Year data settable by GX Developer is up to 2037.
6 - 14
[Set time] to open the Set time screen and change the clock data.
Figure 6.11 Set time screen
shows a program for writing the set clock data to D0 to D6.
Write request
X0
0
MOVP K1999
MOVP
MOVP
MOVP
MOVP
MOVP
MOVP
DATEWR
Figure 6.12 Program example for writing clock data
DO
Year 1999
K8
D1
Month 8
K10
Day 10
D2
K11
Hour 11
D3
K35
D4
Minute 35
Second 24
K24
D5
Day of the week
K2
D6
Tuesday: 2
DO

Advertisement

Table of Contents
loading

Table of Contents