DVP-ES3 Series Programming Manual Symbol S : First device D : Device where the mean is stored n : Number of devices _6 Explanation 1. This instruction adds up the single precision floating points in the n devices starting from the device specified by S , divides the sum by the value in n , then stores the mean of the sum in D . 2. For 16-bit instructions, the value in n must be between 1–256, 3. Instruction flags: SM600 (zero flag), SM601 (borrow flag), SM602 (carry flag): When the operation result is zero, SM600 is ON. Otherwise, it is OFF.
If the value while adding or the absolute result of the operation is less than the floating point number that can be shown, the D=16#FF800000 and the borrow flag SM601 is ON. If the value while adding or the absolute result of the operation is larger than the floating point number that can be shown, the D=16#7F800000 and the carry flag SM602 is ON. 6-392 API Instruction code Operand Function 1224 FMEAN P S, D, n Finding the mean of floating point numbers 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