Mitsubishi Electric MELSEC-Q00U(J)CPU User Manual page 130

Table of Contents

Advertisement

(3) Changing and reading clock data
(a)
Changing clock data
Clock data can be changed using either a programming tool or a program.
• Changing clock data by programming tool
Open the "Set Clock" dialog box.
[Online]
• Changing clock data by a program
Use the DATEWR instruction (instruction for writing clock data) to change the clock data.
The following shows a program example that writes clock data set D0 to D6.
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 seconds is reset to 0.
● Year data settable by programming tool is up to 2037.
128
[Set Clock...]
Write request
X0
MOVP K1999
0
MOVP
MOVP
MOVP
MOVP
MOVP
MOVP
DATEWR
DO
Year 1999
K8
Month 8
D1
K10
D2
Day 10
K11
D3
Hour 11
K35
D4
Minute 35
Second 24
K24
D5
Tuesday: 2
K2
D6
DO

Advertisement

Table of Contents
loading

Table of Contents