DATE ADD
DATE+, DATE+P
DATE+ instruction adds two clock data (S1 and S2) and saves the result to the Destination.
| |
S1 | Starting address of clock data |
S2 | Starting address of clock data |
D | Destination |
Instruction | Device address | No. of Steps | Flag | |||||||||||||||
M | X | Y | K | L | F | T | C | S | Z | D | @D | Int. | Error | Zero | Carry | |||
DATE+ DATE+P | S1 | o | o | o | o | o | o | o | o | - | o | o | o | - | 4 | o | - | - |
S2 | o | o | o | o | o | o | o | o | - | o | o | o | - | |||||
D | o | - | o | o | o | - | o | o | - | o | o | o | - |
When enabled, DATE+ instruction adds clock date S1 and S2 and saves the result to the Destination.
If the result is more than 24 hours, subtract 24 from the result.
For example, in case of 20:20:20 + 14:40:50, the result is 10:40:50. (Not 34:40:50)
If S1 and S2 are out or range, Error flag will be turned ON.
Example)
If X01 is ON, DATERDP instruction writes a date value to D0 ~ D6 and MOVP instruction writes 1 to D10.
Then, DATE+P instruction adds time data (D3~D5) and (D10~D12) and saves the result to the D100~D102.