Delta DVP-ES3 — 6.16.2 Explanation of Floating-point Number Instructions

Chapter 6 Applied Instructions Symbol S 1 : Base for the logarithm S 2 : Source value D : Device where the operation result is stored Explanation 1. This instruction calculates the logarithm of the value in S 2 with respect to the value in S 1 , and stores the 6_ single-precision floating-point operation result in D . 2. The values in S 1 and S 2 only can be positive values. 3. S 1 D = S 2 .→ D =Log S1 S 2 . 4. Example: suppose the values in S 1 and S 2 are 5 and 125 respectively. Find log 5 125 (log base 5 of the number 125). 5. S 1 D = S 2 .→5 D =125.→ D =log 5 125=3. 6. If the operation result stored in D is 0, SM600 is ON. Example 1.

When M0 is ON, the DFLT instruction converts the values in (D1, D0) and (D3, D2) into the floating-point numbers, and stores the conversion results in (D11, D10) and (D13, D12) respectively. 2. When M1 is ON, the FLOG instruction calculates the logarithm of the floating-point number in (D13, D12) with respect to the floating-point number in (D11, D10), and stores the operation result in (D21, D20).

6-469 API Instruction code Operand Function 1514 FLOG P S1, S2, D Logarithm of a floating-point number 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