Chapter 6 Applied Instructions Symbol S 1 : Source device 1 S 2 : Source device 2 D : Device where the result is stored Explanation 6_ 1. This instruction adds the value of the hour, the minute, and the second in the real-time clock specified by S 2 to the value of the hour, the minute, and the second in the real-time clock specified by S 1 , and then stores the sum 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 instruction subtracts 24 hours from the sum before storing the result in D . 4. If the sum is zero (zero hour zero minute zero second), SM600 is ON.
Example When M0 is ON, the instruction adds the value of the hour, the minute, and the second in D10 – D12 to the value of the hour, the minute, and the second in D0 – D2, and stores the sum in D20 – D22. 6-481 API Instruction code Operand Function 1602 T+ P S1, S2, D Adding the time Device X Y M S T C HC D FR SM SR E K 16# “$” F S1 S2 D BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S1 S2 D Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 -