Chapter 6 Applied Instructions Symbol S : Data source n : Data length D : Operation result 6_ Explanation 1. The instruction adds up the signed decimal values in S to S + n -1, and stores the sum in the register specified by D .
S Binary values +1 S +2 S n D D +1 +4 S +3 S +5 S Binary value S +1 S +2 S +3 S D D +1 Binary values n D D +3 +2 Binary value 6-381 API Instruction code Operand Function 1217 D WSUM P S, n, D Getting the sum Device X Y M S T C HC D FR SM SR E K 16# “$” F S n D BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S n D Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 ES3 S+5 S+4 S+7 S+6 S+9 S+8