Mitsubishi Electric MELSEC-Q Series User Manual page 106

Hide thumbs Also See for MELSEC-Q Series:
Table of Contents

Advertisement

7 FUNCTION
7 - 10
2)
Method to Write from the Program
The time data is written in the clock element by using the clock
instruction (DATEWR).
A program example to write the time data using the time data write
instruction (DATEWR).
Write request
X0
0
Refer to "QCPU (Q mode)/QnACPU Programming Manual (Common
Instructions)" for details of the DATEWR instruction.
(b)
Reading Time Data
When reading the time data to the data register, use the time data read
instruction (DATERD) from the program.
The figure below shows an example of a program used to read the clock
data with the DATERD instruction and then store it in D10 to D16.
Read request
X1
Refer to the "QCPU (Q mode)/QnACPU Programming Manual (Common
instructions) for the details of the DATERD instruction.
REMARK
1)
Writing to and Reading from Time Data can be executed by special relays
(SM210 to SM213) and special registers (SD210 to SD213).
See Appendix 1 for details on special relay. See Appendix 2 for details on special
registers.
2)
: The figure below shows the clock data stored in D10 to D16.
D10
1999
D11
8
D12
10
D13
11
D14
35
D15
24
D16
4
MOVP
K2001
D0
MOVP
K8
D1
MOVP
K10
D2
MOVP
K11
D3
MOVP
K35
D4
MOVP
K24
D5
MOVP
D6
K4
DATEWR
D0
DATERD
D10
4 digits in AD
Month
Date
Hour
Refer to Section 7.5.1(1).
Minute
Second
Day of the week
MELSEC-Q
Year 2001
Month 8
Day 10
Hour 11
Minute 35
Second 24
Day Thursday: 4
The time data is read
in D10 to D16.
7 - 10

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec qcpuMelsec q00jcpuMelsec q00cpuMelsec q01cpu

Table of Contents