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 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| S1 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – | ✓ | – | ✓ | ✓ | ✓ | ✓ |
| S2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – | ✓ | – | ✓ | ✓ | ✓ | ✓ |
| D | ✓ | – | ✓ | ✓ | ✓ | – | ✓ | ✓ | – | ✓ | – | ✓ | ✓ | ✓ | – |
Supported Flags
| Flag | Bit | Support |
|---|---|---|
| Error | F11.0 | ✓ |
| Zero | F11.1 | – |
| Carry | F11.2 | – |
Number of Steps
| Steps |
|---|
| 4 |
Operands
| Operand | Description |
|---|---|
| S1 | The first operand. Entries are WORD data registers or constants. This requires 3 data registers. The value range is 0 ~ 23 (hours) or 0 ~ 59 (minutes and seconds). |
| S2 | The second operand. Entries are WORD data registers or constants. This requires 3 data registers. The value range is 0 ~ 23 (hours) or 0 ~ 59 (minutes and seconds). |
| D | The third operand. Entries are only WORD data registers. This is where the difference is saved. This requires 3 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. F11.0 turns ON when the value of the data for subtracting exceeds the data register assigned to S1 or S2.
Instruction Behavior
The DATE+ and DATE+P instructions behave as follows:
- The value of S1 and S2 should follow this format:
- Hour: 0 ~ 23
- Minute: 0 ~ 59
- Second: 0 ~ 59
- The sum will be saved in the same format starting at the data register D.
- If the sum of S1 + S2 exceeds 24 hours, 24 hours will be added from the difference.
Tip: Operand Subtraction Format
S2 is subtracted from S1. (S1 – S2)
Ladder Diagram Examples
DATE-

The DATE- instruction subtracts a WORD date value, S2, from a WORD date value, S1, and saves the difference date in an assigned WORD data register, D.

When the contact, M3.0, is powered ON (1), the instruction subtracts the WORD date value data registers, D30, D31, and D32, from the WORD date value data registers, D34, D35, and D36.

The differences are saved in the WORD date value data registers, D38, D39, and D40.
Memory Monitor

DATE-P

The DATE-P one-shot instruction subtracts a WORD date value, S2, from a WORD date value, S1, and saves the difference date in an assigned WORD data register, D. Every time this instruction executes, it energizes the output only once.

When the contact, M3.2, is powered ON (1), the instruction subtracts the WORD date value data registers, D10, D11, and D12, from the WORD date value data registers, D14, D15, and D16.

The differences are saved in the WORD date value data registers, D18, D19, and D20.
Memory Monitor

