Read Date
Instruction Parameters
Supported PLC Series
| XPnA/1R | XPnB | XPnE | XPnF | CP3A/B/P/U CP4A~D/U | CPnE | CPnF | BP | PLC-S |
|---|---|---|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Supported Data Registers
| M | X | Y | K | L | F | T | C | S | Z | R | Q | D | @D | Constant | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| D | ✓ | - | ✓ | ✓ | ✓ | - | ✓ | ✓ | - | ✓ | - | ✓ | ✓ | ✓ | - |
Supported Flags
| Flag | Bit | Support |
|---|---|---|
| Error | F11.0 | ✓ |
| Zero | F11.1 | - |
| Carry | F11.2 | - |
Number of Steps
| Steps |
|---|
| 3 |
Operands
| Operand | Description |
|---|---|
| D | The first operand. Entries are only WORD data registers. This is where the values read from 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, D, 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 DATERD and DATERDP 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.