Chapter 6 Applied Instructions Symbol S : First device D : Device where the mean is stored n : Number of devices 6_ Explanation 1. This instruction adds up the values in the n devices starting from the device specified by S , and the stores the mean of the sum in D . 2. If a remainder appears in the calculation, the instruction discards it. 3. For 16-bit instructions, n must be between 1–256. 4. For 32-bit instructions, n must be between 1–128. 5. Only the 32-bit instructions can use the 32-bit counter, but not the device E.
6-363 API Instruction code Operand Function 1208 D MEAN P S, D, n Finding the mean Device X Y M S T C HC D FR SM SR E K 16# “$” F S D n BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S D n Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 ES3