Delta AH500 — 6.17.2 Explanation of Real-time Clock Instructions

Chapter 6 Applied Instructions Symbol: S 1 : Source device Word S 2 : Source device Word D : Device in which the result is stored Word Explanation: 1. The value of the hour, the value of the minute, and the value of the second in the real-time clock specified by S 2 are added to the value of the hour, the value of the minute, and the value of the second in the real-time clock specified by S 1 , and the sum is stored in the register specified by D . 2. The operands S 1 , S 2 , and D each occupy three consecutive devices. 3. If the sum is larger than or equal to 24 hours, SM602 is ON, and the result gotten from the subtraction of 24 hours from the sum is stored in D . 4.

If the sum is 0 (0 hour 0 minute 0 second), SM600 is ON. Example: When M0 is ON, the instruction T+ is executed. The alue of the hour, the value of the minute, and the value of the second in D10~D12 are added to the value of the hour, the value of the minute, and the value of the second in D0~D2, and the sum is stored in D20~D22. + D0 D1 D2 8 ( Hour ) 10 ( Minute ) 20 ( Second ) D10 6 ( ) Hour 40 ( ) Minute 6 ( ) Second D20 D21 D22 14 ( ) Hour 50 ( ) Minute 26 ( ) Second D11 D12 8 hour 10 minute 20 second 6 hour 40 minute 6 second 14 hour 50 minute 26 second Additional remark: 1.

If the value in S 1 or S 2 exceeds the range, the operation error occurs, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 2. If S 1 +2, S 2 +2, or D +2 exceeds the device range, the operation error occurs, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 3. If users declare the operand S 1 in ISPSoft, the data type will be ARRAY [3] of WORD/INT. 4. If users declare the operand S 2 in ISPSoft, the data type will be ARRAY [3] of WORD/IN.

6-367 API Instruction code Operand Function 1602 T+ P S , S , D 1 2 Adding the time Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S 1          S 2          D          Pulse instruction 16-bit instruction (7 steps) 32-bit instruction AH500 AH500 -