Mitsubishi MELSEC Q Series Programming Manual page 720

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

DATEWR(P)
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• Individual items of data have been set outside the setting range.
• The device specified by
(For the Universal model QCPU, LCPU.)
Program Example
(1) The following program writes the following clock data to the clock element as BCD values
when X40 is turned ON.
Year ............... X30 to X3F
Month............. X28 to X2F
Day ................ X20 to X27
Week ............. X4 to X7
[Ladder Mode]
[List Mode]
Step
[Operation]
(Year)
(Month, Day)
(Hour, Minute)
(Second, Day of week)
7-346
exceeds the range of the corresponding device.
S
Hour................. X18 to X1F
Minute.............. X10 to X17
Second ............ X8 to XF
Instruction
Device
BIN
X3F
X38 X37
X30
2
0
0
0
X2F
X28 X27
X20
1
2
2
4
X1F
X18 X17
X10
1
2
5
7
XF
X8
X7
X4
3
9
0
Sets "Year"
Sets "Month"
Sets "Day"
Sets "Hour"
Sets "Minute"
Sets "Second "
Sets "Day of week"
Writes the clock data (D0 to D6)
to the clock element
D0
2000
D1
12
Clock data
D2
24
D3
2000, 12, 24 12:57:39 Sunday
12
D4
57
D5
39
D6
0
BIN
(Error code: 4100)
(Error code: 4101)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents