
7 - 10 7 - 10
MELSEC-Q
7 FUNCTION
2) Method to Write from the Program
The time data is written to the clock element by using the clock
instruction (DATEWR).
A program example to write the time data using the time data write
instruction (DATEWR).
MOVP
D0
X0
MOVP
D1
MOVP
D2
MOVP
D3
MOVP
D4
MOVP
D5
MOVP
D6
K1999
K8
K10
K11
K35
K24
K2
DATEWR
D0
Year 1999
Month 8
Day 10
Hour 11
Minute 35
Second 24
Day Tuesday: 2
0
Write request
Refer to "QCPU (Q mode)/QnACPU Programming Manual (Common
Instructions)" for details on 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.
DATERD
D10
X1
The time data is read and
then stored in D10 to D16.
Read request
Refer to the "QCPU (Q mode)/QnACPU Programming Manual (Common
instructions) for the details on the DATERD instruction.
REMARK
1) Time Data can be written to and read from 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
D11
D12
D13
D14
D15
D16
4 digits in AD
Month
Date
Hour
Minute
Second
Day of the week
See Section 7.5(1).
1999
8
10
11
35
24
2
Содержание QCPU (Q Mode)
Страница 111: ...5 19 5 19 MELSEC Q 5 ASSIGNMENT OF I O NUMBERS MEMO ...
Страница 450: ...App 59 App 59 MELSEC Q APPENDICES MEMO ...