3 . I ns t r uc ti on Se t3- 3 2 9API Mnemonic Operands Function ControllersES2/EX2 SS2 SA2SESX2126 D LOG P Float logarithm operationTypeOPBit Devices Word devices Program StepsX Y M S K H KnX KnY KnM KnS T C D E F DLOG, DLOGP: 13 stepsS1 * * *S2 * * *D *PULSE 16-bit 32-bitES2/EX2 SS2 SA2SE SX2 ES2/EX2 SS2 SA2SE SX2 ES2/EX2 SS2 SA2SE SX2Operands:S1: Base S 2: Antilogarithm D: Operation resultExplanations:1. Perform logarithm operation with S 1 as the base and S2 as the antilogarithm and save the resultin D.2. Only a positive number is valid for S. Register D has to be 32-bit format. Operation is conductedin floating point value, so the value in S needs to be converted into floating value beforelogarithm operation.3. Logarithm operation: S 1D = S2, D = ? LogS1S2 = DExample: Assume S1 = 5, S2 = 125, S1D = S2, D = ? 5D = 125 D = LogS1S2 = log5125 = 3.4. Flags: M1020 (Zero flag), M1021 (Borrow flag) and M1022 (Carry flag).If absolute value of the result is larger than max. floating value, carry flag M1022 = ON.If absolute value of the result is smaller than min. floating value, borrow flag M1021 = ON.If the conversion result is 0, zero flag M1020 = ON.Program Example:1. When M0 = ON, convert (D1, D0) and (D3, D2) to binary floating value and save the result inregister (D11, D10) and (D13, D12) individually.2. When M1= ON, perform logarithm operation with (D11, D10) as base and (D13, D12) asantilogarithm. The results are saved in register (D21, D20) in binary floating format.3. When M2 = ON, convert the value in (D21, D20) into decimal floating point value and save theresult in (D31, D30). (At this time, D31 indicates powers of 10 for D30)M0RST M1081M1M2DEBCD D20 D30DFLT D0 D10D2 D12DLOG D10 D12 D20DFLT