Mitsubishi 00JCPU User Manual page 195

Q series programmable controller
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]
[Set time] to open the Set time screen and change the clock data.
2) Changing clock data by a program
Use the DATEWR instruction (instruction for writing clock data) to change the clock data.
Figure 6.11 shows a program for writing the set clock data to D0 to D6.
Write request
X0
0
For details of the DATEWR instruction, refer to the following.
MELSEC-Q/L Programming Manual (Common Instruction)
When clock data is changed, the clock of 1/1000 second is reset to 0.
Year data settable by GX Developer is up to 2037.
Figure 6.10 Set time screen
MOVP K1999
MOVP
K8
K10
MOVP
MOVP
K11
MOVP
K35
MOVP
K24
MOVP
K2
DATEWR
Figure 6.11 Program example for writing clock data
Year 1999
DO
D1
Month 8
D2
Day 10
D3
Hour 11
D4
Minute 35
Second 24
D5
Day of the week
D6
Tuesday: 2
DO
CHAPTER6 FUNCTIONS
6 - 15
1
2
3
4
5
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents