Instruction Parameters
Supported PLC Series
| PLC-AES | PLC-FB | PLC-ES |
|---|---|---|
| ✓ | ✓ | ✓ |
Supported Data Registers
| M | X | Y | K | L | F | T | C | S | Z | R | Q | D | @D | Constant | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| S | ✓ | – | ✓ | ✓ | ✓ | – | ✓ | ✓ | – | ✓ | – | ✓ | ✓ | ✓ | – |
Supported Flags
| Flag | Bit | Support |
|---|---|---|
| Error | F11.0 | ✓ |
| Zero | F11.1 | – |
| Carry | F11.2 | – |
Number of Steps
| Steps |
|---|
| 3 |
Operands
| Operand | Description |
|---|---|
| S | The first operand. Entries are only WORD data registers. This is where the values written to the real time clock (RTC) device are stored. This requires 7 data registers. |
Notice
Error Flag (F11.0) Notice
The error flag, F11.0, will be ON for one scan when the address of the data register assigned by @D exceeds the range of the data register, D. The range of the data register, D, is dependent on the CPU type.
RTC Data Storage
The data read from a real time clock (RTC) device are stored in the data register, S, as follows:
| Data Register | Value | Date Range |
|---|---|---|
| D | Year | 2000 ~ 2099 |
| D+1 | Month | 1 ~ 12 |
| D+2 | Day | 1 ~ 31 |
| D+3 | Hour | 0 ~ 23 |
| D+4 | Minute | 0 ~ 59 |
| D+5 | Second | 0 ~ 59 |
| D+6 | Day of the Week | 0 ~ 6 Sunday ~ Saturday |
Instruction Behavior
The DATEWR and DATEWRP instructions behave as follows:
- The day of the week is defined by 0 ~ 6.
- Day 0 is Sunday, day 6 is Saturday.
- Compensation is made automatically for leap years.
Ladder Diagram Examples
DATEWR

The DATEWR instruction writes the WORD data from the data register S to a real time clock (RTC) device.


When the contact, M2.0, is powered ON (1), the instruction writes the block of time data, starting at the data register, D10, to the real time clock (RTC) device.
Memory Monitor

- The following data is written to the real time clock device:
- D10: 2025 (Year)
- D11: 11 (Month, November)
- D12: 7 (Day)
- D13: 17 (Hour)
- D14: 2 (Minute)
- D15: 40 (Second)
- D16: 1 (Day of the week, Monday)
The clock time is set to: 5:02:40 P.M., Monday, November 7, 2025.
DATEWRP

The DATEWRP one-shot instruction writes the WORD data from the data register S to a real time clock (RTC) device. Every time this instruction executes, it energizes the output only once.


When the contact, M3.0, is powered ON (1), the instruction writes the block of time data, starting at the data register, D20, to the real time clock (RTC) device.
Memory Monitor

- The following data is written to the real time clock device:
- D20: 2025 (Year)
- D21: 11 (Month, November)
- D22: 8 (Day)
- D23: 20 (Hour)
- D24: 54 (Minute)
- D25: 44 (Second)
- D26: 1 (Day of the week, Monday)
The clock time is set to: 8:54:44 P.M., Monday, November 8, 2025.
